Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about samtools view -r? syedsaid Bioinformatics 0 09-29-2011 03:00 AM
Samtools view michalkovac Bioinformatics 2 07-19-2011 06:25 AM
samtools view error after reheader Hkins552 Bioinformatics 3 07-17-2011 11:32 AM
Samtools view error message Jan Bioinformatics 4 06-07-2010 03:45 PM
Duplicates in samtools view when using ranges jdrum00 Bioinformatics 5 12-17-2009 12:48 PM

Thread Tools
Old 02-23-2011, 03:03 PM   #1
Location: St. Louis

Join Date: Jun 2010
Posts: 10
Default samtools view without header

Hi All,

I'm having trouble filtered MAQ aligned reads from a sam file with no header and converting to BAM. I've tried created the fai file of the reference as suggested by the SAMTOOLS faq, but to no avail.

When I use the following command:
samtools view -S lane1.normal.sam -T reduced.reference.fa -q 1

I get an error: "Parse error at line 1: missing colon in auxiliary data"

Does anyone have any suggestions?

Thanks a lot!
Gen2007 is offline   Reply With Quote
Old 02-24-2011, 12:49 AM   #2
Junior Member
Location: usa

Join Date: Feb 2011
Posts: 4

you can use samtools view -S xx.sam -t chr.list -q 1 > xx.bam.
asangqi is offline   Reply With Quote
Old 02-24-2011, 09:02 AM   #3
Location: St. Louis

Join Date: Jun 2010
Posts: 10

i implemented the command you suggested, asanggi:

samtools view -S xx.sam -t reference.fa.fai -q 1 > xx.bam

but i still get the same error.

thanks for your help!

Last edited by Gen2007; 02-24-2011 at 09:16 AM.
Gen2007 is offline   Reply With Quote
Old 03-21-2011, 02:45 AM   #4
Location: Germany

Join Date: Oct 2009
Posts: 24

Perhaps there is a problem with trailing tabs?
I solved a similar problem using

sed 's/[ \t]*$//g' samfile

tmanke is offline   Reply With Quote
Old 11-16-2011, 10:58 AM   #5
Junior Member
Location: USA

Join Date: Nov 2011
Posts: 1

I had the same problem, but I could solve with two following command

sed 's/[ \t]*$//g' samfile (same with Thomas)
tr -d \\r < samfile > samfile.2

tanakky 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 10:33 PM.

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