|
|
|
@ -228,7 +228,7 @@ def test_normalize_exposure(normalization_data_frame):
@@ -228,7 +228,7 @@ def test_normalize_exposure(normalization_data_frame):
|
|
|
|
|
sorted_results = result.sort_values( |
|
|
|
|
by=["Well.Row", "Well.Column", "Pos.Id"] |
|
|
|
|
) |
|
|
|
|
expected_values = [2, 8, 30, 2, 20, 20, 20, 20, 200, 200, 200, 200] |
|
|
|
|
expected_values = [1, 4, 15, 1, 10, 10, 10, 10, 100, 100, 100, 100] |
|
|
|
|
|
|
|
|
|
for normalized_col in COLUMN_NORMALIZATION.values(): |
|
|
|
|
list(sorted_results[normalized_col]) == expected_values |
|
|
|
@ -241,14 +241,14 @@ def test_normalize_exposure_time(normalization_data_frame):
@@ -241,14 +241,14 @@ def test_normalize_exposure_time(normalization_data_frame):
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
reduced = reduce_overflow(normalization_data_frame, "Saturation", 1) |
|
|
|
|
result = normalize_exposure_time(reduced, {"Cy5": 100, "Cy3": 0}) |
|
|
|
|
result = normalize_exposure_time(reduced) |
|
|
|
|
|
|
|
|
|
assert "Cy5" in result |
|
|
|
|
|
|
|
|
|
sorted_results = result["Cy5"].sort_values( |
|
|
|
|
by=["Well.Row", "Well.Column", "Pos.Id"] |
|
|
|
|
) |
|
|
|
|
expected_values = [2, 8, 30, 2, 20, 20, 20, 20, 200, 200, 200, 200] |
|
|
|
|
expected_values = [1, 4, 15, 1, 10, 10, 10, 10, 100, 100, 100, 100] |
|
|
|
|
|
|
|
|
|
assert list(sorted_results["Normalized.Spot.Mean"]) == expected_values |
|
|
|
|
|
|
|
|
@ -284,11 +284,10 @@ def test_normalize_measurement(example_dir):
@@ -284,11 +284,10 @@ def test_normalize_measurement(example_dir):
|
|
|
|
|
2: ExposureSetting("Cy5", 15), |
|
|
|
|
3: ExposureSetting("Cy5", 150), |
|
|
|
|
} |
|
|
|
|
normalization_map = {"Cy5": 25} |
|
|
|
|
|
|
|
|
|
result = normalize_measurement(data_frame, exposure_map, normalization_map) |
|
|
|
|
result = normalize_measurement(data_frame, exposure_map) |
|
|
|
|
cy3_df, cy5_df = result["Cy3"], result["Cy5"] |
|
|
|
|
|
|
|
|
|
assert set(result.keys()) == {"Cy3", "Cy5"} |
|
|
|
|
assert cy3_df["Normalized.Exposure.Time"].unique() == 100 |
|
|
|
|
assert cy5_df["Normalized.Exposure.Time"].unique() == 25 |
|
|
|
|
assert cy5_df["Normalized.Exposure.Time"].unique() == 150 |
|
|
|
|