include samples names in vcf using bcftools merge
1
0
Entering edit mode
6.9 years ago
Covux ▴ 10

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

bcftools merge RNA-Seq • 3.1k views
ADD COMMENT
1
Entering edit mode
6.2 years ago

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 COMMENT

Login before adding your answer.

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