Question: Changing Sample Names in Merged VCF file
0
gravatar for David_emir
4 days ago by
David_emir370
India
David_emir370 wrote:

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 • 64 views
ADD COMMENTlink modified 4 days ago by finswimmer13k • written 4 days ago by David_emir370
1
gravatar for finswimmer
4 days ago by
finswimmer13k
Germany
finswimmer13k wrote:

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 COMMENTlink written 4 days ago by finswimmer13k
0
gravatar for devarora
4 days ago by
devarora50
SouthKorea
devarora50 wrote:

Follow the post Rename sample name

ADD COMMENTlink written 4 days ago by devarora50
Please log in to add an answer.

Help
Access

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