Go Back   SEQanswers > Bioinformatics > Bioinformatics
Similar Threads
Thread Thread Starter Forum Replies Last Post
Specifying the region with "samtools mpileup -r " changes the output calls vplagnol Bioinformatics 0 06-07-2012 04:26 AM
SAMTools region switch ashkot Bioinformatics 3 01-04-2012 12:31 AM
mpileup: specified region truncated. lbthrice Bioinformatics 3 11-15-2011 12:59 PM
Samtools 'import' and lost read group header mrxcm3 Bioinformatics 2 10-31-2010 10:05 AM
samtools specific region dnusol Bioinformatics 10 03-19-2010 11:08 AM

Thread Tools
Old 11-29-2012, 10:37 AM   #1
Location: Germany

Join Date: Oct 2012
Posts: 48
Default Samtools mpileup - how to define the region (I am lost!)

Hi everyone!

After busily mapping my tons of reads and generating and merging BAM files I have reached the next level of confusion...

I wanna try some consensus/SNP calling; but only for a region (using the -r option); or in my case; a scaffold.

My ref genome is the result of a shotgun assembly and contains various scaffolds.

They are named as follows (as an example):


The 123456789 are just models of the hell do I select one of the scaffolds as a region?

No matter what I put in, I get the wrong scaffold (always the first in the genome) as output... or I get BAM parsing errors!
TabeaK is offline   Reply With Quote
Old 11-29-2012, 12:49 PM   #2
Peter (Biopython etc)
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543

The pipe characters (vertical bars) may need to be escaped (written as \| or slash pipe) or the region argument enclosed in quotes - otherwise the pipe symbol has the meaning at the command line of piping to the next command.

Perhaps you could show us an actual example copy and pasted from your terminal?
maubp is offline   Reply With Quote
Old 11-29-2012, 01:17 PM   #3
Location: Germany

Join Date: Oct 2012
Posts: 48

OMG! Of course! That is such a simple thing...I need to go to bed.

Thank you so much maubp! Enclosing the entire scaffold name in "" worked like a charm!
TabeaK is offline   Reply With Quote

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 07:53 AM.

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