Skip to content

Commit efc7fe6

Browse files
committed
added filter for truth annotations to support CellProfiler benchmarking
1 parent f0988d2 commit efc7fe6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

efaar_benchmarking/benchmarking.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,11 @@ def compound_gene_benchmark(
911911
"""
912912
config = config or BenchmarkConfig()
913913
truth = truth_data if truth_data is not None else load_truth_data(benchmark_data_dir)
914+
print(f"shape of original annotations {truth.shape}")
915+
# filter truth relationships for genes & compounds in [filtered] metadata
916+
truth = truth[truth.gene_symbol.isin(map_data.metadata.perturbation) &
917+
truth.treatment.isin(map_data.metadata.perturbation)]
918+
print(f"shape of filteredgit annotations {truth.shape}")
914919
similarities = compute_similarities(truth, map_data, pert_col, randomize=check_random)
915920

916921
thresholds = (activity_threshold, inactivity_threshold)

0 commit comments

Comments
 (0)