SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samtools-mpileup aslihan Bioinformatics 3 01-18-2017 10:53 PM
samtools mpileup: -B or not to -B? yenhuahuang1 Bioinformatics 4 03-19-2013 03:21 AM
samtools mpileup Ling1 Bioinformatics 1 05-24-2012 10:09 AM
samtools mpileup hv4 Bioinformatics 2 10-29-2011 01:21 PM
samtools mpileup bair Bioinformatics 2 03-03-2011 03:38 AM

Reply
 
Thread Tools
Old 09-29-2011, 04:09 AM   #1
mikheyev
Junior Member
 
Location: Okinawa, Japan

Join Date: Dec 2009
Posts: 8
Question Many Ns in samtools mpileup

Hi,

I am trying to wrangle samtools into giving me a consensus, using reads mapped with bwa to a reference. After I generate a BAM, the results look pretty good using samtools tview:


So, there is good coverage, etc.

Now, when I try to generat a consensus, for example, by

Code:
samtools  pileup -6Aug sorted.bam |bcftools view -cg - | vcfutils.pl vcf2fq
I get a whole lot of Ns in my consensus

Code:
@gi|159883886|emb|CU329670.1|
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnnnnnn
+
[email protected]@@@@@@@@@CEEEHHHHHHHHHHHHHHNKKNKQQQWWWWWWccux{{{{{~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~
I swear, I tried every combination of samtools and bcftools I could think of. Adding a reference sequence also doesn't make any difference. Any ideas would be most very much appreciated.

Sasha
mikheyev is offline   Reply With Quote
Old 09-29-2011, 09:47 AM   #2
macrowave
Member
 
Location: New York

Join Date: May 2010
Posts: 13
Default

You didn't provide the reference sequences when calling pileup? If that's the case, all the ref bases are Ns and you probably wouldn't get the right consensus.
macrowave is offline   Reply With Quote
Old 09-29-2011, 03:24 PM   #3
mikheyev
Junior Member
 
Location: Okinawa, Japan

Join Date: Dec 2009
Posts: 8
Default

Unfortunately, having a reference doesn't help:
Code:
samtools  mpileup -6Augf sequence.fasta -r "gi|159883886|emb|CU329670.1|:1-200"  sorted.bam |bcftools view -cg - | vcfutils.pl vcf2fq

@gi|159883886|emb|CU329670.1|
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnnnnnn
+
[email protected]@@@@@@@@@CEEEHHHHHHHHHHHHHHNKKNKQQQWWWWWWccux{{{{{~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~
mikheyev is offline   Reply With Quote
Old 09-29-2011, 04:12 PM   #4
Tally
Member
 
Location: Sydney

Join Date: Aug 2011
Posts: 12
Default

I'm not sure about your pileup issue, but see the thread "samtools tview reference sequence" regarding the string of N's in your tview. For me, this was caused by having a colon character in the reference sequence fasta header.
Tally is offline   Reply With Quote
Old 09-29-2011, 06:31 PM   #5
mikheyev
Junior Member
 
Location: Okinawa, Japan

Join Date: Dec 2009
Posts: 8
Default

I think I figured out what it was -- I had an old from a previous bam file hanging around. I re-indexed the file and everything was OK.
mikheyev is offline   Reply With Quote
Old 03-22-2012, 09:56 AM   #6
cwisch88
Member
 
Location: St. Louis

Join Date: Jan 2012
Posts: 15
Default

Quote:
Originally Posted by Tally View Post
For me, this was caused by having a colon character in the reference sequence fasta header.
Wow, this sentence has solved a problem I have been having all morning.Thanks so much!
cwisch88 is offline   Reply With Quote
Reply

Tags
alignment, consensus, illumina, paired end, snp

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:04 AM.


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