SEQanswers

Go Back   SEQanswers > General



Similar Threads
Thread Thread Starter Forum Replies Last Post
Generate consensus from MultiFasta Antony03 Bioinformatics 2 11-13-2013 06:43 PM
Generate consensus sequence with Samtools mpileup? Heisman Bioinformatics 4 10-28-2013 04:57 PM
Generate consensus sequence with samtools mpileup Lilith-Elina Bioinformatics 0 04-08-2013 01:38 AM
Generate consensus sequence from BAM alignment Adam Witney General 2 09-14-2011 02:49 AM
Help needed to generate Consensus from alignment sarbashis Illumina/Solexa 0 08-10-2011 09:58 PM

Reply
 
Thread Tools
Old 10-03-2014, 06:13 AM   #1
sampie
Member
 
Location: Finland

Join Date: Jun 2014
Posts: 10
Default How to generate consensus sequence for all refs

Hi,

I have been trying to use samtools to create consensus sequences. However, it seems that conseqs.fastq (see command below) is missing consensus sequences for most reference sequences.

--- samtools command ---
samtools mpileup -uf ref.fa sorted.bam | bcftools view -cg - | /usr/share/samtools/vcfutils.pl vcf2fq > conseqs.fastq
----

In IGV, I can create consensus sequence for all references (one by one). I would like to create the consensus sequences with a command line tool like samtools. Is there a way to make samtools to produce all consensus sequences like IGV does?

Thanks
sampie is offline   Reply With Quote
Old 10-04-2014, 06:29 AM   #2
Antony03
Member
 
Location: Canada, Quebec

Join Date: Apr 2012
Posts: 53
Default

You should take a look at UGENE. I know this tool can produces consensus with a graphical interface and in command line.

http://ugene.unipro.ru
Antony03 is offline   Reply With Quote
Old 10-04-2014, 10:21 AM   #3
sampie
Member
 
Location: Finland

Join Date: Jun 2014
Posts: 10
Default

Thanks for reply! UGENE looks like a good tool. However, I was unable to find out how to build consensus sequence with UGENE command line. Can I have an example of a command that can be used to build consensus sequences from ref.fasta and sorted.bam files?
sampie is offline   Reply With Quote
Old 10-07-2014, 05:06 AM   #4
sampie
Member
 
Location: Finland

Join Date: Jun 2014
Posts: 10
Default

Hi,

I tried to isolate a ref sequence and try with that. So, I have ref.fasta with only one sequence. I have also sorted.bam which is an alignment against the ref.fasta. It seems samtools is not working even in case of just one reference.

Samtools gives an empty mpileup (that is no lines after "#CHROM POS ID..." line) with command: samtools mpileup -uf ref.fasta sorted.bam | bcftools view -cg -

However, IGV is able to give a consensus sequence (see below). The consensus sequence has only a small sequence (ACGT) portions. Could there be somekind of filtering attached to samtools mpileup, which prevents it from giving the wanted consensus sequence?

Thanks

NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNTCACCAGGGC
GACGATGCGTAGCCGGCCTGAGAGGGTGGACGGCCACACTGGGACTGAGACACGGCCCAGACTCCTACGGGAGGCAGCAGTA
GGGAATTTTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCAATAAGTATCCCGCCTGGGGAGTACGG
CCGCAAGGYTGAAACTCAAAGGAATTGACGGGGGCCCGCACAAGCGGTGGAGYATGTGGTTTAATTCGAMGCAACGCGAAGAA
CCTTACCAGGTCTTGACATCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

Last edited by sampie; 10-07-2014 at 05:18 AM.
sampie 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 09:15 PM.


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