Your understanding is incorrect. Bit 2 defines whether a pair of alignments
is properly paired. If that bit is set, then an alignment is properly
paired. If your aligner outputs incorrect flags then samtools can't know
that. If you tell your aligner that you have the wrong library type then
samtools can't know that. If this is a typical illumina paired-end dataset,
then either your aligner is broken or you used it incorrectly. Samtools is
only telling you what the flags say.
Devon
--
Devon Ryan, Ph.D.
Email: dpr...@dpryan.com
Laboratory for Molecular and Cellular Cognition
German Centre for Neurodegenerative Diseases (DZNE)
Ludwig-Erhard-Allee 2
53175 Bonn
Germany
<devon.r...@dzne.de>
On Mon, Feb 9, 2015 at 8:40 PM, Xiao Li <lixia...@gmail.com> wrote:
> Hi Devon,
>
> Thank you very much for your answer!
>
> I agreed that these reads have a right insert size (the ones not are the
> 65 and 129), but I thought that 67/131 reads have the wrong orientation
> (both reads are mapped to the forward strand in this case). To my
> understanding, only the reads with flags of 99/147 or 83/163 are those
> properly paired (with right insert size and orientation). Please correct me
> if I am wrong! Thank you very much!
>
> Best,
>
> Xiao
>
> 2015-02-09 10:39 GMT-08:00 Devon Ryan <dpr...@dpryan.com>:
>
> Hi Xiao,
>>
>> Those flags explicitly indicate that the alignments are properly paired.
>> The non-properly paired versions of those would be 65 and 129. You may find
>> the "Explain SAM flags" page useful:
>> https://broadinstitute.github.io/picard/explain-flags.html
>>
>> Best,
>> Devon
>>
>> --
>> Devon Ryan, Ph.D.
>> Email: dpr...@dpryan.com
>> Laboratory for Molecular and Cellular Cognition
>> German Centre for Neurodegenerative Diseases (DZNE)
>> Ludwig-Erhard-Allee 2
>> 53175 Bonn
>> Germany
>> <devon.r...@dzne.de>
>>
>> On Mon, Feb 9, 2015 at 7:08 PM, Xiao Li <lixia...@gmail.com> wrote:
>>
>>> Dear samtools developer,
>>>
>>> Thank you for developing samtools! It is a very useful tool for my
>>> research!
>>>
>>> I just have a quick question relevant to flagstat and it is very likely
>>> that I misunderstood something. I realized that it actually classifies
>>> reads with flag 67 and 131 as the "properly paired" reads in the report.
>>> However, my understanding is that they are the reads mapped within the
>>> insert size but wrong orientation. Did I misunderstood something here or
>>> used the wrong command (I used samtools flagstat input-bam-file >
>>> output-report) ? Thank you very much for your help!
>>>
>>> Best,
>>>
>>> Xiao
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Dive into the World of Parallel Programming. The Go Parallel Website,
>>> sponsored by Intel and developed in partnership with Slashdot Media, is
>>> your
>>> hub for all things parallel software development, from weekly thought
>>> leadership blogs to news, videos, case studies, tutorials and more. Take
>>> a
>>> look and join the conversation now. http://goparallel.sourceforge.net/
>>> _______________________________________________
>>> Samtools-help mailing list
>>> Samtools-help@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/samtools-help
>>>
>>>
>>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help