broadinstitute / ichorCNA

Estimating tumor fraction in cell-free DNA from ultra-low-pass whole genome sequencing.
GNU General Public License v3.0
160 stars 87 forks source link

Creating mappability wig file from UCSC mappability tracks #23

Open thestarocean opened 6 years ago

thestarocean commented 6 years ago

I was trying to adjust the bin size of 10MB, however, the mappability wig file generated from both Alignability and Uniqueness tracks from UCSC doesn't work along with the R script. The error message kept saying "invalid x for loess function". And the reason is that the generated mappability file contained no value pass the mappability threshold (which is set to 0.9 as default according to utils.R). So Did I chose the wrong mappability tracks? Could you give me some hint about the mappability tracks you use? When I bypass the mappability wig file, the programme gives me a series of warning about k-d tree limited by memory, and executing ichorCNA with generated normal panel resulted in "Error: INTEGER() can only be applied to a 'integer'". SO How should I fix that?

gavinha commented 6 years ago

Hi,

There are potentially several theoretical problems with using 10Mb bins 1) GC content and mappability bias corrections are being performed on too few bins. I'm not even sure GC bias is present at this scale. We have also never tested this. 2) Smaller chromosomes will have issues with segmentation because there are too few data points. For example, chr21 will only have 2-3 data points.

If you still wish to continue with 10Mb bins, you can reduce the mapScoreThres=0 in the runIchorCNA.R script. See lines here: https://github.com/broadinstitute/ichorCNA/blob/05519bf02d4ae6c949b89551152cb107f86fdcb2/scripts/runIchorCNA.R#L166-L169

thestarocean commented 6 years ago

Thanks. I will give it a try.