Skip to content

Instantly share code, notes, and snippets.

@dalexander
Created April 13, 2013 19:48
Show Gist options
  • Save dalexander/5379781 to your computer and use it in GitHub Desktop.
Save dalexander/5379781 to your computer and use it in GitHub Desktop.
minor BasH5Reader change proposal
Using the BasH5Reader is simple:
>>> b = BasH5Reader("m1122...bas.h5") # Load the file
>>> zmw = b[9] # Get Zmw object(s) by slicing on holenumber(s)
>>> myRead = zmw.subreads[0] # Get ZmwRead object
>>> myRead.basecalls()
"GATTACA"
>>> myRead.QualityValue()
array([5, 6, 3, 4, 8, 8, 1])
My change proposal is to unify the naming of the ZmwRead accessors in
the Zmw class, and to provide the following principle:
* zmw.read, zmw.subReads, zmw.ccsRead are all HQ clipped;
* zmw[start:end] (and zmw[:]) is for the power user who may want to
go outside the HQ region.
Here is the change description:
| Old | New | Description |
|----------------+------------------------------+------------------------------------------|
| zmw.read() | zmw.read or zmw.unrolledRead | property returning entire read sequence, |
| | (decision needed) | clipped to the HQ region |
| | | |
| zmw.read(s, e) | zmw[s:e] | Access a custom subslice of the read. |
| | zmw[:] (to get everything) | This is the only way to get data from |
| | | outside the HQ region---intended for |
| | | power users. |
| | | |
| zmw.subreads | zmw.subReads | change name for consistency |
| | | |
| zmw.ccsRead | zmw.ccsRead | no change |
| | | |
| | | |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment