This method iterates over all SAMrecords in the iterator and returns the groupstats The SAMRecordIterator is closed in this method.
This method iterates over all SAMrecords in the iterator and returns the groupstats The SAMRecordIterator is closed in this method.
A samrecord iterator containing all the reads you are interested in. (I.e after a SAMReader.query)
A GroupStats object with al the stats from the samrecords
This methods reads the stats for all records in the SamReader.
This methods reads the stats for all records in the SamReader. The samReader is not closed afterwards, so it can be reused.
A SamReader
GroupStats for all records in the SamReader.
Takes a samReader and retunrs the GroupStats for all reads in the described region
Takes a samReader and retunrs the GroupStats for all reads in the described region
a SamReader
a BedRecord describing the region
if True, only reads that originate (i.e. have their start position) in the region are counted. This is useful when scattering over regions to make sure that reads are not counted twice. One time when the start position is in the region, and one time when the end position is in the region.
Takes a samReader and returns all the stats for all unmapped reads.
Takes a samReader and returns all the stats for all unmapped reads.
a samReader
GroupStats for all unmapped reads
Write GroupStats to tsv files
Write GroupStats to tsv files
a GroupStats object
the directory where the tsv files are written.