Question: Changing Sample Names in Merged VCF file
0
gravatar for David_emir
8 months ago by
David_emir380
India
David_emir380 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 • 700 views
ADD COMMENTlink modified 8 months ago by finswimmer13k • written 8 months ago by David_emir380
2
gravatar for finswimmer
8 months 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 8 months ago by finswimmer13k
1
gravatar for devarora
8 months ago by
devarora240
SouthKorea
devarora240 wrote:

Follow the post Rename sample name

ADD COMMENTlink written 8 months ago by devarora240
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: 1676 users visited in the last hour