Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
about SAM format: does QNAME contain sample information? mandova Bioinformatics 7 08-26-2011 11:01 PM
latest SAM format: did the meanings of read and fragment get swapped? d f Bioinformatics 2 08-04-2011 08:34 AM
Bowtie changes read names in SAM output ashish Bioinformatics 9 07-22-2011 01:33 PM
read group in SAM format yinshe Bioinformatics 2 02-11-2011 04:14 AM
How to find structure variations from paired end sequencing in SAM format jfshao1984 Bioinformatics 0 08-21-2009 06:38 AM

Thread Tools
Old 06-30-2010, 01:26 AM   #1
Junior Member
Location: Toronto

Join Date: Jun 2010
Posts: 7
Default Paired read names / SAM qname format

Hi everyone,
I am trying to figure out what possible paired read name formats are in use and good to support for open source alignment programs. The most common paired read name format i encounter is something like the following,
Is this the only format used by different sequencing platforms? Are there other formats such as,
Also with respect to SAM format, does anyone know what the proper query name for these reads should be?
Most aligners that I have tried seem to agree that for paired reads that end in "/1" or "/2", these last two characters are truncated to get the SAM query name.
For example the first read pair would be reported as,
But the second read pair would have two query names,
READ_B:1 and READ_B:2 in the SAM file
I was thinking that maybe the safest approach would be to find the largest common prefix and truncate there to get the pair read name. But I am not sure if this will always work, for example, if the read names are,
The pair read names based on largest common prefix would be,
Where as most aligners would report two separate names as,
READ_C_Z12411 and READ_Z12516
Thanks for the help!

misko is offline   Reply With Quote
Old 06-30-2010, 01:52 AM   #2
Senior Member
Location: Cambridge, UK

Join Date: Jul 2008
Posts: 146

As you've observed, Sam QNAME isn't what traditional assemblers and viewers refer to as a read name. Instead it's really the template name - in your example qname is READ_A or READ_B. I think the automatic detection of /1 and /2 to trim down a read-name to a qname is there simply because /1 and /2 was the MAQ convention. Ideally no one should rely on this convention now.

A common prefix is prone to error too. When dealing with fastq there's a huge variety of options:

- 1 fastq line per template, with an implicit assumption we chop in half to get both reads (the original illumina format IIRC)

- 1 fastq file with fwd and rev reads alternating, so they always come in pairs.

- 2 fastq files with each end stored in its own file.

- 1 fastq file for single-ended data. This obviously causes confusion with the first two conventions.

Every aligner seems to want something marginally different, and fastq frankly is hopeless as a format for embedding such meta data so it's tricky for tools to work out which read layout you use without either explicit command line options or trying to "be clever". In my experience that nearly always ends up shooting you in the foot sooner or later.

As for SAM. I'd like to see the true read suffix (or entire name if inappropriate) having a standard auxillary key:value tag to go from template names back to the original read names. Adding that and the ability to have more than 2 reads per qname and we gain the ability to use SAM for mixed assemblies with capillary finishing reads in it.

jkbonfield is offline   Reply With Quote
Old 06-30-2010, 11:14 AM   #3
Junior Member
Location: Toronto

Join Date: Jun 2010
Posts: 7

Thanks for the answer, this helps clarify
misko 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 09:03 PM.

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