Question: What Better Way To Get Consensus Sequence Of Mapping Against Reference Genome Using Samtools Mpileup?
2
gravatar for thiagomafra
5.8 years ago by
thiagomafra70
Brazil
thiagomafra70 wrote:

Hi people,

I have a set of reads mapped against a reference genome and need take consensus sequence using samtools mpileup. I used the command:

samtools mpileup -AuDS -Q 10 -q 10 -d 10000 -f <reference.fasta> <file.sorted.bam> | bcftools view -gc - | vcfutils.pl vcf2fq | perl fastq2fasta.pl cns.fasta &

Someone uses other parameters in samtools mpileup?

consensus reference mpileup • 10k views
ADD COMMENTlink modified 5.7 years ago by Jorge Amigo11k • written 5.8 years ago by thiagomafra70
1

check this similar post: How to generate a consensus fasta sequence from SAM tools pileup?

ADD REPLYlink written 5.8 years ago by Rm7.8k
2
gravatar for Jorge Amigo
5.7 years ago by
Jorge Amigo11k
Santiago de Compostela, Spain
Jorge Amigo11k wrote:

you could also try not using samtools but GATK instead, which allows selecting better calling algorithms than samtools (UnifiedGenotyper and HaplotypeCaller). the underlying idea would be first to perform the variant calling, and then to generate the fasta file:

java -jar GenomeAnalysisTK.jar -R hg19.fa -T HaplotypeCaller -I sample.bam -o sample.vcf
java -jar GenomeAnalysisTK.jar -R hg19.fa -T FastaAlternateReferenceMaker -o sample.fa --variant sample.vcf
ADD COMMENTlink modified 5.7 years ago • written 5.7 years ago by Jorge Amigo11k
1
gravatar for Joseph Hughes
5.7 years ago by
Joseph Hughes2.7k
Scotland, UK
Joseph Hughes2.7k wrote:

I use the following command in samtools Version: 0.1.18:

samtools mpileup -E -uf <reference.fasta> <file.sorted.bam> | bcftools view -cg - | vcfutils.pl vcf2fq > cns.fastq

The -E option helps with sensitivity especially if you have sites with multiple nucleotide polymorphisms.

ADD COMMENTlink written 5.7 years ago by Joseph Hughes2.7k
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: 1940 users visited in the last hour