bcftools merge; retaining sample names
When I do bcftools merge
, the headers do not retain the filenames. How can I specify filenames?
This is my command
bcftools merge vcf/unfiltered/*.vcf.gz -O z > msa/pooled.vcf.gz
However this is the relevant part of my header, despite the filenames I gave it. Is it just up to me to parse the mergeCommand line? Or is there a way to use bcftools query
to get the right headers after the fact?
##bcftools_mergeVersion=0.2.0-rc7-47-g02a1fb3+htslib-0.2.0-rc7-36-g6e2ebc4 ##bcftools_mergeCommand=merge -O z vcf/unfiltered/lambda_virus.fasta.wgsim.fastq.gz-lambda_virus.vcf.gz vcf/unfiltered/lambda_virus.fasta.wgsim.fastq.gz-reference.vcf.gz vcf/unfiltered/sample1.fastq.gz-lambda_virus.vcf.gz vcf/unfiltered/sample1.fastq.gz-reference.vcf.gz vcf/unfiltered/sample2.fastq.gz-lambda_virus.vcf.gz vcf/unfiltered/sample2.fastq.gz-reference.vcf.gz vcf/unfiltered/sample3.fastq.gz-lambda_virus.vcf.gz vcf/unfiltered/sample3.fastq.gz-reference.vcf.gz vcf/unfiltered/sample4.fastq.gz-lambda_virus.vcf.gz vcf/unfiltered/sample4.fastq.gz-reference.vcf.gz #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT Sample1 2:Sample1 3:Sample1 4:Sample1 5:Sample1 6:Sample1 7:Sample1 8:Sample1 9:Sample1 10:Sample1
• 7.8k views
Read more here: Source link