I need a reusable offline co-essentiality ranker for Helix Harbor's MARCH5
pathway review. Build /workspace/bin/rank_coessential.py and use it to process
/workspace/request.json into the two output files named there. The frozen
24Q4-derived input and its provenance are already under /workspace; do not
fetch anything.
Treat input_files, output_csv, and summary_json as relative to the request
file's directory unless a path is absolute. Input files are row-wise shards of
a DepMap-style CSV: the first column is ModelID, gene headers are
SYMBOL (EntrezID), and the gene-column order can differ between shards.
Missing scores can be empty, NA, or NaN.
For the requested target, calculate Pearson correlation independently against
every other gene over that pair's shared finite scores. Exclude the target,
pairs below min_overlap, and pairs with zero variance on either side. Rank by
the unrounded coefficient descending, then by gene symbol ascending for an
exact tie. Return top_n rows, or all eligible rows if fewer exist.
The output CSV must have exactly these columns:
text
rank,gene,r,n_common
Ranks are one-based and contiguous, gene is the symbol without the Entrez
suffix, and coefficients must be numeric to absolute error at most 1e-9.
The summary JSON must contain target_gene, method, min_overlap,
top_n_requested, partners_returned, eligible_gene_count, top_partner,
context_partner, and interpretation. top_partner mirrors the first ranked
row (including rank, gene, r, and n_common) or is null. When the optional
request field context_partner names a returned gene, context_partner mirrors
that row; otherwise it is null. interpretation must record the two explicit
boolean conclusions
coessentiality_supports_shared_biology_hypothesis: true and
correlation_establishes_physical_interaction: false.
For the supplied request, I expect exactly 20 ranked partners and want the MCL1
relationship reported if this slice supports it. Create parent output
directories as needed and replace stale outputs on every run.