Opened 6 years ago

Closed 6 years ago

#852 closed request (fixed)

function to access 'samtools idxstats' stats

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.14
Component: omic Version:
Keywords: Cc:

Description

samtools idxstats provides number of mapped reads, number of unmapped reads for each chr plus number of (unmapped) reads with no chr. Add this as function in 'InBamFile'.

Change History (4)

comment:1 Changed 6 years ago by Peter

Heard on samtools list:

Look at hts_idx_get_stat(), which is what samtools idxstats uses to extract this information from an index. If your file is not indexed, you'll have to write the usual loop to read through the whole file and count them.

http://sourceforge.net/p/samtools/mailman/message/34800215/

comment:2 Changed 6 years ago by Peter

Status: newassigned

comment:3 Changed 6 years ago by Peter

(In [3464]) implementing idxstats functions against libhts. refs #852

comment:4 Changed 6 years ago by Peter

Resolution: fixed
Status: assignedclosed

(In [3484]) implement InBamFile? functions mapped, unmapped, and n_no_coordinate for libbam case. The code is hackish but see comment in BamFile?.cc for rationale. closes #852

Note: See TracTickets for help on using tickets.