SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
TopHat .sam output format not recognised lindseyjane Bioinformatics 22 02-14-2012 09:04 PM
sam format version in tophat output tangx_2010 RNA Sequencing 2 03-15-2011 06:28 PM
the format of output file of Maq zcrself Bioinformatics 2 03-17-2010 11:09 PM
MAQ output format m_elena_bioinfo Bioinformatics 0 12-09-2009 01:35 AM
MAQ output format seq_GA Bioinformatics 0 05-20-2009 11:43 PM

Reply
 
Thread Tools
Old 08-07-2009, 02:24 AM   #1
marcowanger
Senior Member
 
Location: Hong Kong

Join Date: Dec 2008
Posts: 350
Smile Maq output to SAM format

1> I have been using MAQ for a while. Now I would like to move on the BWA. Is there any convinent method to convert a MAQ output (.map) to SAM format so to ease comparison between MAQ and BWA?

2> Regarding the SAM format output by BWA, there is a <flag> column. I read from the manual that it's a bitwise flag. But in my BWA output I get numeric value, (e.g. 83, 99, 163, etc). How can I interpret the result?

I would really appreciate your help.
marcowanger is offline   Reply With Quote
Old 08-07-2009, 08:18 AM   #2
totalnew
Member
 
Location: Canada

Join Date: Apr 2009
Posts: 46
Default

1. There is an excutable file "maq2sam" come with samtools package to allow you convert maq out to sam format.

2. For FLAG field, if you want to parse it, simply use $FLAG & 0x01(02, 20, 20..) to determine the meaning of the FLAG bits.
totalnew is offline   Reply With Quote
Old 08-07-2009, 08:42 AM   #3
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

Quote:
Originally Posted by totalnew View Post
2. For FLAG field, if you want to parse it, simply use $FLAG & 0x01(02, 20, 20..) to determine the meaning of the FLAG bits.
The latest trunk version of samtools also has a "-X" flag to the "samtools view" command to display the flag using intelligible characters. I find this extremely useful.
nilshomer is offline   Reply With Quote
Old 08-08-2009, 11:28 AM   #4
marcowanger
Senior Member
 
Location: Hong Kong

Join Date: Dec 2008
Posts: 350
Default

Quote:
Originally Posted by totalnew View Post
1. There is an excutable file "maq2sam" come with samtools package to allow you convert maq out to sam format.

2. For FLAG field, if you want to parse it, simply use $FLAG & 0x01(02, 20, 20..) to determine the meaning of the FLAG bits.
Thank you totalnew. I have downloaded the samtools 0.1.5c. I think I will use the maq2sam-long for my 75bp long read.
marcowanger is offline   Reply With Quote
Old 08-08-2009, 11:57 AM   #5
marcowanger
Senior Member
 
Location: Hong Kong

Join Date: Dec 2008
Posts: 350
Default

Quote:
Originally Posted by nilshomer View Post
The latest trunk version of samtools also has a "-X" flag to the "samtools view" command to display the flag using intelligible characters. I find this extremely useful.
I cannot find the flag '-X' in samtools view. Am I using the old version?

ps. I am using 0.1.5c
marcowanger is offline   Reply With Quote
Old 08-08-2009, 01:46 PM   #6
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

Quote:
Originally Posted by marcowanger View Post
I cannot find the flag '-X' in samtools view. Am I using the old version?

ps. I am using 0.1.5c
Use the latest trunk version (via svn checkout). I think mine is r442.
nilshomer is offline   Reply With Quote
Old 08-08-2009, 06:27 PM   #7
marcowanger
Senior Member
 
Location: Hong Kong

Join Date: Dec 2008
Posts: 350
Default

Quote:
Originally Posted by nilshomer View Post
Use the latest trunk version (via svn checkout). I think mine is r442.
I see. I am using the r385 so I think that's the reason.

One more simple question, what type of quality score associated fastq file does BWA expects? I have searched in the manual but it just says fastq. I don't know if I should convert the my fastq file to sanger fastq first before proceeding.
marcowanger is offline   Reply With Quote
Old 08-08-2009, 06:36 PM   #8
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

Quote:
Originally Posted by marcowanger View Post
I see. I am using the r385 so I think that's the reason.

One more simple question, what type of quality score associated fastq file does BWA expects? I have searched in the manual but it just says fastq. I don't know if I should convert the my fastq file to sanger fastq first before proceeding.
It would be Sanger FASTQ, since BWA is written by Heng Li (at Sanger).
nilshomer is offline   Reply With Quote
Old 08-09-2009, 03:12 PM   #9
totalnew
Member
 
Location: Canada

Join Date: Apr 2009
Posts: 46
Default

Quote:
Originally Posted by marcowanger View Post
Thank you totalnew. I have downloaded the samtools 0.1.5c. I think I will use the maq2sam-long for my 75bp long read.
Yes, for 75bp read, you may have to use maq2sam-long, otherwise, otherwise you will get seg fault :<.

I have not downloaded new samtools, I guess it will be more handy to use samtools view -x. For quality score, nilshomer said the right, it is

$sanger_quality_char = chr($phred_quality + 33)

Last edited by totalnew; 08-10-2009 at 08:22 AM.
totalnew 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 06:13 AM.


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