|
|
|
@ -12,11 +12,12 @@ import pandas
@@ -12,11 +12,12 @@ import pandas
|
|
|
|
|
from .columns import ( |
|
|
|
|
RAW_DATA_POS_ID, |
|
|
|
|
META_DATA_WELL_ROW, |
|
|
|
|
META_DATA_WELL_NAME, |
|
|
|
|
RAW_DATA_COLUMN_SET, |
|
|
|
|
META_DATA_EXPOSURE_ID, |
|
|
|
|
META_DATA_WELL_COLUMN, |
|
|
|
|
RAW_DATA_COLUMNS_RENAME_MAP, |
|
|
|
|
RAW_DATA_NORMALIZATION_MAP, |
|
|
|
|
RAW_DATA_COLUMNS_RENAME_MAP, |
|
|
|
|
) |
|
|
|
|
from .parameters import add_optional_measurement_parameters |
|
|
|
|
|
|
|
|
@ -76,6 +77,10 @@ def parse_file(data_file):
@@ -76,6 +77,10 @@ def parse_file(data_file):
|
|
|
|
|
""" |
|
|
|
|
measurement_info = _extract_measurement_info(Path(data_file)) |
|
|
|
|
data_frame = _parse_csv(data_file) |
|
|
|
|
# normalized well name |
|
|
|
|
data_frame[ |
|
|
|
|
META_DATA_WELL_NAME |
|
|
|
|
] = f"{measurement_info.row}{measurement_info.column:02d}" |
|
|
|
|
data_frame[META_DATA_WELL_ROW] = measurement_info.row |
|
|
|
|
data_frame[META_DATA_WELL_COLUMN] = measurement_info.column |
|
|
|
|
data_frame[META_DATA_EXPOSURE_ID] = measurement_info.exposure |
|
|
|
@ -129,7 +134,7 @@ def _sanity_check(data_frame):
@@ -129,7 +134,7 @@ def _sanity_check(data_frame):
|
|
|
|
|
) |
|
|
|
|
# set the right data type for measurement columns |
|
|
|
|
for raw_column in RAW_DATA_NORMALIZATION_MAP: |
|
|
|
|
data_frame[raw_column] = pandas.to_numeric(data_frame[raw_column]) |
|
|
|
|
data_frame[raw_column] = pandas.to_numeric(data_frame[raw_column]) |
|
|
|
|
return data_frame |
|
|
|
|
|
|
|
|
|
|
|
|
|
|