Skip to content

Instantly share code, notes, and snippets.

@terrycojones
Last active August 29, 2015 14:08
Show Gist options
  • Save terrycojones/ff2d1052c126a28eca2d to your computer and use it in GitHub Desktop.
Save terrycojones/ff2d1052c126a28eca2d to your computer and use it in GitHub Desktop.
def walkHSP(self, hsp):
"""
Provide information about exactly how a read matches a subject, as
specified by C{hsp}.
@return: A generator that yields (offset, residue, inMatch) tuples.
The offset is the offset into the matched subject. The residue is
the base in the read (which might be '-' to indicate a gap in the
read was aligned with the subject at this offset). inMatch will be
C{True} for residues that are part of the HSP match, and C{False}
for the (possibly non-existent) parts of the read that fall outside
the HSP (aka, the "whiskers" in an alignment graph).
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment