Skip to content

Instantly share code, notes, and snippets.

@terrycojones
Created July 19, 2014 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save terrycojones/a8b786067e2c27280371 to your computer and use it in GitHub Desktop.
Save terrycojones/a8b786067e2c27280371 to your computer and use it in GitHub Desktop.
class ReadHit(object):
"""
Holds information about a single read hit.
@param read: A C{Read} instance.
@param alignments: A C{list} of alignments. Each alignment is a C{dict} of
the following form:
{
"hsps": [
{
"score": 293.432,
"frame": [ 1, 1 ], # Optional, used if nucleotides are involved.
"readSubsequence": "CGCC",
"readEnd": 492,
"readStart": 31,
"readEndInHit": 2926446,
"readStartInHit": 2925990,
"hitSubsequence": "CGCC",
"hitEnd": 2926446,
"hitStart": 2925990
}
],
"length": 5371077,
"title": "gi|2577609|dbj|AP01960.1| Escherichia coli DNA"
}
"""
def __init__(self, read, alignments):
self.read = read
self.alignments = alignments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment