Hi Margaret,

The short (unhelpful) answer is that "samtools idxstats" does not decide
this - it just reports the numbers already recoded in the *.bai index file
(see the SAM/BAM specification for where these numbers are held).

The numbers would be computed by "samtools index" where the FLAG
determines if a read is mapped (as per the specification). Unmapped
but placed reads are also counted (they have a POS and RNAME, but
their FLAG says unmapped - typically used for the unmapped partner
of a mapped read as per best practises in the SAM/BAM specification,
in order to keep the reads near each other in the file). Unmapped
reads with no coordinates get counted against the final dummy "*"
reference line shown in "samtols idxstats".

Peter


On Fri, Feb 26, 2016 at 11:07 PM, Margaret Linan MPH <mli...@asu.edu> wrote:
> Hi-
>
> Does anyone know how IDXSTATS decides that a read is mapped, unmapped
> and off-target? Does it only pay attention to the flags in the sam file?
>
> Thank you,
> Margaret
>
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> Samtools-help mailing list
> Samtools-help@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/samtools-help
>

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to