SNP calling with SAMtools on multiple samples
2
0
Entering edit mode
5.7 years ago
madeira.ag • 0

Hello.

I found similar questions here, but couldnt find exactly what I am searching for.

I have several (+180) .bam files, each from a different sample. I will proceed to SNP calling with SAMtools/bcftools. I need to obtain a single .vcf file with all my samples on it. Should I merge all my .bam files and do the SNP calling once, or should I do the SNP calling for each sample and then merge all the .vcf files?

Thanks in advance!

SNP samtools vcf bam • 6.0k views
ADD COMMENT
2
Entering edit mode
5.7 years ago

you call all the bams with one call of bcftools mpileup https://samtools.github.io/bcftools/bcftools.html#mpileup

 -b, --bam-list FILE
    List of input alignment files, one file per line [null]
ADD COMMENT
0
Entering edit mode

Thanks! This will output a single .vcf file, with all the samples?

ADD REPLY
0
Entering edit mode

Thanks! This will output a single .vcf file, with all the samples?

yes.

ADD REPLY
0
Entering edit mode
5.6 years ago
Begali • 0

Hi @Pierre Lindenbaum

how if I merged all bam files in one single bam that containll samples with their RG tag, then call varaints with samtools and bcftools

Thanks for your attention

ADD COMMENT
0
Entering edit mode

You don't need to change anything, just feed it the merged bam. From the bcftools docs:

"Individuals are identified from the SM tags in the @RG header lines. Multiple individuals can be pooled in one alignment file, also one individual can be separated into multiple files. If sample identifiers are absent, each input file is regarded as one sample."

ADD REPLY

Login before adding your answer.

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