SEQanswers

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

Reply
 
Thread Tools
Old 02-23-2011, 03:03 PM   #1
Gen2007
Member
 
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
asangqi
Junior Member
 
Location: usa

Join Date: Feb 2011
Posts: 4
Default

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
Gen2007
Member
 
Location: St. Louis

Join Date: Jun 2010
Posts: 10
Default

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
tmanke
Member
 
Location: Germany

Join Date: Oct 2009
Posts: 24
Default

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

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

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

Join Date: Nov 2011
Posts: 1
Default

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

Thanks
Yoshiaki
tanakky 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 07:47 PM.


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