As the doctor gone rogue

November 27, 2015

Appending multiple vcf

Filed under: Uncategorized — Tags: , , — hypotheses @ 12:10 am

If you have multiple vcf files split by chromosome from the same samples, this is the case when performing joint variant calls of multiple samples in GATK. At the end of the day, if you want to have a single vcf file from this project, CatVariants tool (a command line tool in GATK) is pretty fast. Although I think this might be just the case of simple cat of multiple files except the vcf header, this tools still come in handy especially when you already have GATK installed.


java -cp GenomeAnalysisTK.jar org.broadinstitute.gatk.tools.CatVariants \
-R hg19.fa \
-V chrM.normal.vcf.gz \
-V chr1.normal.vcf.gz \
-V chr2.normal.vcf.gz \
-V chr3.normal.vcf.gz \
-V chr4.normal.vcf.gz \
-V chr5.normal.vcf.gz \
-V chr6.normal.vcf.gz \
-V chr7.normal.vcf.gz \
-V chr8.normal.vcf.gz \
-V chr9.normal.vcf.gz \
-V chr10.normal.vcf.gz \
-V chr11.normal.vcf.gz \
-V chr12.normal.vcf.gz \
-V chr13.normal.vcf.gz \
-V chr14.normal.vcf.gz \
-V chr15.normal.vcf.gz \
-V chr16.normal.vcf.gz \
-V chr17.normal.vcf.gz \
-V chr18.normal.vcf.gz \
-V chr19.normal.vcf.gz \
-V chr20.normal.vcf.gz \
-V chr21.normal.vcf.gz \
-V chr22.normal.vcf.gz \
-V chrX.normal.vcf.gz \
-V chrY.normal.vcf.gz \
-out normal.vcf.gz \
-assumeSorted

Check out the catVariant tools page for more detail: https://www.broadinstitute.org/gatk/gatkdocs/org_broadinstitute_gatk_tools_CatVariants.php

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: