Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect AMP filtering #35

Open
arichards2564 opened this issue Apr 9, 2020 · 0 comments
Open

Incorrect AMP filtering #35

arichards2564 opened this issue Apr 9, 2020 · 0 comments
Assignees

Comments

@arichards2564
Copy link
Contributor

genes_all[cn_state %like% '^AMP' & length > max_seg_length & (tcn > 8 | genes_on_seg > max_gene_count) , filter := add_tag(filter, 'unfocal_amp')]

This line and the next are incorrect. The filters for cf and number of genes on segment are only being applied when the amp is already too big. These are 3 separate filters and should be applied as such: 1) bp size, 2) cf too low, 3) # genes on segment is too large.
Also, tcn > 8 is good, now bad so I'm not sure why that's being flagged.

I think it needs to be re-written to look like the previous version. This one tries to separate the types of failing CNAs but because we only need 1 of the 3 factors to "PASS" in order to pass the CNA, it doesn't really work.

facets-suite/geneLevel.R

Lines 327 to 338 in 97b1e7e

genelevelcalls0 = genelevelcalls0 %>%
mutate(
# CCS filter flag amplifications and homdels at given thresholds
ccs_filter = case_when(
FACETS_CALL.em %in% c("AMP","AMP (LOH)","AMP (BALANCED)") &
!(seg.len < max_seg_length & (tcn.em > 8 | count <= 10 | ( !is.na(purity) & cf.em > CFcut ))) ~ 'FAIL',
FACETS_CALL.em == "HOMDEL" & !(seg.len < max_seg_length & count <= 10) ~ 'FAIL',
TRUE ~ 'PASS'),
# Flag for review certain homdels
review = ifelse(ccs_filter == 'FAIL' & FACETS_CALL.em == "HOMDEL" &
Hugo_Symbol %in% unique(oncokb_tsg$hugoSymbol) & seg.len < 25000000, 'rescue', NA_character_)
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants