Skip to content

Commit 1f582e9

Browse files
feat: AppBio QuantStudio Design & Analysis - remove duplicates and hardcoded values from measurement custom info doc (#1088)
Co-authored-by: Nathan Stender <nathan.stender@benchling.com>
1 parent 47eb649 commit 1f582e9

40 files changed

Lines changed: 10339 additions & 22194 deletions

File tree

src/allotropy/parsers/appbio_quantstudio/appbio_quantstudio_data_creator.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,19 @@ def _create_processed_data(
125125
data_processing_custom_info = {
126126
"reference dna description": result_metadata.reference_dna_description,
127127
"reference sample description": result_metadata.reference_sample_description,
128-
"Analysis Type": "SinglePlex",
129-
"RQ Min/Max Confidence Level": 0.95,
130128
}
131129

130+
# Add Analysis Type and RQ Min/Max Confidence Level only if present in instrument file
131+
if result_metadata.extra_data:
132+
if "Analysis Type" in result_metadata.extra_data:
133+
data_processing_custom_info["Analysis Type"] = result_metadata.extra_data[
134+
"Analysis Type"
135+
]
136+
if "RQ Min/Max Confidence Level" in result_metadata.extra_data:
137+
data_processing_custom_info[
138+
"RQ Min/Max Confidence Level"
139+
] = result_metadata.extra_data["RQ Min/Max Confidence Level"]
140+
132141
for field in data_processing_field_names:
133142
if field in extra_data:
134143
data_processing_custom_info[field] = extra_data[field]
@@ -269,7 +278,6 @@ def _create_measurement(
269278
reporter_dye_data_cube=reporter_dye_data_cube,
270279
passive_reference_dye_data_cube=passive_reference_dye_data_cube,
271280
melting_curve_data_cube=_create_melt_curve_data_cube(melt_curve_raw_data),
272-
custom_info=result_metadata.extra_data,
273281
)
274282

275283

src/allotropy/parsers/appbio_quantstudio_designandanalysis/appbio_quantstudio_designandanalysis_data_creator.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,20 @@ def _create_processed_data(well_item: WellItem, data: Data) -> ProcessedData:
110110
"CQCONF": custom_info.get("CQCONF", "N"),
111111
"NOISE": custom_info.get("NOISE", "N"),
112112
"OUTLIERRG": custom_info.get("OUTLIERRG", "N"),
113-
"Analysis Type": "SinglePlex",
114-
"RQ Min/Max Confidence Level": 0.95,
115113
"Omit": custom_info.get("Omit", False),
116114
}
117115

116+
# Add Analysis Type and RQ Min/Max Confidence Level only if present in instrument file
117+
if data.header.extra_data:
118+
if "Analysis Type" in data.header.extra_data:
119+
data_processing_custom_info["Analysis Type"] = data.header.extra_data[
120+
"Analysis Type"
121+
]
122+
if "RQ Min/Max Confidence Level" in data.header.extra_data:
123+
data_processing_custom_info[
124+
"RQ Min/Max Confidence Level"
125+
] = data.header.extra_data["RQ Min/Max Confidence Level"]
126+
118127
return ProcessedData(
119128
automatic_cycle_threshold_enabled_setting=result.automatic_cycle_threshold_enabled_setting,
120129
cycle_threshold_value_setting=result.cycle_threshold_value_setting,

tests/parsers/appbio_quantstudio/testdata/appbio_quantstudio_example01.json

Lines changed: 1197 additions & 2157 deletions
Large diffs are not rendered by default.

tests/parsers/appbio_quantstudio/testdata/appbio_quantstudio_example02.json

Lines changed: 769 additions & 1153 deletions
Large diffs are not rendered by default.

tests/parsers/appbio_quantstudio/testdata/appbio_quantstudio_example03.json

Lines changed: 1827 additions & 2211 deletions
Large diffs are not rendered by default.

tests/parsers/appbio_quantstudio/testdata/appbio_quantstudio_example04.json

Lines changed: 381 additions & 571 deletions
Large diffs are not rendered by default.

tests/parsers/appbio_quantstudio/testdata/appbio_quantstudio_example05.json

Lines changed: 331 additions & 595 deletions
Large diffs are not rendered by default.

tests/parsers/appbio_quantstudio/testdata/appbio_quantstudio_example06.json

Lines changed: 55 additions & 91 deletions
Large diffs are not rendered by default.

tests/parsers/appbio_quantstudio/testdata/appbio_quantstudio_example07.json

Lines changed: 481 additions & 865 deletions
Large diffs are not rendered by default.

tests/parsers/appbio_quantstudio/testdata/appbio_quantstudio_example08.json

Lines changed: 253 additions & 397 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)