SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Consensus sequence, How and where ? fuad193 Complete Genomics 0 10-30-2012 04:52 AM
vcfutils to get consensus sequence nupurgupta Bioinformatics 3 07-26-2012 04:05 PM
how to use samtools to get consensus sequence? f0415007 Bioinformatics 1 09-26-2011 11:59 PM
Consensus sequence nitinkumar Bioinformatics 0 05-21-2011 06:38 PM
.ace consensus sequence jgibbons1 Bioinformatics 15 02-09-2010 02:40 PM

Reply
 
Thread Tools
Old 12-05-2013, 05:50 AM   #1
mmmm
Senior Member
 
Location: UK

Join Date: Jul 2013
Posts: 131
Default consensus sequence

have mapped illumina PE reads to the reference genome using BWA and now, would like to get a consensus sequence of the mapped reads- can samtools be used on the aligned bam file??
mmmm is offline   Reply With Quote
Old 12-05-2013, 06:06 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,856
Default

See this thread: http://seqanswers.com/forums/showthread.php?t=14565 (and the other thread mentioned in #4 there).
GenoMax is offline   Reply With Quote
Old 12-05-2013, 06:31 AM   #3
mmmm
Senior Member
 
Location: UK

Join Date: Jul 2013
Posts: 131
Default

samtools mpileup -uf /<reference.fasta> <aligned.bam> | bcftools view -bcg - > <intermediate.bcf>

gave me an error: -bash: syntax error near unexpected token "<

I was wondering BCFtools are part of samtools, right?- is this the correct comand?
mmmm is offline   Reply With Quote
Old 12-05-2013, 09:28 AM   #4
swbarnes2
Senior Member
 
Location: San Diego

Join Date: May 2008
Posts: 912
Default

You don't literally use < > around the file names.
swbarnes2 is offline   Reply With Quote
Old 12-06-2013, 03:26 AM   #5
mmmm
Senior Member
 
Location: UK

Join Date: Jul 2013
Posts: 131
Default

has anyone tried this command to generate a consensus file

samtools mpileup -uf reference.fasta sorted_alignment.bam | bcftools view -cg - | vcfutils.pl vcf2fq

but where should I put the output file name???
mmmm is offline   Reply With Quote
Old 12-06-2013, 03:54 AM   #6
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,856
Default

Quote:
Originally Posted by mmmm View Post

but where should I put the output file name???
Code:
$ samtools mpileup -uf reference.fasta sorted_alignment.bam | bcftools view -cg - | vcfutils.pl vcf2fq > output_file_name
GenoMax is offline   Reply With Quote
Old 12-06-2013, 04:12 AM   #7
mmmm
Senior Member
 
Location: UK

Join Date: Jul 2013
Posts: 131
Default

yes- thanks.
I will ignore the abnormal shapes that appeared after the sequence
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mmmm is offline   Reply With Quote
Reply

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 08:35 AM.


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