Entering edit mode
3.7 years ago
parvathi.sudha
▴
40
I am trying to concatenate multiple Strelka vcf files from different samples to one file. Using vcf-concat
I was able to combine them. But, I also want to include their sample name/filename in the merged file, preferably as the first column. Is there a way to do that using VCFtools?
Code I used:
vcf-concat File1.vcf.gz File2.vcf.gz File3.vcf.gz | gzip -c > Merged.vcf.gz
Many thanks!
Parvathi.
vcftools is deprecated use
bcftools merge
orbcftools concat
uh ?
Thank you for the reply.
Looks like,
bcftools concat
is similar tovcf-concat
.Regarding, "including the filename after concatenate?" When viewing the concatenated file I would like to know from which vcf file each row belongs to. So, thought about adding a new column with sample name. Not sure if it is possible. I am using Strelka vcf, the header won't have a sample name.
VCF, which looks like this:
CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NORMAL TUMOR
chr12 92538217 . T G . PASS SOMATIC;QSS=496;TQSS=1;NT=ref;QSS_NT=3070;TQSS_NT=1;SGT=TT->GT;DP=1897;MQ=60.00;MQ0=0;ReadPosRankSum=0.37;SNVSB=0.00;SomaticEVS=19.87;CSQ=G|missense_variant|MODERATE|BTG1|ENSG00000133639|Transcript|ENST00000256015.3 DP:FDP:SDP:SUBDP:AU:CU:GU:TU 610:5:0:0:0,0:0,0:0,0:605,611 1284:2:0:0:0,0:2,2:233,234:1047,1050
bcftools merge
, will merge the variants in a column-wise manner, which I don't prefer.