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?
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. :)
if samtools view -H /path/to/my.bam | grep '^@RG' shows noting then use the step above.