dariober / cnv_facets

Somatic copy variant caller (CNV) for next generation sequencing
Other
67 stars 15 forks source link

chromosome name #41

Closed sotaro-kanematsu closed 2 years ago

sotaro-kanematsu commented 2 years ago

I am using facets to uncover allele-specific somatic copy number alternations using clinical tumor-normal pairs. I run the cnv_facets.R script as below.

cnv_facets.R --gbuild hg19 -t Tumor.bam -n Normal.bam -vcf common_all_20170710.vcf.gz -o Nomal_Tumor_cnv_facets_output

I used hs37d5a.fa as a reference sequence in mapping, and so my bam files do not have prefixes (e.g. 1, 2, 3.....Y) as well as the common SNP vcf file. On the other hand, hg19 has prefixes (e.g. chr1, chr2...chrY), so If I run the above script, an error occurs. (I know the script work well if I change the header of bam files and add "chr" prefix to vcf file, however I thought it is supposed inefficient to fix bam files or change the reference. How should I fix the cnv_facets.R script?

dariober commented 2 years ago

Hi- cnv_facets should work with chromosomes names with or without the "chr" prefix. However, bam and vcf files must have the same names (and all of them be relative to the same genome build of course). For computational efficiency, you could rename the vcf file instead of the bam files to remove the chr prefix and rename the MT chromsosome.

(I'm reluctant to edit the cnv_facets script to support mixed chromosome format).

Feel free to re-open the issue if this doesn't help.