Repository navigation
Description
I was trying to clarify the definitions of the copy numbers for the paper and was looking into the distributions / data quality when I found some discrepancies which led to a deep dive and a discovered a pretty widespread issue.
Current: current 2.4 data
Harmonized: Modified the 2.4 data with the changes listed in New Conversion below. I'll apply these changes and do a fresh build and replace the current 2.4 (but keep it in place).
copy_number is read in on different scales across datasets, but copy_call is assigned in each by a uniform set of cutoffs (0.521 / 0.731 / 1.214 / 1.422). The cutoffs are on DepMap's log2(relative CN + 1) scale, where 0, 1, 2, 3 and 4 copies are 0, 0.585, 1.0, 1.32 and 1.585.
In the table below, x is DepMap's raw value, s is a raw log2 ratio (0 = normal, −1 = one copy lost), and c is a raw absolute copy count (2 = normal).
| Dataset(s) | Raw input | Current conversion | New conversion |
|---|---|---|---|
| DepMap (ccle, ctrpv2, fimm, gcsi, nci60, prism) | log2(rel+1) | 2^x / 2 |
none |
| Sanger (gdscv1, gdscv2) | log2 ratio | 2^s |
log2(2^s + 1) |
| mpnst | log2 ratio | 2^s |
log2(2^s + 1) |
| cptac | log2 ratio | none (2^s in call) |
log2(2^s + 1) |
| pancreatic | log2 ratio | none, own cutoffs | log2(2^s + 1) |
| liver | log2 ratio | 2·2^s |
log2(2^s + 1) |
| bladder, colorectal | seg.mean (log2 ratio) | 2·2^(s/2) |
log2(2^s + 1) |
| novartis | absolute copies | log2(c) |
log2(c/2 + 1) |
| hcmi | absolute copies (ASCAT) | log2(c) |
log2(c/ploidy + 1) |
Simulated on the 2.4 build, every dataset has a median of about 1.0 after conversion, with 71–95% of genes called diploid.
Notes
- DepMap: the 26Q1 source is already on DepMap's scale, so the
2^x / 2step isn't needed. - bladder/colorectal: inputs are log2 ratios, so the
/2should be dropped. - hcmi: divide by per-sample
tumor_ploidy(GDC ASCAT metadata) to match the ratio sources, which are relative to each sample's own baseline.
Package Bug too: coderdata/dataset/dataset.py recomputes copy_call with pd.cut using bin edges [0, …, 2] rather than using the stored column. Values outside that range get no label and come back as NaN. Once harmonized, that means genes above 2 (more than about 6 copies, the strongest amplifications) are dropped. Switching the outer edges to 0 and inf. Adding @ymahlich for visibility.
Activity