SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Generate consensus sequence with Samtools mpileup? Heisman Bioinformatics 4 10-28-2013 04:57 PM
Samtools mpileup generate different SNP result every run? edge Bioinformatics 8 12-20-2012 11:53 AM
samtools mpileup consensus calls A instead of a gap StefanP Bioinformatics 6 12-01-2012 05:55 AM
Problem calling consensus sequence with Samtools mpileup? Lspoor Bioinformatics 3 10-24-2011 07:43 AM
Generate consensus sequence from BAM alignment Adam Witney General 2 09-14-2011 02:49 AM

Reply
 
Thread Tools
Old 04-08-2013, 01:38 AM   #1
Lilith-Elina
Junior Member
 
Location: Braunschweig, Germany

Join Date: Oct 2011
Posts: 4
Default Generate consensus sequence with samtools mpileup

Hi there,

I've been using this command to create consensus sequences for my BAM files, as suggested on the samtools sourceforge page:
Code:
samtools mpileup -uf ref.fa aln.bam | bcftools view -cg - | vcfutils.pl vcf2fq > cns.fq
It works fine and at first I was happy with the results.

Later on when I used the consensus sequence for further analysis, though, I started having problems because one read is enough for samtools to decide that a certain base or sequence is right.
What I would like to do is restrict the consensus creation to positions with a coverage of three or more reads (to start with), but there seems to be no option for that.

I tried using -l and a list of positions for which I know they have enough coverage, but got an "Use of uninitialized value in length" error. Could someone please tell me in which format my list of positions should be? I read somewhere it should be space delimited, but that doesn't seem to work. Or am I doing something else wrong?
Lilith-Elina is offline   Reply With Quote
Reply

Tags
consensus, mpileup, regions, samtools

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 10:50 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO