oh ok. I'll adjust that parameter!
Hi,
I'm running bcftools to create a vcf. However, I get:
[mpileup] 4 samples in 28 input files
The three it counts are all sorted bamfiles (samtools), but somehow it doesn't take into account the others for which I removed duplicates with picard and performed re-aliging with GATK.
Any ideas what the issue is?
Thanks, Stefan
1 answer
samtools/bcftools recognize the different samples by the sample name given in the read group of each bam file. It is very likely that you have multiple files with the same sample name in the read group.
You can have a look at the read groups with:
$ samtools view -H sample.bam | grep '@RG'
The sample name is introduced by: SM:
fin swimmer
Hello stefanprost.research ,
If an answer/comment was helpful, you should upvote it; if the answer/comment resolved your question, you should mark it as accepted. You can accept more than one if they work.
Log in to answer this question.
Hi stefanprost.research, welcome to Biostars. Please post the command line and an abstract of the output in order to provide more details. Please consider going once through How To Ask Good Questions On Technical And Scientific Forums. Cheers!
The command was either:
or
Here's an example output line:
It only shows stats for 4 of the 28 bam files I imported. I have run the first command successfully before, but my hard-disk crashed. I reused the same command as before, but with new versions of the tools involved and the reads remapped to the same reference.
Cheers and thanks, Stefan
show use the header starting with #CROM of the VCF line. Tell us how you set the 28 distinct READ-GROUPs in your 28 bam files
I used picard. I reran them individually to make sure they do have different IDs, but now I get 1 sample out of 21 files (I used a slightly smaller set).
Header is this:
It used to show the three just sorted bam files.
Any ideas?
thanks!
Cheers, Stefan