Changing Sample Names in Merged VCF file
2
0
Entering edit mode
4.7 years ago
David_emir ▴ 500

Hi All,

I have merged about 36 .vcf tumor Files into one single merged .vcf file. Now the problem is the vendor has given the .vcf file name as the R1_XXX_T_1.vcf and sample Name in vcf as Tumor, Likewise, all sample Names in .vcf is given as Tumor. My question is, can I change the sample name in merged vcf? if yes how? Is it possible to retain file_name as sample names in the vcf?

Thanks for Help,

Dave

VCF Sample • 5.8k views
ADD COMMENT
2
Entering edit mode
4.7 years ago

Hello,

bcftools reaheder should help you here. To use it, you have to prepare a text file, where in each line you write the old and the new sample name. Or just the new sample name, but all names in the order they should appear in the vcf.

Then you can doing this

$ bcftools reheader -s names.txt in.vcf > out.vcf

fin swimmer

ADD COMMENT
1
Entering edit mode
4.7 years ago
tothepoint ▴ 930

Follow the post Rename sample name

ADD COMMENT

Login before adding your answer.

Traffic: 861 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6