How to add sample name to the VCF files
0
0
Entering edit mode
5.7 years ago
sm.hashemin ▴ 90

Dear people I have used lofreq for variant calling. My VCF files do no have sample name column.

> #CHROM    POS ID  REF ALT QUAL    FILTER  INFO
chr1    1120488 .   A   C   2383    PASS    DP=150;AF=0.513333;SB=0;DP4=29,44,30,47;ANNOVAR_DATE=2018-04-16;ExAC_ALL=0.0064;ExAC_AFR=0.0658;ExAC_AMR=0.0029;ExAC_EAS=0;ExAC_FIN=0;ExAC_NFE=0.0008;ExAC_OTH=0.0035;ExAC_SAS=6.118e-05;Func.refGene=exonic;Gene.refGene=TTLL10;GeneDetail.refGene=.;ExonicFunc.refGene=nonsynonymous_SNV;AAChange.refGene=TTLL10:NM_153254:exon9:c.A1181C:p.K394T,TTLL10:NM_001130045:exon13:c.A1400C:p.K467T;ALLELE_END
>

I will have to input them into PLINK but unfortunatly I cant even using allow-no-samples.

I would really appreaciate if some one could help me turning my VCFs into normal! by adding sample name column.

I also can not using the merge function of BCFtools or VCFtools.

Best regards Mo

PLINK VCF BCFtools VCFtools lofreq • 3.4k views
ADD COMMENT
0
Entering edit mode

You may have to do the variant calling step again, unless you can deduce the exact sequence of samples from the variant calling command you used (which will still be risky). I don't know of any tool that would produce such a VCF file as yours.

ADD REPLY
0
Entering edit mode

Thanks for the answer. I have done the variant calling one by one, therfore I do have one vcf file per one bam (samples). Could I simply add the sample name column?

ADD REPLY
0
Entering edit mode

You definitely could, as long as you're absolutely sure which BAM each VCF corresponds to. Log this activity somewhere (preferably in your lab notebook as well as a shared location and in a README alongside the files) and keep a record so 6 months down the line, you and every other stakeholder involved know what logic you used to make this decision.

ADD REPLY
0
Entering edit mode

:) it is as simple as this: sample1.bam has a sample1.vcf file.

ADD REPLY
0
Entering edit mode

Document it. All it will take is for a vcf-merge operation or even a simple rename to lose track. Pick the @SN ID from samtools view -H sample.BAM and use it as the sample ID for the VCF data. Plink kinda complains if that's not the case.

ADD REPLY

Login before adding your answer.

Traffic: 1851 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