Question: CosmicCodingMuts.vcf.gz for hg38?
gravatar for Tania
19 months ago by
Tania120 wrote:

Hi all

I downloaded CosmicCodingMuts.vcf.gz from Cosmic site. Then I use for my RNAseq somatic calling Homo_sapiens_assembly38.dbsnp138.vcf from GATK resource bundle. And also use reference: Homo_sapiens_assembly38.fasta

Where I can find Cosmic files with chr contigs for hg38?

cosmic.vcf and reference have incompatible contigs. Please see more information. Error details: No overlapping contigs found.
    ##### ERROR  cosmic.vcf contigs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, X, Y, MT]
    ##### ERROR   reference contigs = [chr1, chr2, chr3, chr4, chr5, chr6, chr7, chr8, chr9, chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr20, chr21, chr22, chrX, chrY, chrM, chr1_KI270706v1_random, chr1_KI270707v1_random, chr1_KI270708v1_random, chr1_KI270709v1_random, chr1_KI270710v1_random, chr1_KI270711v1_random, chr1_KI270712v1_random, chr1_KI270713v1_random, chr1_KI270714v1_random, chr2_KI270715v1_random, chr2_KI270716v1_random, chr3_GL000221v1_random, chr4_GL000008v2_random, chr5_GL000208v1_random, chr9_KI270717v1_random, chr9_K


rna-seq somaticmutations • 1.2k views
ADD COMMENTlink modified 18 months ago by Biostar ♦♦ 20 • written 19 months ago by Tania120

See also : COSMIC vcf file compatibility for Mutect2

ADD REPLYlink written 19 months ago by erwan.scaon720

Thanks erwan.scaon :)

ADD REPLYlink written 19 months ago by Tania120
gravatar for dariober
19 months ago by
WCIP | Glasgow | UK
dariober10k wrote:

This is the script I used to prepare the cosmic file for mutect2 (GATK 3.8). Check if it suites you (and does the right thing!). I think I had to get a user account for Cosmic first:

## Edit to put your email address:
sftp <>@<>

sftp> get /files/grch38/cosmic/v82/VCF/CosmicCodingMuts.vcf.gz
sftp> get /files/grch38/cosmic/v82/VCF/CosmicNonCodingVariants.vcf.gz

Convert chromosome names for GATK and combine VCFs:

zcat CosmicCodingMuts.vcf.gz | awk '{if($1 ~ "^#"){print $0} else {print "chr" $0}}' | sed 's/^chrMT/chrM/' | bgzip > CosmicCodingMuts.vcf.gatk.gz
zcat CosmicNonCodingVariants.vcf.gz | awk '{if($1 ~ "^#"){print $0} else {print "chr" $0}}' | sed 's/^chrMT/chrM/' | bgzip > CosmicNonCodingVariants.vcf.gatk.gz
tabix CosmicCodingMuts.vcf.gatk.gz
tabix CosmicNonCodingVariants.vcf.gatk.gz

bcftools concat --allow-overlaps --output-type z CosmicCodingMuts.vcf.gatk.gz CosmicNonCodingVariants.vcf.gatk.gz > CosmicMuts.gatk.vcf.gz
tabix CosmicMuts.gatk.vcf.gz
rm CosmicCodingMuts.vcf.gatk.gz* CosmicNonCodingVariants.vcf.gatk.gz*
rm CosmicCodingMuts.vcf.gz* CosmicNonCodingVariants.vcf.gz*
ADD COMMENTlink written 19 months ago by dariober10k

Thanks dariober, I already downloaded the file, converting the chr 1 thing is what I wanted, will try the code now. Very much appreciated.

ADD REPLYlink written 19 months ago by Tania120
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1679 users visited in the last hour