Question: include samples names in vcf using bcftools merge
0
gravatar for Covux
23 months ago by
Covux10
Covux10 wrote:

hello,

I have a couple of VCF files I would like to join for multi-sample SNP calling.

I use BCFtools merge

    ##bcftools_mergeVersion=1.4.1+htslib-1.4.1
##bcftools_mergeCommand=merge --force-samples sample1.bam.vcf.gz sample2.bam.vcf.gz; Date=Mon May 29 09:58:15 2017
#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  unknown 2:unknown
CG_Chr01    200 .   C   A   70.2067 .

However when everything is done the samples are all called "unknown"

this is kind of a problem for me down the road( i have a total of 24 samples) so i would like to include the original sample names in the vcf file.

I also have used the --file-list <file> option. This gives the same result.

When I use " --use-header" option I get the next error message "Segmentation fault (core dumped)"

Could someone point me in the right direction to fix this problem for me?

-edit 30/05/2017

I found out that my fastaq files don't have readsgroup.

using Picard AddOrReplaceReadGroups i assigned sample names and when i merge those files in a later step i get to see the sample names i used.

Hope this helps someone in the future. :)

hint.

if samtools view -H /path/to/my.bam | grep '^@RG' shows noting then use the step above.

Regards,

Covux

rna-seq bcftools merge • 1.2k views
ADD COMMENTlink modified 14 months ago by kachroo.priyanka0 • written 23 months ago by Covux10
0
gravatar for kachroo.priyanka
14 months ago by
kachroo.priyanka0 wrote:

In your vcf files look at the line:

CHROM POS ID REF ALT QUAL FILTER INFO FORMAT unknown

For each of your vcf files, change the "unknown" field to your sample name. Rerunning bcftools merge should output sample names.

ADD COMMENTlink written 14 months ago by kachroo.priyanka0
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: 1534 users visited in the last hour