Skip to content
Browse files

Rename HSP properties for multiple fragments into using '*_all'

  • Loading branch information...
1 parent 1158e19 commit ffe1da9e5bfae7c85af106bdcfc775308a52905f @bow bow committed
View
42 Bio/SearchIO/BlatIO.py
@@ -100,13 +100,13 @@
| | hit_gapopen_num | T gap count, number of hit gap |
| | | inserts |
| +-------------------------+-----------------------------------+
-| | hit_spans | blockSizes, sizes of each |
+| | hit_span_all | blockSizes, sizes of each |
| | | fragment |
| +-------------------------+-----------------------------------+
| | hit_start | T start, start coordinate of the |
| | | first hit fragment |
| +-------------------------+-----------------------------------+
-| | hit_starts | tStarts, start coordinate of each |
+| | hit_start_all | tStarts, start coordinate of each |
| | | hit fragment |
| +-------------------------+-----------------------------------+
| | match_num | match, number of non-repeat |
@@ -128,13 +128,13 @@
| | query_gapopen_num | Q gap count, number of query gap |
| | | inserts |
| +-------------------------+-----------------------------------+
-| | query_spans | blockSizes, sizes of each |
+| | query_span_all | blockSizes, sizes of each |
| | | fragment |
| +-------------------------+-----------------------------------+
| | query_start | Q start, start coordinate of the |
| | | first query block |
| +-------------------------+-----------------------------------+
-| | query_starts | qStarts, start coordinate of each |
+| | query_start_all | qStarts, start coordinate of each |
| | | query fragment |
| +-------------------------+-----------------------------------+
| | `len`* | block count, the number of blocks |
@@ -308,20 +308,20 @@ def _create_hsp(hid, qid, psl):
# set query and hit coords
# this assumes each block has no gaps (which seems to be the case)
assert len(qstarts) == len(hstarts) == len(psl['blocksizes'])
- query_ranges = zip(qstarts, [x + y for x, y in \
+ query_range_all = zip(qstarts, [x + y for x, y in \
zip(qstarts, psl['blocksizes'])])
- hit_ranges = zip(hstarts, [x + y for x, y in \
+ hit_range_all = zip(hstarts, [x + y for x, y in \
zip(hstarts, psl['blocksizes'])])
# check length of sequences and coordinates, all must match
if 'tseqs' in psl and 'qseqs' in psl:
assert len(psl['tseqs']) == len(psl['qseqs']) == \
- len(query_ranges) == len(hit_ranges)
+ len(query_range_all) == len(hit_range_all)
else:
- assert len(query_ranges) == len(hit_ranges)
+ assert len(query_range_all) == len(hit_range_all)
frags = []
- # iterating over query_ranges, but hit_ranges works just as well
- for idx, qcoords in enumerate(query_ranges):
+ # iterating over query_range_all, but hit_range_all works just as well
+ for idx, qcoords in enumerate(query_range_all):
hseqlist = psl.get('tseqs')
hseq = '' if not hseqlist else hseqlist[idx]
qseqlist = psl.get('qseqs')
@@ -332,8 +332,8 @@ def _create_hsp(hid, qid, psl):
# set coordinates
frag.query_start = qcoords[0]
frag.query_end = qcoords[1]
- frag.hit_start = hit_ranges[idx][0]
- frag.hit_end = hit_ranges[idx][1]
+ frag.hit_start = hit_range_all[idx][0]
+ frag.hit_end = hit_range_all[idx][1]
# and strands
frag.query_strand = qstrand
frag.hit_strand = hstrand
@@ -347,7 +347,7 @@ def _create_hsp(hid, qid, psl):
assert hsp.hit_start == psl['tstart']
assert hsp.hit_end == psl['tend']
# and check block spans as well
- assert hsp.query_spans == hsp.hit_spans == psl['blocksizes']
+ assert hsp.query_span_all == hsp.hit_span_all == psl['blocksizes']
# set its attributes
hsp.match_num = psl['matches']
hsp.mismatch_num = psl['mismatches']
@@ -646,16 +646,16 @@ def _build_row(self, qresult):
line.append(hsp.hit_gap_num)
# check spans
- assert hsp.query_spans == hsp.hit_spans
- block_sizes = hsp.query_spans
+ assert hsp.query_span_all == hsp.hit_span_all
+ block_sizes = hsp.query_span_all
# set strand and starts
if hsp[0].query_strand >= 0: # since it may be a protein seq
strand = '+'
else:
strand = '-'
- qstarts = _reorient_starts([x[0] for x in hsp.query_ranges],
- hsp.query_spans, qresult.seq_len, hsp[0].query_strand)
+ qstarts = _reorient_starts([x[0] for x in hsp.query_range_all],
+ hsp.query_span_all, qresult.seq_len, hsp[0].query_strand)
if hsp[0].hit_strand == 1:
hstrand = 1
@@ -665,8 +665,8 @@ def _build_row(self, qresult):
else:
hstrand = -1
strand += '-'
- hstarts = _reorient_starts([x[0] for x in hsp.hit_ranges],
- hsp.hit_spans, hit.seq_len, hstrand)
+ hstarts = _reorient_starts([x[0] for x in hsp.hit_range_all],
+ hsp.hit_span_all, hit.seq_len, hstrand)
line.append(strand)
line.append(qresult.id)
@@ -683,8 +683,8 @@ def _build_row(self, qresult):
line.append(','.join((str(x) for x in hstarts)) + ',')
if self.pslx:
- line.append(','.join((str(x.seq) for x in hsp.queries)) + ',')
- line.append(','.join((str(x.seq) for x in hsp.hits)) + ',')
+ line.append(','.join((str(x.seq) for x in hsp.query_all)) + ',')
+ line.append(','.join((str(x.seq) for x in hsp.hit_all)) + ',')
qresult_lines.append('\t'.join((str(x) for x in line)))
View
8 Bio/SearchIO/ExonerateIO/__init__.py
@@ -188,8 +188,8 @@
gaps at that position. The gap is only present in the hit sequence, where we see
that the third tuple contains (208677, 386123), a gap of about 177k bases.
-Another example is to use the `hit_frames` and `query_frames` to see if there
-are any frameshifts in your alignment:
+Another example is to use the `hit_frame_all` and `query_frame_all` to see if
+there are any frameshifts in your alignment:
>>> from Bio import SearchIO
>>> fname = 'Exonerate/exn_22_m_coding2coding_fshifts.exn'
@@ -197,9 +197,9 @@
>>> hsp = qresult[0][0] # first hit, first hsp
>>> hsp
HSP(...)
- >>> hsp.query_frames
+ >>> hsp.query_frame_all
[1, 2, 2, 2]
- >>> hsp.hit_frames
+ >>> hsp.hit_frame_all
[1, 1, 3, 1]
Here you can see that the alignment as a whole has three frameshifts. The first
View
4 Bio/SearchIO/_model/_base.py
@@ -62,8 +62,8 @@ def _str_hsp_header(self):
qstrand = self.query_strand
hstrand = self.hit_strand
except ValueError:
- qstrand = self.query_strands[0]
- hstrand = self.hit_strands[0]
+ qstrand = self.query_strand_all[0]
+ hstrand = self.hit_strand_all[0]
lines.append('Query range: [%s:%s] (%r)' % (query_start, query_end,
qstrand))
lines.append(' Hit range: [%s:%s] (%r)' % (hit_start, hit_end,
View
68 Bio/SearchIO/_model/hsp.py
@@ -123,54 +123,54 @@ class HSP(_BaseHSP):
+----------------------+---------------------+-----------------------------+
| Property | Shortcut | Value |
+======================+=====================+=============================+
- | alns | aln | HSP alignments as |
+ | aln_all | aln | HSP alignments as |
| | | MultipleSeqAlignment object |
+----------------------+---------------------+-----------------------------+
- | aln_annotations | aln_annotation | dictionary of annotation(s) |
+ | aln_annotation_all | aln_annotation | dictionary of annotation(s) |
| | | of all fragments' alignments|
+----------------------+---------------------+-----------------------------+
| fragments | fragment | HSPFragment objects |
+----------------------+---------------------+-----------------------------+
- | hits | hit | hit sequence as SeqRecord |
+ | hit_all | hit | hit sequence as SeqRecord |
| | | objects |
+----------------------+---------------------+-----------------------------+
- | hit_starts | hit_start* | start coordinates of the |
+ | hit_start_all | hit_start* | start coordinates of the |
| | | hit fragments |
+----------------------+---------------------+-----------------------------+
- | hit_ends | hit_end* | end coordinates of the hit |
+ | hit_end_all | hit_end* | end coordinates of the hit |
| | | fragments |
+----------------------+---------------------+-----------------------------+
- | hit_spans | hit_span* | sizes of each hit fragments |
+ | hit_span_all | hit_span* | sizes of each hit fragments |
+----------------------+---------------------+-----------------------------+
- | hit_strands | hit_strand | strand orientations of the |
+ | hit_strand_all | hit_strand | strand orientations of the |
| | | hit fragments |
+----------------------+---------------------+-----------------------------+
- | hit_frames | hit_frame | reading frames of the hit |
+ | hit_frame_all | hit_frame | reading frames of the hit |
| | | fragments |
+----------------------+---------------------+-----------------------------+
- | hit_ranges | hit_range | tuples of start and end |
+ | hit_range_all | hit_range | tuples of start and end |
| | | coordinates of each hit |
| | | fragment |
+----------------------+---------------------+-----------------------------+
- | queries | query | query sequence as SeqRecord |
+ | query_all | query | query sequence as SeqRecord |
| | | object |
+----------------------+---------------------+-----------------------------+
- | query_starts | query_start* | start coordinates of the |
+ | query_start_all | query_start* | start coordinates of the |
| | | fragments |
+----------------------+---------------------+-----------------------------+
- | query_ends | query_end* | end coordinates of the |
+ | query_end_all | query_end* | end coordinates of the |
| | | query fragments |
+----------------------+---------------------+-----------------------------+
- | query_spans | query_span* | sizes of each query |
+ | query_span_all | query_span* | sizes of each query |
| | | fragments |
+----------------------+---------------------+-----------------------------+
- | query_strands | query_strand | strand orientations of the |
+ | query_strand_all | query_strand | strand orientations of the |
| | | query fragments |
+----------------------+---------------------+-----------------------------+
- | query_frames | query_frame | reading frames of the query |
+ | query_frame_all | query_frame | reading frames of the query |
| | | fragments |
+----------------------+---------------------+-----------------------------+
- | query_ranges | query_range | tuples of start and end |
+ | query_range_all | query_range | tuples of start and end |
| | | coordinates of each query |
| | | fragment |
+----------------------+---------------------+-----------------------------+
@@ -430,8 +430,8 @@ def _query_range_get(self):
def _inter_ranges_get(self, seq_type):
# this property assumes that there are no mixed strands in a hit/query
assert seq_type in ('query', 'hit')
- strand = getattr(self, '%s_strands' % seq_type)[0]
- coords = getattr(self, '%s_ranges' % seq_type)
+ strand = getattr(self, '%s_strand_all' % seq_type)[0]
+ coords = getattr(self, '%s_range_all' % seq_type)
# determine function used to set inter range
# start and end coordinates, given two pairs
# of fragment start and end coordinates
@@ -529,52 +529,52 @@ def _query_inter_spans_get(self):
# properties for multi-fragment HSPs
fragments = allitems(doc="""List of all HSPFragment objects""")
- hits = allitems('hit',
+ hit_all = allitems('hit',
doc="""List of all fragments' hit sequences as SeqRecord objects""")
- queries = allitems('query',
+ query_all = allitems('query',
doc="""List of all fragments' query sequences as SeqRecord objects""")
- alns = allitems('aln',
+ aln_all = allitems('aln',
doc="""List of all fragments' alignments as MultipleSeqAlignment objects""")
- aln_annotations = allitems('aln_annotation',
+ aln_annotation_all = allitems('aln_annotation',
doc="""Dictionary of annotation(s) of all fragments' alignments""")
- hit_strands = allitems('hit_strand',
+ hit_strand_all = allitems('hit_strand',
doc="""List of all fragments' hit sequence strands""")
- query_strands = allitems('query_strand',
+ query_strand_all = allitems('query_strand',
doc="""List of all fragments' query sequence strands""")
- hit_frames = allitems('hit_frame',
+ hit_frame_all = allitems('hit_frame',
doc="""List of all fragments' hit sequence reading frames""")
- query_frames = allitems('query_frame',
+ query_frame_all = allitems('query_frame',
doc="""List of all fragments' query sequence reading frames""")
- hit_starts = allitems('hit_start',
+ hit_start_all = allitems('hit_start',
doc="""List of all fragments' hit start coordinates""")
- query_starts = allitems('query_starts',
+ query_start_all = allitems('query_starts',
doc="""List of all fragments' query start coordinates""")
- hit_ends = allitems('hit_ends',
+ hit_end_all = allitems('hit_ends',
doc="""List of all fragments' hit end coordinates""")
- query_ends = allitems('query_ends',
+ query_end_all = allitems('query_ends',
doc="""List of all fragments' query end coordinates""")
- hit_spans = allitems('hit_span',
+ hit_span_all = allitems('hit_span',
doc="""List of all fragments' hit sequence size""")
- query_spans = allitems('query_span',
+ query_span_all = allitems('query_span',
doc="""List of all fragments' query sequence size""")
- hit_ranges = allitems('hit_range',
+ hit_range_all = allitems('hit_range',
doc="""List of all fragments' hit start and end coordinates""")
- query_ranges = allitems('query_range',
+ query_range_all = allitems('query_range',
doc="""List of all fragments' query start and end coordinates""")
View
8 Doc/Tutorial.tex
@@ -6220,11 +6220,11 @@ \subsection{HSP}
\begin{verbatim}
>>> blat_hsp2.hit_range # hit start and end coordinates of the entire HSP
(54233104, 54264463)
->>> blat_hsp2.hit_ranges # hit start and end coordinates of each fragment
+>>> blat_hsp2.hit_range_all # hit start and end coordinates of each fragment
[(54233104, 54233122), (54264420, 54264463)]
>>> blat_hsp2.hit_span # hit span of the entire HSP
31359
->>> blat_hsp2.hit_spans # hit span of each fragment
+>>> blat_hsp2.hit_span_all # hit span of each fragment
[18, 43]
>>> blat_hsp2.hit_inter_ranges # start and end coordinates of intervening regions in the hit sequence
[(54233122, 54264420)]
@@ -6239,8 +6239,8 @@ \subsection{HSP}
What about the \verb|query|, \verb|hit|, and \verb|aln| attributes? If the
HSP has multiple fragments, you won't be able to use these attributes as they
only fetch single \verb|SeqRecord| or \verb|MultipleSeqAlignment| objects.
-However, you can use their plural counterparts: \verb|queries|, \verb|hits|, and
-\verb|alignments|. These properties will return a list containing
+However, you can use their \verb|*_all| counterparts: \verb|query_all|,
+\verb|hit_all|, and \verb|aln_all|. These properties will return a list containing
\verb|SeqRecord| or \verb|MultipleSeqAlignment| objects from each of the HSP
fragment. There are other attributes that behave similarly, i.e. they only work
for HSPs with one fragment. Check out the \verb|HSP| documentation for a full
View
456 Tests/test_SearchIO_blat_psl.py
@@ -62,10 +62,10 @@ def test_psl_34_001(self, testf='psl_34_001.psl', pslx=False):
self.assertEqual(27, hsp.query_end)
self.assertEqual(61646111, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([16], hsp.query_spans)
- self.assertEqual([16], hsp.hit_spans)
- self.assertEqual([(11, 27)], hsp.query_ranges)
- self.assertEqual([(61646095, 61646111)], hsp.hit_ranges)
+ self.assertEqual([16], hsp.query_span_all)
+ self.assertEqual([16], hsp.hit_span_all)
+ self.assertEqual([(11, 27)], hsp.query_range_all)
+ self.assertEqual([(61646095, 61646111)], hsp.hit_range_all)
# first qresult, second hit
hit = qresult[1]
self.assertEqual('chr1', hit.id)
@@ -87,10 +87,10 @@ def test_psl_34_001(self, testf='psl_34_001.psl', pslx=False):
self.assertEqual(33, hsp.query_end)
self.assertEqual(10271816, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([33], hsp.query_spans)
- self.assertEqual([33], hsp.hit_spans)
- self.assertEqual([(0, 33)], hsp.query_ranges)
- self.assertEqual([(10271783, 10271816)], hsp.hit_ranges)
+ self.assertEqual([33], hsp.query_span_all)
+ self.assertEqual([33], hsp.hit_span_all)
+ self.assertEqual([(0, 33)], hsp.query_range_all)
+ self.assertEqual([(10271783, 10271816)], hsp.hit_range_all)
# first qresult, third hit
hit = qresult[2]
self.assertEqual('chr2', hit.id)
@@ -112,10 +112,10 @@ def test_psl_34_001(self, testf='psl_34_001.psl', pslx=False):
self.assertEqual(25, hsp.query_end)
self.assertEqual(53575997, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([17], hsp.query_spans)
- self.assertEqual([17], hsp.hit_spans)
- self.assertEqual([(8, 25)], hsp.query_ranges)
- self.assertEqual([(53575980, 53575997)], hsp.hit_ranges)
+ self.assertEqual([17], hsp.query_span_all)
+ self.assertEqual([17], hsp.hit_span_all)
+ self.assertEqual([(8, 25)], hsp.query_range_all)
+ self.assertEqual([(53575980, 53575997)], hsp.hit_range_all)
# test second qresult
qresult = self.qresults[1]
@@ -144,10 +144,10 @@ def test_psl_34_001(self, testf='psl_34_001.psl', pslx=False):
self.assertEqual(50, hsp.query_end)
self.assertEqual(85737906, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([41], hsp.query_spans)
- self.assertEqual([41], hsp.hit_spans)
- self.assertEqual([(9, 50)], hsp.query_ranges)
- self.assertEqual([(85737865, 85737906)], hsp.hit_ranges)
+ self.assertEqual([41], hsp.query_span_all)
+ self.assertEqual([41], hsp.hit_span_all)
+ self.assertEqual([(9, 50)], hsp.query_range_all)
+ self.assertEqual([(85737865, 85737906)], hsp.hit_range_all)
# second qresult, second hit
hit = qresult[1]
self.assertEqual('chr8', hit.id)
@@ -169,10 +169,10 @@ def test_psl_34_001(self, testf='psl_34_001.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(95160520, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([41], hsp.query_spans)
- self.assertEqual([41], hsp.hit_spans)
- self.assertEqual([(8, 49)], hsp.query_ranges)
- self.assertEqual([(95160479, 95160520)], hsp.hit_ranges)
+ self.assertEqual([41], hsp.query_span_all)
+ self.assertEqual([41], hsp.hit_span_all)
+ self.assertEqual([(8, 49)], hsp.query_range_all)
+ self.assertEqual([(95160479, 95160520)], hsp.hit_range_all)
# second qresult, third hit
hit = qresult[2]
self.assertEqual('chr22', hit.id)
@@ -194,10 +194,10 @@ def test_psl_34_001(self, testf='psl_34_001.psl', pslx=False):
self.assertEqual(47, hsp.query_end)
self.assertEqual(42144436, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([36], hsp.query_spans)
- self.assertEqual([36], hsp.hit_spans)
- self.assertEqual([(11, 47)], hsp.query_ranges)
- self.assertEqual([(42144400, 42144436)], hsp.hit_ranges)
+ self.assertEqual([36], hsp.query_span_all)
+ self.assertEqual([36], hsp.hit_span_all)
+ self.assertEqual([(11, 47)], hsp.query_range_all)
+ self.assertEqual([(42144400, 42144436)], hsp.hit_range_all)
# second qresult, third hit, second hsp
hsp = qresult[2].hsps[1]
self.assertEqual(35, hsp.match_num)
@@ -214,10 +214,10 @@ def test_psl_34_001(self, testf='psl_34_001.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(48997442, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([37], hsp.query_spans)
- self.assertEqual([37], hsp.hit_spans)
- self.assertEqual([(12, 49)], hsp.query_ranges)
- self.assertEqual([(48997405, 48997442)], hsp.hit_ranges)
+ self.assertEqual([37], hsp.query_span_all)
+ self.assertEqual([37], hsp.hit_span_all)
+ self.assertEqual([(12, 49)], hsp.query_range_all)
+ self.assertEqual([(48997405, 48997442)], hsp.hit_range_all)
# second qresult, fourth hit
hit = qresult[3]
self.assertEqual('chr2', hit.id)
@@ -239,10 +239,10 @@ def test_psl_34_001(self, testf='psl_34_001.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(183926028, hsp.hit_end)
self.assertEqual(2, len(hsp))
- self.assertEqual([6, 38], hsp.query_spans)
- self.assertEqual([6, 38], hsp.hit_spans)
- self.assertEqual([(1, 7), (11, 49)], hsp.query_ranges)
- self.assertEqual([(183925984, 183925990), (183925990, 183926028)], hsp.hit_ranges)
+ self.assertEqual([6, 38], hsp.query_span_all)
+ self.assertEqual([6, 38], hsp.hit_span_all)
+ self.assertEqual([(1, 7), (11, 49)], hsp.query_range_all)
+ self.assertEqual([(183925984, 183925990), (183925990, 183926028)], hsp.hit_range_all)
# second qresult, fourth hit, second hsp
hsp = qresult[3].hsps[1]
self.assertEqual(35, hsp.match_num)
@@ -259,10 +259,10 @@ def test_psl_34_001(self, testf='psl_34_001.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(120641776, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([36], hsp.query_spans)
- self.assertEqual([36], hsp.hit_spans)
- self.assertEqual([(13, 49)], hsp.query_ranges)
- self.assertEqual([(120641740, 120641776)], hsp.hit_ranges)
+ self.assertEqual([36], hsp.query_span_all)
+ self.assertEqual([36], hsp.hit_span_all)
+ self.assertEqual([(13, 49)], hsp.query_range_all)
+ self.assertEqual([(120641740, 120641776)], hsp.hit_range_all)
# second qresult, fifth hit
hit = qresult[4]
self.assertEqual('chr19', hit.id)
@@ -284,10 +284,10 @@ def test_psl_34_001(self, testf='psl_34_001.psl', pslx=False):
self.assertEqual(46, hsp.query_end)
self.assertEqual(35483510, hsp.hit_end)
self.assertEqual(2, len(hsp))
- self.assertEqual([25, 11], hsp.query_spans)
- self.assertEqual([25, 11], hsp.hit_spans)
- self.assertEqual([(10, 35), (35, 46)], hsp.query_ranges)
- self.assertEqual([(35483340, 35483365), (35483499, 35483510)], hsp.hit_ranges)
+ self.assertEqual([25, 11], hsp.query_span_all)
+ self.assertEqual([25, 11], hsp.hit_span_all)
+ self.assertEqual([(10, 35), (35, 46)], hsp.query_range_all)
+ self.assertEqual([(35483340, 35483365), (35483499, 35483510)], hsp.hit_range_all)
# second qresult, fifth hit, second hsp
hsp = qresult[4].hsps[1]
self.assertEqual(39, hsp.match_num)
@@ -304,10 +304,10 @@ def test_psl_34_001(self, testf='psl_34_001.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(54017169, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([39], hsp.query_spans)
- self.assertEqual([39], hsp.hit_spans)
- self.assertEqual([(10, 49)], hsp.query_ranges)
- self.assertEqual([(54017130, 54017169)], hsp.hit_ranges)
+ self.assertEqual([39], hsp.query_span_all)
+ self.assertEqual([39], hsp.hit_span_all)
+ self.assertEqual([(10, 49)], hsp.query_range_all)
+ self.assertEqual([(54017130, 54017169)], hsp.hit_range_all)
# second qresult, fifth hit, third hsp
hsp = qresult[4].hsps[2]
self.assertEqual(36, hsp.match_num)
@@ -324,10 +324,10 @@ def test_psl_34_001(self, testf='psl_34_001.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(553781, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([39], hsp.query_spans)
- self.assertEqual([39], hsp.hit_spans)
- self.assertEqual([(10, 49)], hsp.query_ranges)
- self.assertEqual([(553742, 553781)], hsp.hit_ranges)
+ self.assertEqual([39], hsp.query_span_all)
+ self.assertEqual([39], hsp.hit_span_all)
+ self.assertEqual([(10, 49)], hsp.query_range_all)
+ self.assertEqual([(553742, 553781)], hsp.hit_range_all)
def test_psl_34_002(self, testf='psl_34_002.psl', pslx=False):
"""Test parsing blat output (psl_34_001.psl)"""
@@ -375,10 +375,10 @@ def test_psl_34_003(self, testf='psl_34_003.psl', pslx=False):
self.assertEqual(27, hsp.query_end)
self.assertEqual(61646111, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([16], hsp.query_spans)
- self.assertEqual([16], hsp.hit_spans)
- self.assertEqual([(11, 27)], hsp.query_ranges)
- self.assertEqual([(61646095, 61646111)], hsp.hit_ranges)
+ self.assertEqual([16], hsp.query_span_all)
+ self.assertEqual([16], hsp.hit_span_all)
+ self.assertEqual([(11, 27)], hsp.query_range_all)
+ self.assertEqual([(61646095, 61646111)], hsp.hit_range_all)
# first qresult, second hit
hit = qresult[1]
self.assertEqual('chr1', hit.id)
@@ -400,10 +400,10 @@ def test_psl_34_003(self, testf='psl_34_003.psl', pslx=False):
self.assertEqual(33, hsp.query_end)
self.assertEqual(10271816, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([33], hsp.query_spans)
- self.assertEqual([33], hsp.hit_spans)
- self.assertEqual([(0, 33)], hsp.query_ranges)
- self.assertEqual([(10271783, 10271816)], hsp.hit_ranges)
+ self.assertEqual([33], hsp.query_span_all)
+ self.assertEqual([33], hsp.hit_span_all)
+ self.assertEqual([(0, 33)], hsp.query_range_all)
+ self.assertEqual([(10271783, 10271816)], hsp.hit_range_all)
# first qresult, third hit
hit = qresult[2]
self.assertEqual('chr2', hit.id)
@@ -425,10 +425,10 @@ def test_psl_34_003(self, testf='psl_34_003.psl', pslx=False):
self.assertEqual(25, hsp.query_end)
self.assertEqual(53575997, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([17], hsp.query_spans)
- self.assertEqual([17], hsp.hit_spans)
- self.assertEqual([(8, 25)], hsp.query_ranges)
- self.assertEqual([(53575980, 53575997)], hsp.hit_ranges)
+ self.assertEqual([17], hsp.query_span_all)
+ self.assertEqual([17], hsp.hit_span_all)
+ self.assertEqual([(8, 25)], hsp.query_range_all)
+ self.assertEqual([(53575980, 53575997)], hsp.hit_range_all)
def test_psl_34_004(self, testf='psl_34_004.psl', pslx=False):
"""Test parsing blat output (psl_34_004.psl)"""
@@ -470,10 +470,10 @@ def test_psl_34_004(self, testf='psl_34_004.psl', pslx=False):
self.assertEqual(50, hsp.query_end)
self.assertEqual(85737906, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([41], hsp.query_spans)
- self.assertEqual([41], hsp.hit_spans)
- self.assertEqual([(9, 50)], hsp.query_ranges)
- self.assertEqual([(85737865, 85737906)], hsp.hit_ranges)
+ self.assertEqual([41], hsp.query_span_all)
+ self.assertEqual([41], hsp.hit_span_all)
+ self.assertEqual([(9, 50)], hsp.query_range_all)
+ self.assertEqual([(85737865, 85737906)], hsp.hit_range_all)
# first qresult, second hit
hit = qresult[1]
self.assertEqual('chr8', hit.id)
@@ -495,10 +495,10 @@ def test_psl_34_004(self, testf='psl_34_004.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(95160520, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([41], hsp.query_spans)
- self.assertEqual([41], hsp.hit_spans)
- self.assertEqual([(8, 49)], hsp.query_ranges)
- self.assertEqual([(95160479, 95160520)], hsp.hit_ranges)
+ self.assertEqual([41], hsp.query_span_all)
+ self.assertEqual([41], hsp.hit_span_all)
+ self.assertEqual([(8, 49)], hsp.query_range_all)
+ self.assertEqual([(95160479, 95160520)], hsp.hit_range_all)
# first qresult, third hit
hit = qresult[2]
self.assertEqual('chr22', hit.id)
@@ -520,10 +520,10 @@ def test_psl_34_004(self, testf='psl_34_004.psl', pslx=False):
self.assertEqual(47, hsp.query_end)
self.assertEqual(42144436, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([36], hsp.query_spans)
- self.assertEqual([36], hsp.hit_spans)
- self.assertEqual([(11, 47)], hsp.query_ranges)
- self.assertEqual([(42144400, 42144436)], hsp.hit_ranges)
+ self.assertEqual([36], hsp.query_span_all)
+ self.assertEqual([36], hsp.hit_span_all)
+ self.assertEqual([(11, 47)], hsp.query_range_all)
+ self.assertEqual([(42144400, 42144436)], hsp.hit_range_all)
# first qresult, third hit, second hsp
hsp = qresult[2].hsps[1]
self.assertEqual(35, hsp.match_num)
@@ -540,10 +540,10 @@ def test_psl_34_004(self, testf='psl_34_004.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(48997442, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([37], hsp.query_spans)
- self.assertEqual([37], hsp.hit_spans)
- self.assertEqual([(12, 49)], hsp.query_ranges)
- self.assertEqual([(48997405, 48997442)], hsp.hit_ranges)
+ self.assertEqual([37], hsp.query_span_all)
+ self.assertEqual([37], hsp.hit_span_all)
+ self.assertEqual([(12, 49)], hsp.query_range_all)
+ self.assertEqual([(48997405, 48997442)], hsp.hit_range_all)
# first qresult, fourth hit
hit = qresult[3]
self.assertEqual('chr2', hit.id)
@@ -565,10 +565,10 @@ def test_psl_34_004(self, testf='psl_34_004.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(183926028, hsp.hit_end)
self.assertEqual(2, len(hsp))
- self.assertEqual([6, 38], hsp.query_spans)
- self.assertEqual([6, 38], hsp.hit_spans)
- self.assertEqual([(1, 7), (11, 49)], hsp.query_ranges)
- self.assertEqual([(183925984, 183925990), (183925990, 183926028)], hsp.hit_ranges)
+ self.assertEqual([6, 38], hsp.query_span_all)
+ self.assertEqual([6, 38], hsp.hit_span_all)
+ self.assertEqual([(1, 7), (11, 49)], hsp.query_range_all)
+ self.assertEqual([(183925984, 183925990), (183925990, 183926028)], hsp.hit_range_all)
# first qresult, fourth hit, second hsp
hsp = qresult[3].hsps[1]
self.assertEqual(35, hsp.match_num)
@@ -585,10 +585,10 @@ def test_psl_34_004(self, testf='psl_34_004.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(120641776, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([36], hsp.query_spans)
- self.assertEqual([36], hsp.hit_spans)
- self.assertEqual([(13, 49)], hsp.query_ranges)
- self.assertEqual([(120641740, 120641776)], hsp.hit_ranges)
+ self.assertEqual([36], hsp.query_span_all)
+ self.assertEqual([36], hsp.hit_span_all)
+ self.assertEqual([(13, 49)], hsp.query_range_all)
+ self.assertEqual([(120641740, 120641776)], hsp.hit_range_all)
# first qresult, fifth hit
hit = qresult[4]
self.assertEqual('chr19', hit.id)
@@ -610,10 +610,10 @@ def test_psl_34_004(self, testf='psl_34_004.psl', pslx=False):
self.assertEqual(46, hsp.query_end)
self.assertEqual(35483510, hsp.hit_end)
self.assertEqual(2, len(hsp))
- self.assertEqual([25, 11], hsp.query_spans)
- self.assertEqual([25, 11], hsp.hit_spans)
- self.assertEqual([(10, 35), (35, 46)], hsp.query_ranges)
- self.assertEqual([(35483340, 35483365), (35483499, 35483510)], hsp.hit_ranges)
+ self.assertEqual([25, 11], hsp.query_span_all)
+ self.assertEqual([25, 11], hsp.hit_span_all)
+ self.assertEqual([(10, 35), (35, 46)], hsp.query_range_all)
+ self.assertEqual([(35483340, 35483365), (35483499, 35483510)], hsp.hit_range_all)
# first qresult, fifth hit, second hsp
hsp = qresult[4].hsps[1]
self.assertEqual(39, hsp.match_num)
@@ -630,10 +630,10 @@ def test_psl_34_004(self, testf='psl_34_004.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(54017169, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([39], hsp.query_spans)
- self.assertEqual([39], hsp.hit_spans)
- self.assertEqual([(10, 49)], hsp.query_ranges)
- self.assertEqual([(54017130, 54017169)], hsp.hit_ranges)
+ self.assertEqual([39], hsp.query_span_all)
+ self.assertEqual([39], hsp.hit_span_all)
+ self.assertEqual([(10, 49)], hsp.query_range_all)
+ self.assertEqual([(54017130, 54017169)], hsp.hit_range_all)
# first qresult, fifth hit, third hsp
hsp = qresult[4].hsps[2]
self.assertEqual(36, hsp.match_num)
@@ -650,10 +650,10 @@ def test_psl_34_004(self, testf='psl_34_004.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(553781, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([39], hsp.query_spans)
- self.assertEqual([39], hsp.hit_spans)
- self.assertEqual([(10, 49)], hsp.query_ranges)
- self.assertEqual([(553742, 553781)], hsp.hit_ranges)
+ self.assertEqual([39], hsp.query_span_all)
+ self.assertEqual([39], hsp.hit_span_all)
+ self.assertEqual([(10, 49)], hsp.query_range_all)
+ self.assertEqual([(553742, 553781)], hsp.hit_range_all)
def test_psl_34_005(self, testf='psl_34_005.psl', pslx=False):
"""Test parsing blat output (psl_34_005.psl)"""
@@ -695,10 +695,10 @@ def test_psl_34_005(self, testf='psl_34_005.psl', pslx=False):
self.assertEqual(27, hsp.query_end)
self.assertEqual(61646111, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([16], hsp.query_spans)
- self.assertEqual([16], hsp.hit_spans)
- self.assertEqual([(11, 27)], hsp.query_ranges)
- self.assertEqual([(61646095, 61646111)], hsp.hit_ranges)
+ self.assertEqual([16], hsp.query_span_all)
+ self.assertEqual([16], hsp.hit_span_all)
+ self.assertEqual([(11, 27)], hsp.query_range_all)
+ self.assertEqual([(61646095, 61646111)], hsp.hit_range_all)
# first qresult, second hit
hit = qresult[1]
self.assertEqual('chr1', hit.id)
@@ -720,10 +720,10 @@ def test_psl_34_005(self, testf='psl_34_005.psl', pslx=False):
self.assertEqual(33, hsp.query_end)
self.assertEqual(10271816, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([33], hsp.query_spans)
- self.assertEqual([33], hsp.hit_spans)
- self.assertEqual([(0, 33)], hsp.query_ranges)
- self.assertEqual([(10271783, 10271816)], hsp.hit_ranges)
+ self.assertEqual([33], hsp.query_span_all)
+ self.assertEqual([33], hsp.hit_span_all)
+ self.assertEqual([(0, 33)], hsp.query_range_all)
+ self.assertEqual([(10271783, 10271816)], hsp.hit_range_all)
# first qresult, third hit
hit = qresult[2]
self.assertEqual('chr2', hit.id)
@@ -745,10 +745,10 @@ def test_psl_34_005(self, testf='psl_34_005.psl', pslx=False):
self.assertEqual(25, hsp.query_end)
self.assertEqual(53575997, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([17], hsp.query_spans)
- self.assertEqual([17], hsp.hit_spans)
- self.assertEqual([(8, 25)], hsp.query_ranges)
- self.assertEqual([(53575980, 53575997)], hsp.hit_ranges)
+ self.assertEqual([17], hsp.query_span_all)
+ self.assertEqual([17], hsp.hit_span_all)
+ self.assertEqual([(8, 25)], hsp.query_range_all)
+ self.assertEqual([(53575980, 53575997)], hsp.hit_range_all)
# test second qresult
qresult = self.qresults[1]
@@ -777,10 +777,10 @@ def test_psl_34_005(self, testf='psl_34_005.psl', pslx=False):
self.assertEqual(50, hsp.query_end)
self.assertEqual(85737906, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([41], hsp.query_spans)
- self.assertEqual([41], hsp.hit_spans)
- self.assertEqual([(9, 50)], hsp.query_ranges)
- self.assertEqual([(85737865, 85737906)], hsp.hit_ranges)
+ self.assertEqual([41], hsp.query_span_all)
+ self.assertEqual([41], hsp.hit_span_all)
+ self.assertEqual([(9, 50)], hsp.query_range_all)
+ self.assertEqual([(85737865, 85737906)], hsp.hit_range_all)
# second qresult, second hit
hit = qresult[1]
self.assertEqual('chr8', hit.id)
@@ -802,10 +802,10 @@ def test_psl_34_005(self, testf='psl_34_005.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(95160520, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([41], hsp.query_spans)
- self.assertEqual([41], hsp.hit_spans)
- self.assertEqual([(8, 49)], hsp.query_ranges)
- self.assertEqual([(95160479, 95160520)], hsp.hit_ranges)
+ self.assertEqual([41], hsp.query_span_all)
+ self.assertEqual([41], hsp.hit_span_all)
+ self.assertEqual([(8, 49)], hsp.query_range_all)
+ self.assertEqual([(95160479, 95160520)], hsp.hit_range_all)
# second qresult, third hit
hit = qresult[2]
self.assertEqual('chr22', hit.id)
@@ -827,10 +827,10 @@ def test_psl_34_005(self, testf='psl_34_005.psl', pslx=False):
self.assertEqual(47, hsp.query_end)
self.assertEqual(42144436, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([36], hsp.query_spans)
- self.assertEqual([36], hsp.hit_spans)
- self.assertEqual([(11, 47)], hsp.query_ranges)
- self.assertEqual([(42144400, 42144436)], hsp.hit_ranges)
+ self.assertEqual([36], hsp.query_span_all)
+ self.assertEqual([36], hsp.hit_span_all)
+ self.assertEqual([(11, 47)], hsp.query_range_all)
+ self.assertEqual([(42144400, 42144436)], hsp.hit_range_all)
# second qresult, third hit, second hsp
hsp = qresult[2].hsps[1]
self.assertEqual(35, hsp.match_num)
@@ -847,10 +847,10 @@ def test_psl_34_005(self, testf='psl_34_005.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(48997442, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([37], hsp.query_spans)
- self.assertEqual([37], hsp.hit_spans)
- self.assertEqual([(12, 49)], hsp.query_ranges)
- self.assertEqual([(48997405, 48997442)], hsp.hit_ranges)
+ self.assertEqual([37], hsp.query_span_all)
+ self.assertEqual([37], hsp.hit_span_all)
+ self.assertEqual([(12, 49)], hsp.query_range_all)
+ self.assertEqual([(48997405, 48997442)], hsp.hit_range_all)
# second qresult, fourth hit
hit = qresult[3]
self.assertEqual('chr2', hit.id)
@@ -872,10 +872,10 @@ def test_psl_34_005(self, testf='psl_34_005.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(183926028, hsp.hit_end)
self.assertEqual(2, len(hsp))
- self.assertEqual([6, 38], hsp.query_spans)
- self.assertEqual([6, 38], hsp.hit_spans)
- self.assertEqual([(1, 7), (11, 49)], hsp.query_ranges)
- self.assertEqual([(183925984, 183925990), (183925990, 183926028)], hsp.hit_ranges)
+ self.assertEqual([6, 38], hsp.query_span_all)
+ self.assertEqual([6, 38], hsp.hit_span_all)
+ self.assertEqual([(1, 7), (11, 49)], hsp.query_range_all)
+ self.assertEqual([(183925984, 183925990), (183925990, 183926028)], hsp.hit_range_all)
# second qresult, fourth hit, second hsp
hsp = qresult[3].hsps[1]
self.assertEqual(35, hsp.match_num)
@@ -892,10 +892,10 @@ def test_psl_34_005(self, testf='psl_34_005.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(120641776, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([36], hsp.query_spans)
- self.assertEqual([36], hsp.hit_spans)
- self.assertEqual([(13, 49)], hsp.query_ranges)
- self.assertEqual([(120641740, 120641776)], hsp.hit_ranges)
+ self.assertEqual([36], hsp.query_span_all)
+ self.assertEqual([36], hsp.hit_span_all)
+ self.assertEqual([(13, 49)], hsp.query_range_all)
+ self.assertEqual([(120641740, 120641776)], hsp.hit_range_all)
# second qresult, fifth hit
hit = qresult[4]
self.assertEqual('chr19', hit.id)
@@ -917,10 +917,10 @@ def test_psl_34_005(self, testf='psl_34_005.psl', pslx=False):
self.assertEqual(46, hsp.query_end)
self.assertEqual(35483510, hsp.hit_end)
self.assertEqual(2, len(hsp))
- self.assertEqual([25, 11], hsp.query_spans)
- self.assertEqual([25, 11], hsp.hit_spans)
- self.assertEqual([(10, 35), (35, 46)], hsp.query_ranges)
- self.assertEqual([(35483340, 35483365), (35483499, 35483510)], hsp.hit_ranges)
+ self.assertEqual([25, 11], hsp.query_span_all)
+ self.assertEqual([25, 11], hsp.hit_span_all)
+ self.assertEqual([(10, 35), (35, 46)], hsp.query_range_all)
+ self.assertEqual([(35483340, 35483365), (35483499, 35483510)], hsp.hit_range_all)
# second qresult, fifth hit, second hsp
hsp = qresult[4].hsps[1]
self.assertEqual(39, hsp.match_num)
@@ -937,10 +937,10 @@ def test_psl_34_005(self, testf='psl_34_005.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(54017169, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([39], hsp.query_spans)
- self.assertEqual([39], hsp.hit_spans)
- self.assertEqual([(10, 49)], hsp.query_ranges)
- self.assertEqual([(54017130, 54017169)], hsp.hit_ranges)
+ self.assertEqual([39], hsp.query_span_all)
+ self.assertEqual([39], hsp.hit_span_all)
+ self.assertEqual([(10, 49)], hsp.query_range_all)
+ self.assertEqual([(54017130, 54017169)], hsp.hit_range_all)
# second qresult, fifth hit, third hsp
hsp = qresult[4].hsps[2]
self.assertEqual(36, hsp.match_num)
@@ -957,10 +957,10 @@ def test_psl_34_005(self, testf='psl_34_005.psl', pslx=False):
self.assertEqual(49, hsp.query_end)
self.assertEqual(553781, hsp.hit_end)
self.assertEqual(1, len(hsp))
- self.assertEqual([39], hsp.query_spans)
- self.assertEqual([39], hsp.hit_spans)
- self.assertEqual([(10, 49)], hsp.query_ranges)
- self.assertEqual([(553742, 553781)], hsp.hit_ranges)
+ self.assertEqual([39], hsp.query_span_all)
+ self.assertEqual([39], hsp.hit_span_all)
+ self.assertEqual([(10, 49)], hsp.query_range_all)
+ self.assertEqual([(553742, 553781)], hsp.hit_range_all)
class BlatPslxCases(BlatPslCases):
@@ -973,59 +973,59 @@ def test_pslx_34_001(self, testf='pslx_34_001.pslx'):
qresult = self.qresults[0]
# first qresult, first hit, first hsp
hsp = qresult[0].hsps[0]
- self.assertEqual('aggtaaactgccttca', str(hsp.queries[0].seq))
- self.assertEqual('aggtaaactgccttca', str(hsp.hits[0].seq))
+ self.assertEqual('aggtaaactgccttca', str(hsp.query_all[0].seq))
+ self.assertEqual('aggtaaactgccttca', str(hsp.hit_all[0].seq))
# first qresult, second hit, first hsp
hsp = qresult[1].hsps[0]
- self.assertEqual('atgagcttccaaggtaaactgccttcaagattc', str(hsp.queries[0].seq))
- self.assertEqual('atgagcttccaaggtaaactgccttcaagattc', str(hsp.hits[0].seq))
+ self.assertEqual('atgagcttccaaggtaaactgccttcaagattc', str(hsp.query_all[0].seq))
+ self.assertEqual('atgagcttccaaggtaaactgccttcaagattc', str(hsp.hit_all[0].seq))
# first qresult, third hit, first hsp
hsp = qresult[2].hsps[0]
- self.assertEqual('aaggcagtttaccttgg', str(hsp.queries[0].seq))
- self.assertEqual('aaggcagtttaccttgg', str(hsp.hits[0].seq))
+ self.assertEqual('aaggcagtttaccttgg', str(hsp.query_all[0].seq))
+ self.assertEqual('aaggcagtttaccttgg', str(hsp.hit_all[0].seq))
# test second qresult
qresult = self.qresults[1]
# second qresult, first hit, first hsp
hsp = qresult[0].hsps[0]
- self.assertEqual('acaaaggggctgggcgtggtggctcacacctgtaatcccaa', str(hsp.queries[0].seq))
- self.assertEqual('acaaaggggctgggcgcagtggctcacgcctgtaatcccaa', str(hsp.hits[0].seq))
+ self.assertEqual('acaaaggggctgggcgtggtggctcacacctgtaatcccaa', str(hsp.query_all[0].seq))
+ self.assertEqual('acaaaggggctgggcgcagtggctcacgcctgtaatcccaa', str(hsp.hit_all[0].seq))
# second qresult, second hit, first hsp
hsp = qresult[1].hsps[0]
- self.assertEqual('cacaaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.queries[0].seq))
- self.assertEqual('cacaaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.hits[0].seq))
+ self.assertEqual('cacaaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.query_all[0].seq))
+ self.assertEqual('cacaaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.hit_all[0].seq))
# second qresult, third hit, first hsp
hsp = qresult[2].hsps[0]
- self.assertEqual('aaaggggctgggcgtggtggctcacacctgtaatcc', str(hsp.queries[0].seq))
- self.assertEqual('aaaggggctgggcgtggtagctcatgcctgtaatcc', str(hsp.hits[0].seq))
+ self.assertEqual('aaaggggctgggcgtggtggctcacacctgtaatcc', str(hsp.query_all[0].seq))
+ self.assertEqual('aaaggggctgggcgtggtagctcatgcctgtaatcc', str(hsp.hit_all[0].seq))
# second qresult, third hit, second hsp
hsp = qresult[2].hsps[1]
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctt', str(hsp.queries[0].seq))
- self.assertEqual('tgggattacaggcgggagccaccacgcccagcccctt', str(hsp.hits[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctt', str(hsp.query_all[0].seq))
+ self.assertEqual('tgggattacaggcgggagccaccacgcccagcccctt', str(hsp.hit_all[0].seq))
# second qresult, fourth hit, first hsp
hsp = qresult[3].hsps[0]
- self.assertEqual('aaaaat', str(hsp.queries[0].seq))
- self.assertEqual('aaaaat', str(hsp.hits[0].seq))
- self.assertEqual('aaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.queries[1].seq))
- self.assertEqual('aaaggggctgggcgtggtggctcacgcctgtaatccca', str(hsp.hits[1].seq))
+ self.assertEqual('aaaaat', str(hsp.query_all[0].seq))
+ self.assertEqual('aaaaat', str(hsp.hit_all[0].seq))
+ self.assertEqual('aaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.query_all[1].seq))
+ self.assertEqual('aaaggggctgggcgtggtggctcacgcctgtaatccca', str(hsp.hit_all[1].seq))
# second qresult, fourth hit, second hsp
hsp = qresult[3].hsps[1]
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccct', str(hsp.queries[0].seq))
- self.assertEqual('tgggattacaggcgtgagccaccacgcccagcccct', str(hsp.hits[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccct', str(hsp.query_all[0].seq))
+ self.assertEqual('tgggattacaggcgtgagccaccacgcccagcccct', str(hsp.hit_all[0].seq))
# second qresult, fifth hit, first hsp
hsp = qresult[4].hsps[0]
- self.assertEqual('caaaggggctgggcgtggtggctca', str(hsp.queries[0].seq))
- self.assertEqual('caaaggggctgggcgtagtggctga', str(hsp.hits[0].seq))
- self.assertEqual('cacctgtaatc', str(hsp.queries[1].seq))
- self.assertEqual('cacctgtaatc', str(hsp.hits[1].seq))
+ self.assertEqual('caaaggggctgggcgtggtggctca', str(hsp.query_all[0].seq))
+ self.assertEqual('caaaggggctgggcgtagtggctga', str(hsp.hit_all[0].seq))
+ self.assertEqual('cacctgtaatc', str(hsp.query_all[1].seq))
+ self.assertEqual('cacctgtaatc', str(hsp.hit_all[1].seq))
# second qresult, fifth hit, second hsp
hsp = qresult[4].hsps[1]
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.queries[0].seq))
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.hits[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.query_all[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.hit_all[0].seq))
# second qresult, fifth hit, third hsp
hsp = qresult[4].hsps[2]
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.queries[0].seq))
- self.assertEqual('tgggatgacaggggtgaggcaccacgcccagcccctttg', str(hsp.hits[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.query_all[0].seq))
+ self.assertEqual('tgggatgacaggggtgaggcaccacgcccagcccctttg', str(hsp.hit_all[0].seq))
def test_pslx_34_002(self, testf='pslx_34_002.pslx'):
"""Test parsing blat output (pslx_34_002.pslx)"""
@@ -1039,16 +1039,16 @@ def test_pslx_34_003(self, testf='pslx_34_003.pslx'):
qresult = self.qresults[0]
# first qresult, first hit, first hsp
hsp = qresult[0].hsps[0]
- self.assertEqual('aggtaaactgccttca', str(hsp.queries[0].seq))
- self.assertEqual('aggtaaactgccttca', str(hsp.hits[0].seq))
+ self.assertEqual('aggtaaactgccttca', str(hsp.query_all[0].seq))
+ self.assertEqual('aggtaaactgccttca', str(hsp.hit_all[0].seq))
# first qresult, second hit, first hsp
hsp = qresult[1].hsps[0]
- self.assertEqual('atgagcttccaaggtaaactgccttcaagattc', str(hsp.queries[0].seq))
- self.assertEqual('atgagcttccaaggtaaactgccttcaagattc', str(hsp.hits[0].seq))
+ self.assertEqual('atgagcttccaaggtaaactgccttcaagattc', str(hsp.query_all[0].seq))
+ self.assertEqual('atgagcttccaaggtaaactgccttcaagattc', str(hsp.hit_all[0].seq))
# first qresult, third hit, first hsp
hsp = qresult[2].hsps[0]
- self.assertEqual('aaggcagtttaccttgg', str(hsp.queries[0].seq))
- self.assertEqual('aaggcagtttaccttgg', str(hsp.hits[0].seq))
+ self.assertEqual('aaggcagtttaccttgg', str(hsp.query_all[0].seq))
+ self.assertEqual('aaggcagtttaccttgg', str(hsp.hit_all[0].seq))
def test_pslx_34_004(self, testf='pslx_34_004.pslx'):
"""Test parsing blat output (pslx_34_004.pslx)"""
@@ -1058,44 +1058,44 @@ def test_pslx_34_004(self, testf='pslx_34_004.pslx'):
qresult = self.qresults[0]
# first qresult, first hit, first hsp
hsp = qresult[0].hsps[0]
- self.assertEqual('acaaaggggctgggcgtggtggctcacacctgtaatcccaa', str(hsp.queries[0].seq))
- self.assertEqual('acaaaggggctgggcgcagtggctcacgcctgtaatcccaa', str(hsp.hits[0].seq))
+ self.assertEqual('acaaaggggctgggcgtggtggctcacacctgtaatcccaa', str(hsp.query_all[0].seq))
+ self.assertEqual('acaaaggggctgggcgcagtggctcacgcctgtaatcccaa', str(hsp.hit_all[0].seq))
# first qresult, second hit, first hsp
hsp = qresult[1].hsps[0]
- self.assertEqual('cacaaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.queries[0].seq))
- self.assertEqual('cacaaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.hits[0].seq))
+ self.assertEqual('cacaaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.query_all[0].seq))
+ self.assertEqual('cacaaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.hit_all[0].seq))
# first qresult, third hit, first hsp
hsp = qresult[2].hsps[0]
- self.assertEqual('aaaggggctgggcgtggtggctcacacctgtaatcc', str(hsp.queries[0].seq))
- self.assertEqual('aaaggggctgggcgtggtagctcatgcctgtaatcc', str(hsp.hits[0].seq))
+ self.assertEqual('aaaggggctgggcgtggtggctcacacctgtaatcc', str(hsp.query_all[0].seq))
+ self.assertEqual('aaaggggctgggcgtggtagctcatgcctgtaatcc', str(hsp.hit_all[0].seq))
# first qresult, third hit, second hsp
hsp = qresult[2].hsps[1]
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctt', str(hsp.queries[0].seq))
- self.assertEqual('tgggattacaggcgggagccaccacgcccagcccctt', str(hsp.hits[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctt', str(hsp.query_all[0].seq))
+ self.assertEqual('tgggattacaggcgggagccaccacgcccagcccctt', str(hsp.hit_all[0].seq))
# first qresult, fourth hit, first hsp
hsp = qresult[3].hsps[0]
- self.assertEqual('aaaaat', str(hsp.queries[0].seq))
- self.assertEqual('aaaaat', str(hsp.hits[0].seq))
- self.assertEqual('aaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.queries[1].seq))
- self.assertEqual('aaaggggctgggcgtggtggctcacgcctgtaatccca', str(hsp.hits[1].seq))
+ self.assertEqual('aaaaat', str(hsp.query_all[0].seq))
+ self.assertEqual('aaaaat', str(hsp.hit_all[0].seq))
+ self.assertEqual('aaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.query_all[1].seq))
+ self.assertEqual('aaaggggctgggcgtggtggctcacgcctgtaatccca', str(hsp.hit_all[1].seq))
# first qresult, fourth hit, second hsp
hsp = qresult[3].hsps[1]
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccct', str(hsp.queries[0].seq))
- self.assertEqual('tgggattacaggcgtgagccaccacgcccagcccct', str(hsp.hits[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccct', str(hsp.query_all[0].seq))
+ self.assertEqual('tgggattacaggcgtgagccaccacgcccagcccct', str(hsp.hit_all[0].seq))
# first qresult, fifth hit, first hsp
hsp = qresult[4].hsps[0]
- self.assertEqual('caaaggggctgggcgtggtggctca', str(hsp.queries[0].seq))
- self.assertEqual('caaaggggctgggcgtagtggctga', str(hsp.hits[0].seq))
- self.assertEqual('cacctgtaatc', str(hsp.queries[1].seq))
- self.assertEqual('cacctgtaatc', str(hsp.hits[1].seq))
+ self.assertEqual('caaaggggctgggcgtggtggctca', str(hsp.query_all[0].seq))
+ self.assertEqual('caaaggggctgggcgtagtggctga', str(hsp.hit_all[0].seq))
+ self.assertEqual('cacctgtaatc', str(hsp.query_all[1].seq))
+ self.assertEqual('cacctgtaatc', str(hsp.hit_all[1].seq))
# first qresult, fifth hit, second hsp
hsp = qresult[4].hsps[1]
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.queries[0].seq))
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.hits[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.query_all[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.hit_all[0].seq))
# first qresult, fifth hit, third hsp
hsp = qresult[4].hsps[2]
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.queries[0].seq))
- self.assertEqual('tgggatgacaggggtgaggcaccacgcccagcccctttg', str(hsp.hits[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.query_all[0].seq))
+ self.assertEqual('tgggatgacaggggtgaggcaccacgcccagcccctttg', str(hsp.hit_all[0].seq))
def test_pslx_34_005(self, testf='pslx_34_005.pslx'):
"""Test parsing blat output (pslx_34_005.pslx)"""
@@ -1105,59 +1105,59 @@ def test_pslx_34_005(self, testf='pslx_34_005.pslx'):
qresult = self.qresults[0]
# first qresult, first hit, first hsp
hsp = qresult[0].hsps[0]
- self.assertEqual('aggtaaactgccttca', str(hsp.queries[0].seq))
- self.assertEqual('aggtaaactgccttca', str(hsp.hits[0].seq))
+ self.assertEqual('aggtaaactgccttca', str(hsp.query_all[0].seq))
+ self.assertEqual('aggtaaactgccttca', str(hsp.hit_all[0].seq))
# first qresult, second hit, first hsp
hsp = qresult[1].hsps[0]
- self.assertEqual('atgagcttccaaggtaaactgccttcaagattc', str(hsp.queries[0].seq))
- self.assertEqual('atgagcttccaaggtaaactgccttcaagattc', str(hsp.hits[0].seq))
+ self.assertEqual('atgagcttccaaggtaaactgccttcaagattc', str(hsp.query_all[0].seq))
+ self.assertEqual('atgagcttccaaggtaaactgccttcaagattc', str(hsp.hit_all[0].seq))
# first qresult, third hit, first hsp
hsp = qresult[2].hsps[0]
- self.assertEqual('aaggcagtttaccttgg', str(hsp.queries[0].seq))
- self.assertEqual('aaggcagtttaccttgg', str(hsp.hits[0].seq))
+ self.assertEqual('aaggcagtttaccttgg', str(hsp.query_all[0].seq))
+ self.assertEqual('aaggcagtttaccttgg', str(hsp.hit_all[0].seq))
# test second qresult
qresult = self.qresults[1]
# second qresult, first hit, first hsp
hsp = qresult[0].hsps[0]
- self.assertEqual('acaaaggggctgggcgtggtggctcacacctgtaatcccaa', str(hsp.queries[0].seq))
- self.assertEqual('acaaaggggctgggcgcagtggctcacgcctgtaatcccaa', str(hsp.hits[0].seq))
+ self.assertEqual('acaaaggggctgggcgtggtggctcacacctgtaatcccaa', str(hsp.query_all[0].seq))
+ self.assertEqual('acaaaggggctgggcgcagtggctcacgcctgtaatcccaa', str(hsp.hit_all[0].seq))
# second qresult, second hit, first hsp
hsp = qresult[1].hsps[0]
- self.assertEqual('cacaaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.queries[0].seq))
- self.assertEqual('cacaaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.hits[0].seq))
+ self.assertEqual('cacaaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.query_all[0].seq))
+ self.assertEqual('cacaaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.hit_all[0].seq))
# second qresult, third hit, first hsp
hsp = qresult[2].hsps[0]
- self.assertEqual('aaaggggctgggcgtggtggctcacacctgtaatcc', str(hsp.queries[0].seq))
- self.assertEqual('aaaggggctgggcgtggtagctcatgcctgtaatcc', str(hsp.hits[0].seq))
+ self.assertEqual('aaaggggctgggcgtggtggctcacacctgtaatcc', str(hsp.query_all[0].seq))
+ self.assertEqual('aaaggggctgggcgtggtagctcatgcctgtaatcc', str(hsp.hit_all[0].seq))
# second qresult, third hit, second hsp
hsp = qresult[2].hsps[1]
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctt', str(hsp.queries[0].seq))
- self.assertEqual('tgggattacaggcgggagccaccacgcccagcccctt', str(hsp.hits[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctt', str(hsp.query_all[0].seq))
+ self.assertEqual('tgggattacaggcgggagccaccacgcccagcccctt', str(hsp.hit_all[0].seq))
# second qresult, fourth hit, first hsp
hsp = qresult[3].hsps[0]
- self.assertEqual('aaaaat', str(hsp.queries[0].seq))
- self.assertEqual('aaaaat', str(hsp.hits[0].seq))
- self.assertEqual('aaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.queries[1].seq))
- self.assertEqual('aaaggggctgggcgtggtggctcacgcctgtaatccca', str(hsp.hits[1].seq))
+ self.assertEqual('aaaaat', str(hsp.query_all[0].seq))
+ self.assertEqual('aaaaat', str(hsp.hit_all[0].seq))
+ self.assertEqual('aaaggggctgggcgtggtggctcacacctgtaatccca', str(hsp.query_all[1].seq))
+ self.assertEqual('aaaggggctgggcgtggtggctcacgcctgtaatccca', str(hsp.hit_all[1].seq))
# second qresult, fourth hit, second hsp
hsp = qresult[3].hsps[1]
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccct', str(hsp.queries[0].seq))
- self.assertEqual('tgggattacaggcgtgagccaccacgcccagcccct', str(hsp.hits[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccct', str(hsp.query_all[0].seq))
+ self.assertEqual('tgggattacaggcgtgagccaccacgcccagcccct', str(hsp.hit_all[0].seq))
# second qresult, fifth hit, first hsp
hsp = qresult[4].hsps[0]
- self.assertEqual('caaaggggctgggcgtggtggctca', str(hsp.queries[0].seq))
- self.assertEqual('caaaggggctgggcgtagtggctga', str(hsp.hits[0].seq))
- self.assertEqual('cacctgtaatc', str(hsp.queries[1].seq))
- self.assertEqual('cacctgtaatc', str(hsp.hits[1].seq))
+ self.assertEqual('caaaggggctgggcgtggtggctca', str(hsp.query_all[0].seq))
+ self.assertEqual('caaaggggctgggcgtagtggctga', str(hsp.hit_all[0].seq))
+ self.assertEqual('cacctgtaatc', str(hsp.query_all[1].seq))
+ self.assertEqual('cacctgtaatc', str(hsp.hit_all[1].seq))
# second qresult, fifth hit, second hsp
hsp = qresult[4].hsps[1]
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.queries[0].seq))
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.hits[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.query_all[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.hit_all[0].seq))
# second qresult, fifth hit, third hsp
hsp = qresult[4].hsps[2]
- self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.queries[0].seq))
- self.assertEqual('tgggatgacaggggtgaggcaccacgcccagcccctttg', str(hsp.hits[0].seq))
+ self.assertEqual('tgggattacaggtgtgagccaccacgcccagcccctttg', str(hsp.query_all[0].seq))
+ self.assertEqual('tgggatgacaggggtgaggcaccacgcccagcccctttg', str(hsp.hit_all[0].seq))
if __name__ == "__main__":
View
688 Tests/test_SearchIO_exonerate.py
@@ -46,8 +46,8 @@ def check_vulgar_text(self, vulgar, text):
self.assertEqual(vhsp.hit_inter_ranges, thsp.hit_inter_ranges)
self.assertEqual(vhsp.query_split_codons, thsp.query_split_codons)
self.assertEqual(vhsp.hit_split_codons, thsp.hit_split_codons)
- self.assertEqual(vhsp.query_frames, thsp.query_frames)
- self.assertEqual(vhsp.hit_frames, thsp.hit_frames)
+ self.assertEqual(vhsp.query_frame_all, thsp.query_frame_all)
+ self.assertEqual(vhsp.hit_frame_all, thsp.hit_frame_all)
def test_vulgar_text_similar_g2g(self):
"""Compares vulgar-text coordinate parsing for the genome2genome model."""
@@ -98,20 +98,20 @@ def test_exn_22_m_affine_local(self):
self.assertEqual(1318045, hsp.hit_start)
self.assertEqual(1230, hsp.query_end)
self.assertEqual(1319275, hsp.hit_end)
- self.assertEqual([(0, 1230)], hsp.query_ranges)
- self.assertEqual([(1318045, 1319275)], hsp.hit_ranges)
+ self.assertEqual([(0, 1230)], hsp.query_range_all)
+ self.assertEqual([(1318045, 1319275)], hsp.hit_range_all)
self.assertEqual([], hsp.query_inter_ranges)
self.assertEqual([], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(1, len(hsp.queries))
- self.assertEqual(1, len(hsp.hits))
- self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.queries[0].seq)[:40])
+ self.assertEqual(1, len(hsp.query_all))
+ self.assertEqual(1, len(hsp.hit_all))
+ self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.query_all[0].seq)[:40])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.hits[0].seq)[:40])
- self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.hit_all[0].seq)[-40:])
# second hit
hit = qresult[1]
@@ -127,20 +127,20 @@ def test_exn_22_m_affine_local(self):
self.assertEqual(253990, hsp.hit_start)
self.assertEqual(552, hsp.query_end)
self.assertEqual(254474, hsp.hit_end)
- self.assertEqual([(83, 552)], hsp.query_ranges)
- self.assertEqual([(253990, 254474)], hsp.hit_ranges)
+ self.assertEqual([(83, 552)], hsp.query_range_all)
+ self.assertEqual([(253990, 254474)], hsp.hit_range_all)
self.assertEqual([], hsp.query_inter_ranges)
self.assertEqual([], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(1, len(hsp.queries))
- self.assertEqual(1, len(hsp.hits))
- self.assertEqual('ACCTAAGAGGAAGGTGGGCAGACCAGGCAGAAAA-AGGAT', str(hsp.queries[0].seq)[:40])
+ self.assertEqual(1, len(hsp.query_all))
+ self.assertEqual(1, len(hsp.hit_all))
+ self.assertEqual('ACCTAAGAGGAAGGTGGGCAGACCAGGCAGAAAA-AGGAT', str(hsp.query_all[0].seq)[:40])
self.assertEqual('||| |||| ||||| ||| | | ||| ||| | |||', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('ACCGAAGAAGAAGGGTAGCAAAACTAGCAAAAAGCAAGAT', str(hsp.hits[0].seq)[:40])
- self.assertEqual('AAGTTATGTGGAACA--TAGGCTCATGGAACGCTCCCAGT', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('ACCGAAGAAGAAGGGTAGCAAAACTAGCAAAAAGCAAGAT', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('AAGTTATGTGGAACA--TAGGCTCATGGAACGCTCCCAGT', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('| || | | |||| || ||| || | ||| |||', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('ATGT--GGGGAAACAATTACCTTCACCAAATGATCCAAGT', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('ATGT--GGGGAAACAATTACCTTCACCAAATGATCCAAGT', str(hsp.hit_all[0].seq)[-40:])
# third hit
hit = qresult[2]
@@ -156,20 +156,20 @@ def test_exn_22_m_affine_local(self):
self.assertEqual(454073, hsp.hit_start)
self.assertEqual(517, hsp.query_end)
self.assertEqual(454531, hsp.hit_end)
- self.assertEqual([(60, 517)], hsp.query_ranges)
- self.assertEqual([(454073, 454531)], hsp.hit_ranges)
+ self.assertEqual([(60, 517)], hsp.query_range_all)
+ self.assertEqual([(454073, 454531)], hsp.hit_range_all)
self.assertEqual([], hsp.query_inter_ranges)
self.assertEqual([], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(1, len(hsp.queries))
- self.assertEqual(1, len(hsp.hits))
- self.assertEqual('ATGTTGCTAAATAAAGATGGAACACCTAAGAGGAAGGTG-', str(hsp.queries[0].seq)[:40])
+ self.assertEqual(1, len(hsp.query_all))
+ self.assertEqual(1, len(hsp.hit_all))
+ self.assertEqual('ATGTTGCTAAATAAAGATGGAACACCTAAGAGGAAGGTG-', str(hsp.query_all[0].seq)[:40])
self.assertEqual('||| || || || | ||||| | |||| || | ', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('ATGATGATATATTA-GATGGGG-ATG-AAGATGAGCCAGA', str(hsp.hits[0].seq)[:40])
- self.assertEqual('G-TATAGAAGTACAGCCGCACACTCAAGAGAATGAGAAAG', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('ATGATGATATATTA-GATGGGG-ATG-AAGATGAGCCAGA', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('G-TATAGAAGTACAGCCGCACACTCAAGAGAATGAGAAAG', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('| | ||||| | | | | | | ||| | |||||||', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('GTTGAAGAAGCCAAACGGAAGAAAGACGAGGA-GAGAAAG', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('GTTGAAGAAGCCAAACGGAAGAAAGACGAGGA-GAGAAAG', str(hsp.hit_all[0].seq)[-40:])
def test_exn_22_m_cdna2genome(self):
"""Test parsing exonerate output (exn_22_m_cdna2genome.exn)"""
@@ -203,20 +203,20 @@ def test_exn_22_m_cdna2genome(self):
self.assertEqual(1318045, hsp.hit_start)
self.assertEqual(1230, hsp.query_end)
self.assertEqual(1319275, hsp.hit_end)
- self.assertEqual([(0, 1230)], hsp.query_ranges)
- self.assertEqual([(1318045, 1319275)], hsp.hit_ranges)
+ self.assertEqual([(0, 1230)], hsp.query_range_all)
+ self.assertEqual([(1318045, 1319275)], hsp.hit_range_all)
self.assertEqual([], hsp.query_inter_ranges)
self.assertEqual([], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(1, len(hsp.queries))
- self.assertEqual(1, len(hsp.hits))
- self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.queries[0].seq)[:40])
+ self.assertEqual(1, len(hsp.query_all))
+ self.assertEqual(1, len(hsp.hit_all))
+ self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.query_all[0].seq)[:40])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.hits[0].seq)[:40])
- self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.hit_all[0].seq)[-40:])
# first hit, second hsp
hsp = qresult[0].hsps[1]
@@ -227,20 +227,20 @@ def test_exn_22_m_cdna2genome(self):
self.assertEqual(1318045, hsp.hit_start)
self.assertEqual(1230, hsp.query_end)
self.assertEqual(1319275, hsp.hit_end)
- self.assertEqual([(0, 1230)], hsp.query_ranges)
- self.assertEqual([(1318045, 1319275)], hsp.hit_ranges)
+ self.assertEqual([(0, 1230)], hsp.query_range_all)
+ self.assertEqual([(1318045, 1319275)], hsp.hit_range_all)
self.assertEqual([], hsp.query_inter_ranges)
self.assertEqual([], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(1, len(hsp.queries))
- self.assertEqual(1, len(hsp.hits))
- self.assertEqual('CTACAGGAGCTGTCTAACCAGAGCACTCTGTAAGTCGCGA', str(hsp.queries[0].seq)[:40])
+ self.assertEqual(1, len(hsp.query_all))
+ self.assertEqual(1, len(hsp.hit_all))
+ self.assertEqual('CTACAGGAGCTGTCTAACCAGAGCACTCTGTAAGTCGCGA', str(hsp.query_all[0].seq)[:40])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('CTACAGGAGCTGTCTAACCAGAGCACTCTGTAAGTCGCGA', str(hsp.hits[0].seq)[:40])
- self.assertEqual('CTAAATATATTTGCTGACCTTTCCGAAGGATATTGCCCAT', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('CTACAGGAGCTGTCTAACCAGAGCACTCTGTAAGTCGCGA', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('CTAAATATATTTGCTGACCTTTCCGAAGGATATTGCCCAT', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('CTAAATATATTTGCTGACCTTTCCGAAGGATATTGCCCAT', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('CTAAATATATTTGCTGACCTTTCCGAAGGATATTGCCCAT', str(hsp.hit_all[0].seq)[-40:])
# second hit
hit = qresult[1]
@@ -256,28 +256,28 @@ def test_exn_22_m_cdna2genome(self):
self.assertEqual(85010, hsp.hit_start)
self.assertEqual(516, hsp.query_end)
self.assertEqual(667216, hsp.hit_end)
- self.assertEqual([(0, 65), (65, 225), (225, 320), (320, 346), (346, 516)], hsp.query_ranges)
- self.assertEqual([(85010, 85066), (253974, 254135), (350959, 351052), (473170, 473201), (667040, 667216)], hsp.hit_ranges)
+ self.assertEqual([(0, 65), (65, 225), (225, 320), (320, 346), (346, 516)], hsp.query_range_all)
+ self.assertEqual([(85010, 85066), (253974, 254135), (350959, 351052), (473170, 473201), (667040, 667216)], hsp.hit_range_all)
self.assertEqual([(65, 65), (225, 225), (320, 320), (346, 346)], hsp.query_inter_ranges)
self.assertEqual([(85066, 253974), (254135, 350959), (351052, 473170), (473201, 667040)], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(5, len(hsp.queries))
- self.assertEqual(5, len(hsp.hits))
+ self.assertEqual(5, len(hsp.query_all))
+ self.assertEqual(5, len(hsp.hit_all))
# first block
- self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.queries[0].seq)[:40])
+ self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.query_all[0].seq)[:40])
self.assertEqual('|||| || | |||| | |||||| |||| | | | ', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('ATGGTGAACCT-CTTCAAGACGGTCAG--AATA-A-TCAA', str(hsp.hits[0].seq)[:40])
- self.assertEqual('AGCAAATATATTTAGCAGGTGACATGAAGAAGCAAATGTT', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('ATGGTGAACCT-CTTCAAGACGGTCAG--AATA-A-TCAA', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('AGCAAATATATTTAGCAGGTGACATGAAGAAGCAAATGTT', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('|| |||| | | | |||| ||||||||||||| | |', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('AG--AATA-A-TCAACAGG----ATGAAGAAGCAAAAGAT', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('AG--AATA-A-TCAACAGG----ATGAAGAAGCAAAAGAT', str(hsp.hit_all[0].seq)[-40:])
# last block
- self.assertEqual('TATTAGCCTTCC--TCGATGATCTGCA--A-GAACAACAG', str(hsp.queries[-1].seq)[:40])
+ self.assertEqual('TATTAGCCTTCC--TCGATGATCTGCA--A-GAACAACAG', str(hsp.query_all[-1].seq)[:40])
self.assertEqual('| |||| || | ||||| | || || | ||| | | ', hsp[-1].aln_annotation['homology'][:40])
- self.assertEqual('TCATAGCGTTACGTTCGAT-ACCTTCACTACGAAGATCCA', str(hsp.hits[-1].seq)[:40])
- self.assertEqual('AAGTATAGAAGTACAGCCGCACACTCAAGAGAATGAGAAA', str(hsp.queries[-1].seq)[-40:])
+ self.assertEqual('TCATAGCGTTACGTTCGAT-ACCTTCACTACGAAGATCCA', str(hsp.hit_all[-1].seq)[:40])
+ self.assertEqual('AAGTATAGAAGTACAGCCGCACACTCAAGAGAATGAGAAA', str(hsp.query_all[-1].seq)[-40:])
self.assertEqual(' ||||||||||||| || ||| | || | |||', hsp[-1].aln_annotation['homology'][-40:])
- self.assertEqual('TTCTATAGAAGTACAGTTATTCAAACAAAAAAAAAAAAAA', str(hsp.hits[-1].seq)[-40:])
+ self.assertEqual('TTCTATAGAAGTACAGTTATTCAAACAAAAAAAAAAAAAA', str(hsp.hit_all[-1].seq)[-40:])
def test_exn_22_m_coding2coding(self):
"""Test parsing exonerate output (exn_22_m_coding2coding.exn)"""
@@ -311,20 +311,20 @@ def test_exn_22_m_coding2coding(self):
self.assertEqual(1318047, hsp.hit_start)
self.assertEqual(1228, hsp.query_end)
self.assertEqual(1319274, hsp.hit_end)
- self.assertEqual([(1, 1228)], hsp.query_ranges)
- self.assertEqual([(1318047, 1319274)], hsp.hit_ranges)
+ self.assertEqual([(1, 1228)], hsp.query_range_all)
+ self.assertEqual([(1318047, 1319274)], hsp.hit_range_all)
self.assertEqual([], hsp.query_inter_ranges)
self.assertEqual([], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(1, len(hsp.queries))
- self.assertEqual(1, len(hsp.hits))
- self.assertEqual('ACAGGAGCTGTCTAACCAGAGCACTCTGTAAGTCGCGAGC', str(hsp.queries[0].seq)[:40])
+ self.assertEqual(1, len(hsp.query_all))
+ self.assertEqual(1, len(hsp.hit_all))
+ self.assertEqual('ACAGGAGCTGTCTAACCAGAGCACTCTGTAAGTCGCGAGC', str(hsp.query_all[0].seq)[:40])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('ACAGGAGCTGTCTAACCAGAGCACTCTGTAAGTCGCGAGC', str(hsp.hits[0].seq)[:40])
- self.assertEqual('GCTAAATATATTTGCTGACCTTTCCGAAGGATATTGCCCA', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('ACAGGAGCTGTCTAACCAGAGCACTCTGTAAGTCGCGAGC', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('GCTAAATATATTTGCTGACCTTTCCGAAGGATATTGCCCA', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('GCTAAATATATTTGCTGACCTTTCCGAAGGATATTGCCCA', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('GCTAAATATATTTGCTGACCTTTCCGAAGGATATTGCCCA', str(hsp.hit_all[0].seq)[-40:])
# first hit, second hsp
hsp = qresult[0].hsps[1]
@@ -335,20 +335,20 @@ def test_exn_22_m_coding2coding(self):
self.assertEqual(1318045, hsp.hit_start)
self.assertEqual(1230, hsp.query_end)
self.assertEqual(1319275, hsp.hit_end)
- self.assertEqual([(0, 1230)], hsp.query_ranges)
- self.assertEqual([(1318045, 1319275)], hsp.hit_ranges)
+ self.assertEqual([(0, 1230)], hsp.query_range_all)
+ self.assertEqual([(1318045, 1319275)], hsp.hit_range_all)
self.assertEqual([], hsp.query_inter_ranges)
self.assertEqual([], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(1, len(hsp.queries))
- self.assertEqual(1, len(hsp.hits))
- self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.queries[0].seq)[:40])
+ self.assertEqual(1, len(hsp.query_all))
+ self.assertEqual(1, len(hsp.hit_all))
+ self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.query_all[0].seq)[:40])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.hits[0].seq)[:40])
- self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.hit_all[0].seq)[-40:])
# second hit
hit = qresult[1]
@@ -364,20 +364,20 @@ def test_exn_22_m_coding2coding(self):
self.assertEqual(255638, hsp.hit_start)
self.assertEqual(1224, hsp.query_end)
self.assertEqual(255794, hsp.hit_end)
- self.assertEqual([(1065, 1224)], hsp.query_ranges)
- self.assertEqual([(255638, 255794)], hsp.hit_ranges)
+ self.assertEqual([(1065, 1224)], hsp.query_range_all)
+ self.assertEqual([(255638, 255794)], hsp.hit_range_all)
self.assertEqual([], hsp.query_inter_ranges)
self.assertEqual([], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(1, len(hsp.queries))
- self.assertEqual(1, len(hsp.hits))
- self.assertEqual('TGCTACCACATTCTCGAAGAGATCTCCTCCCTACCAAAAT', str(hsp.queries[0].seq)[:40])
+ self.assertEqual(1, len(hsp.query_all))
+ self.assertEqual(1, len(hsp.hit_all))
+ self.assertEqual('TGCTACCACATTCTCGAAGAGATCTCCTCCCTACCAAAAT', str(hsp.query_all[0].seq)[:40])
self.assertEqual('||+! .!.||| !!:...||+:!::!:! ||+||||', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('TGTTCGGAAATTTGGGATAGAATAACAACACATCCGAAAT', str(hsp.hits[0].seq)[:40])
- self.assertEqual('CAAAGCTCGCGACTTACAGAGTGCTCTGGTTAGACAGCTC', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('TGTTCGGAAATTTGGGATAGAATAACAACACATCCGAAAT', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('CAAAGCTCGCGACTTACAGAGTGCTCTGGTTAGACAGCTC', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('!!!.||+...|||:!:||+ |||+|| !!::!!.:!:', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('CAATGCAGAAGACGTTCAATTAGCTTTGAATAAGCATATG', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('CAATGCAGAAGACGTTCAATTAGCTTTGAATAAGCATATG', str(hsp.hit_all[0].seq)[-40:])
def test_exn_22_m_coding2genome(self):
"""Test parsing exonerate output (exn_22_m_coding2genome.exn)"""
@@ -411,20 +411,20 @@ def test_exn_22_m_coding2genome(self):
self.assertEqual(1318047, hsp.hit_start)
self.assertEqual(1228, hsp.query_end)
self.assertEqual(1319274, hsp.hit_end)
- self.assertEqual([(1, 1228)], hsp.query_ranges)
- self.assertEqual([(1318047, 1319274)], hsp.hit_ranges)
+ self.assertEqual([(1, 1228)], hsp.query_range_all)
+ self.assertEqual([(1318047, 1319274)], hsp.hit_range_all)
self.assertEqual([], hsp.query_inter_ranges)
self.assertEqual([], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(1, len(hsp.queries))
- self.assertEqual(1, len(hsp.hits))
- self.assertEqual('ACAGGAGCTGTCTAACCAGAGCACTCTGTAAGTCGCGAGC', str(hsp.queries[0].seq)[:40])
+ self.assertEqual(1, len(hsp.query_all))
+ self.assertEqual(1, len(hsp.hit_all))
+ self.assertEqual('ACAGGAGCTGTCTAACCAGAGCACTCTGTAAGTCGCGAGC', str(hsp.query_all[0].seq)[:40])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('ACAGGAGCTGTCTAACCAGAGCACTCTGTAAGTCGCGAGC', str(hsp.hits[0].seq)[:40])
- self.assertEqual('GCTAAATATATTTGCTGACCTTTCCGAAGGATATTGCCCA', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('ACAGGAGCTGTCTAACCAGAGCACTCTGTAAGTCGCGAGC', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('GCTAAATATATTTGCTGACCTTTCCGAAGGATATTGCCCA', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('GCTAAATATATTTGCTGACCTTTCCGAAGGATATTGCCCA', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('GCTAAATATATTTGCTGACCTTTCCGAAGGATATTGCCCA', str(hsp.hit_all[0].seq)[-40:])
# first hit, second hsp
hsp = qresult[0].hsps[1]
@@ -435,20 +435,20 @@ def test_exn_22_m_coding2genome(self):
self.assertEqual(1318045, hsp.hit_start)
self.assertEqual(1230, hsp.query_end)
self.assertEqual(1319275, hsp.hit_end)
- self.assertEqual([(0, 1230)], hsp.query_ranges)
- self.assertEqual([(1318045, 1319275)], hsp.hit_ranges)
+ self.assertEqual([(0, 1230)], hsp.query_range_all)
+ self.assertEqual([(1318045, 1319275)], hsp.hit_range_all)
self.assertEqual([], hsp.query_inter_ranges)
self.assertEqual([], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(1, len(hsp.queries))
- self.assertEqual(1, len(hsp.hits))
- self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.queries[0].seq)[:40])
+ self.assertEqual(1, len(hsp.query_all))
+ self.assertEqual(1, len(hsp.hit_all))
+ self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.query_all[0].seq)[:40])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.hits[0].seq)[:40])
- self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.hit_all[0].seq)[-40:])
# second hit
hit = qresult[1]
@@ -464,20 +464,20 @@ def test_exn_22_m_coding2genome(self):
self.assertEqual(255638, hsp.hit_start)
self.assertEqual(1224, hsp.query_end)
self.assertEqual(255794, hsp.hit_end)
- self.assertEqual([(1065, 1224)], hsp.query_ranges)
- self.assertEqual([(255638, 255794)], hsp.hit_ranges)
+ self.assertEqual([(1065, 1224)], hsp.query_range_all)
+ self.assertEqual([(255638, 255794)], hsp.hit_range_all)
self.assertEqual([], hsp.query_inter_ranges)
self.assertEqual([], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(1, len(hsp.queries))
- self.assertEqual(1, len(hsp.hits))
- self.assertEqual('TGCTACCACATTCTCGAAGAGATCTCCTCCCTACCAAAAT', str(hsp.queries[0].seq)[:40])
+ self.assertEqual(1, len(hsp.query_all))
+ self.assertEqual(1, len(hsp.hit_all))
+ self.assertEqual('TGCTACCACATTCTCGAAGAGATCTCCTCCCTACCAAAAT', str(hsp.query_all[0].seq)[:40])
self.assertEqual('||+! .!.||| !!:...||+:!::!:! ||+||||', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('TGTTCGGAAATTTGGGATAGAATAACAACACATCCGAAAT', str(hsp.hits[0].seq)[:40])
- self.assertEqual('CAAAGCTCGCGACTTACAGAGTGCTCTGGTTAGACAGCTC', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('TGTTCGGAAATTTGGGATAGAATAACAACACATCCGAAAT', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('CAAAGCTCGCGACTTACAGAGTGCTCTGGTTAGACAGCTC', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('!!!.||+...|||:!:||+ |||+|| !!::!!.:!:', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('CAATGCAGAAGACGTTCAATTAGCTTTGAATAAGCATATG', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('CAATGCAGAAGACGTTCAATTAGCTTTGAATAAGCATATG', str(hsp.hit_all[0].seq)[-40:])
def test_exn_22_m_est2genome(self):
"""Test parsing exonerate output (exn_22_m_est2genome.exn)"""
@@ -511,20 +511,20 @@ def test_exn_22_m_est2genome(self):
self.assertEqual(1318045, hsp.hit_start)
self.assertEqual(1230, hsp.query_end)
self.assertEqual(1319275, hsp.hit_end)
- self.assertEqual([(0, 1230)], hsp.query_ranges)
- self.assertEqual([(1318045, 1319275)], hsp.hit_ranges)
+ self.assertEqual([(0, 1230)], hsp.query_range_all)
+ self.assertEqual([(1318045, 1319275)], hsp.hit_range_all)
self.assertEqual([], hsp.query_inter_ranges)
self.assertEqual([], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(1, len(hsp.queries))
- self.assertEqual(1, len(hsp.hits))
- self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.queries[0].seq)[:40])
+ self.assertEqual(1, len(hsp.query_all))
+ self.assertEqual(1, len(hsp.hit_all))
+ self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.query_all[0].seq)[:40])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.hits[0].seq)[:40])
- self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('TCGCGACTTACAGAGTGCTCTGGTTAGACAGCTCCTGTAG', str(hsp.hit_all[0].seq)[-40:])
# second hit
hit = qresult[1]
@@ -540,25 +540,25 @@ def test_exn_22_m_est2genome(self):
self.assertEqual(85010, hsp.hit_start)
self.assertEqual(346, hsp.query_end)
self.assertEqual(473201, hsp.hit_end)
- self.assertEqual([(0, 65), (65, 225), (225, 320), (320, 346)], hsp.query_ranges)
- self.assertEqual([(85010, 85066), (253974, 254135), (350959, 351052), (473170, 473201)], hsp.hit_ranges)
+ self.assertEqual([(0, 65), (65, 225), (225, 320), (320, 346)], hsp.query_range_all)
+ self.assertEqual([(85010, 85066), (253974, 254135), (350959, 351052), (473170, 473201)], hsp.hit_range_all)
self.assertEqual([(65, 65), (225, 225), (320, 320)], hsp.query_inter_ranges)
self.assertEqual([(85066, 253974), (254135, 350959), (351052, 473170)], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(4, len(hsp.queries))
- self.assertEqual(4, len(hsp.hits))
+ self.assertEqual(4, len(hsp.query_all))
+ self.assertEqual(4, len(hsp.hit_all))
# first block
- self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.queries[0].seq)[:40])
+ self.assertEqual('ATGGGCAATATCCTTCGGAAAGGTCAGCAAATATATTTAG', str(hsp.query_all[0].seq)[:40])
self.assertEqual('|||| || | |||| | |||||| |||| | | | ', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('ATGGTGAACCT-CTTCAAGACGGTCAG--AATA-A-TCAA', str(hsp.hits[0].seq)[:40])
- self.assertEqual('AGCAAATATATTTAGCAGGTGACATGAAGAAGCAAATGTT', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('ATGGTGAACCT-CTTCAAGACGGTCAG--AATA-A-TCAA', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('AGCAAATATATTTAGCAGGTGACATGAAGAAGCAAATGTT', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('|| |||| | | | |||| ||||||||||||| | |', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('AG--AATA-A-TCAACAGG----ATGAAGAAGCAAAAGAT', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('AG--AATA-A-TCAACAGG----ATGAAGAAGCAAAAGAT', str(hsp.hit_all[0].seq)[-40:])
# last block
- self.assertEqual('AGCTAAGAATTCTGATGATG-----AAAGAA', str(hsp.queries[-1].seq))
+ self.assertEqual('AGCTAAGAATTCTGATGATG-----AAAGAA', str(hsp.query_all[-1].seq))
self.assertEqual('| |||||||||||| ||| ||||||', hsp[-1].aln_annotation['homology'])
- self.assertEqual('ATGGAAGAATTCTGATAATGCTGTAAAAGAA', str(hsp.hits[-1].seq))
+ self.assertEqual('ATGGAAGAATTCTGATAATGCTGTAAAAGAA', str(hsp.hit_all[-1].seq))
# second hit, second hsp
hsp = qresult[1].hsps[1]
@@ -569,28 +569,28 @@ def test_exn_22_m_est2genome(self):
self.assertEqual(11338, hsp.hit_start)
self.assertEqual(406, hsp.query_end)
self.assertEqual(130198, hsp.hit_end)
- self.assertEqual([(25, 183), (183, 252), (252, 406)], hsp.query_ranges)
- self.assertEqual([(130038, 130198), (120612, 120681), (11338, 11487)], hsp.hit_ranges)
+ self.assertEqual([(25, 183), (183, 252), (252, 406)], hsp.query_range_all)
+ self.assertEqual([(130038, 130198), (120612, 120681), (11338, 11487)], hsp.hit_range_all)
self.assertEqual([(183, 183), (252, 252)], hsp.query_inter_ranges)
self.assertEqual([(120681, 130038), (11487, 120612)], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(3, len(hsp.queries))
- self.assertEqual(3, len(hsp.hits))
+ self.assertEqual(3, len(hsp.query_all))
+ self.assertEqual(3, len(hsp.hit_all))
# first block
- self.assertEqual('AGCAAATATATTTA-GCAGGTGACATGAAGAAGCAAATGT', str(hsp.queries[0].seq)[:40])
+ self.assertEqual('AGCAAATATATTTA-GCAGGTGACATGAAGAAGCAAATGT', str(hsp.query_all[0].seq)[:40])
self.assertEqual('| |||| ||| | |||| | | || |||| | | |', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('ACCAAAGATAACAAGGCAG--AAAAAGAGGAAGAAGAAAT', str(hsp.hits[0].seq)[:40])
- self.assertEqual('AG-GACTGCCCAGAATAGGGCAGCTCAACGAGCGTTCCGA', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('ACCAAAGATAACAAGGCAG--AAAAAGAGGAAGAAGAAAT', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('AG-GACTGCCCAGAATAGGGCAGCTCAACGAGCGTTCCGA', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('|| ||| |||||| || ||| || || ||| ||', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('AGTGAC--CCCAGAGGAGCCAAGCAAAAAGA---TTCGGA', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('AGTGAC--CCCAGAGGAGCCAAGCAAAAAGA---TTCGGA', str(hsp.hit_all[0].seq)[-40:])
# last block
- self.assertEqual('AATAAGACTACCACGGACTTTTTACTATGTTCTTTAAAAA', str(hsp.queries[-1].seq)[:40])
+ self.assertEqual('AATAAGACTACCACGGACTTTTTACTATGTTCTTTAAAAA', str(hsp.query_all[-1].seq)[:40])
self.assertEqual('||||||| | ||| | |||| | | | | || ', hsp[-1].aln_annotation['homology'][:40])
- self.assertEqual('AATAAGAGCAACACAG----TTTA-TCTTATATGTA----', str(hsp.hits[-1].seq)[:40])
- self.assertEqual('CTGCAAGAACAACAGAAAAGGGAAAACGAAAAAGGAACAA', str(hsp.queries[-1].seq)[-40:])
+ self.assertEqual('AATAAGAGCAACACAG----TTTA-TCTTATATGTA----', str(hsp.hit_all[-1].seq)[:40])
+ self.assertEqual('CTGCAAGAACAACAGAAAAGGGAAAACGAAAAAGGAACAA', str(hsp.query_all[-1].seq)[-40:])
self.assertEqual('| | | || | | || || |||||||| || ||||', hsp[-1].aln_annotation['homology'][-40:])
- self.assertEqual('CCACTAAAAAATTATAAGAGCCAAAACGAAGTAGATACAA', str(hsp.hits[-1].seq)[-40:])
+ self.assertEqual('CCACTAAAAAATTATAAGAGCCAAAACGAAGTAGATACAA', str(hsp.hit_all[-1].seq)[-40:])
def test_exn_22_m_genome2genome(self):
"""Test parsing exonerate output (exn_22_m_genome2genome.exn)"""
@@ -624,20 +624,20 @@ def test_exn_22_m_genome2genome(self):
self.assertEqual(1319468, hsp.hit_start)
self.assertEqual(529, hsp.query_end)
self.assertEqual(1319997, hsp.hit_end)
- self.assertEqual([(0, 529)], hsp.query_ranges)
- self.assertEqual([(1319468, 1319997)], hsp.hit_ranges)
+ self.assertEqual([(0, 529)], hsp.query_range_all)
+ self.assertEqual([(1319468, 1319997)], hsp.hit_range_all)
self.assertEqual([], hsp.query_inter_ranges)
self.assertEqual([], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(1, len(hsp.queries))
- self.assertEqual(1, len(hsp.hits))
- self.assertEqual('ATCCCTTATCTCTTTATCTTGTTGCCTGGTTCTCTTTTCC', str(hsp.queries[0].seq)[:40])
+ self.assertEqual(1, len(hsp.query_all))
+ self.assertEqual(1, len(hsp.hit_all))
+ self.assertEqual('ATCCCTTATCTCTTTATCTTGTTGCCTGGTTCTCTTTTCC', str(hsp.query_all[0].seq)[:40])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('ATCCCTTATCTCTTTATCTTGTTGCCTGGTTCTCTTTTCC', str(hsp.hits[0].seq)[:40])
- self.assertEqual('ACGGCAATACCTGGCATGTGATTGTCGGAAAGAACTTTGG', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('ATCCCTTATCTCTTTATCTTGTTGCCTGGTTCTCTTTTCC', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('ACGGCAATACCTGGCATGTGATTGTCGGAAAGAACTTTGG', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('ACGGCAATACCTGGCATGTGATTGTCGGAAAGAACTTTGG', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('ACGGCAATACCTGGCATGTGATTGTCGGAAAGAACTTTGG', str(hsp.hit_all[0].seq)[-40:])
# first hit, second hsp
hsp = qresult[0].hsps[1]
@@ -648,20 +648,20 @@ def test_exn_22_m_genome2genome(self):
self.assertEqual(1319468, hsp.hit_start)
self.assertEqual(529, hsp.query_end)
self.assertEqual(1319997, hsp.hit_end)
- self.assertEqual([(0, 529)], hsp.query_ranges)
- self.assertEqual([(1319468, 1319997)], hsp.hit_ranges)
+ self.assertEqual([(0, 529)], hsp.query_range_all)
+ self.assertEqual([(1319468, 1319997)], hsp.hit_range_all)
self.assertEqual([], hsp.query_inter_ranges)
self.assertEqual([], hsp.hit_inter_ranges)
self.assertEqual([], hsp.query_split_codons)
self.assertEqual([], hsp.hit_split_codons)
- self.assertEqual(1, len(hsp.queries))
- self.assertEqual(1, len(hsp.hits))
- self.assertEqual('CCAAAGTTCTTTCCGACAATCACATGCCAGGTATTGCCGT', str(hsp.queries[0].seq)[:40])
+ self.assertEqual(1, len(hsp.query_all))
+ self.assertEqual(1, len(hsp.hit_all))
+ self.assertEqual('CCAAAGTTCTTTCCGACAATCACATGCCAGGTATTGCCGT', str(hsp.query_all[0].seq)[:40])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('CCAAAGTTCTTTCCGACAATCACATGCCAGGTATTGCCGT', str(hsp.hits[0].seq)[:40])
- self.assertEqual('GGAAAAGAGAACCAGGCAACAAGATAAAGAGATAAGGGAT', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('CCAAAGTTCTTTCCGACAATCACATGCCAGGTATTGCCGT', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('GGAAAAGAGAACCAGGCAACAAGATAAAGAGATAAGGGAT', str(hsp.query_all[0].seq)[-40:])
self.assertEqual('||||||||||||||||||||||||||||||||||||||||', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('GGAAAAGAGAACCAGGCAACAAGATAAAGAGATAAGGGAT', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('GGAAAAGAGAACCAGGCAACAAGATAAAGAGATAAGGGAT', str(hsp.hit_all[0].seq)[-40:])
# second hit
hit = qresult[1]
@@ -677,25 +677,25 @@ def test_exn_22_m_genome2genome(self):
self.assertEqual(23668, hsp.hit_start)
self.assertEqual(491, hsp.query_end)
self.assertEqual(115569, hsp.hit_end)
- self.assertEqual([(462, 491), (413, 462), (378, 413), (302, 378), (162, 302)], hsp.query_ranges)
- self.assertEqual([(23668, 23697), (32680, 32732), (42287, 42325), (97748, 97821), (115419, 115569)], hsp.hit_ranges)
+ self.assertEqual([(462, 491), (413, 462), (378, 413), (302, 378), (162, 302)], hsp.query_range_all)
+ self.assertEqual([(23668, 23697), (32680, 32732), (42287, 42325), (97748, 97821), (115419, 115569)], hsp.hit_range_all)
self.assertEqual([(462, 462), (413, 413), (378, 378), (302, 302)], hsp.query_inter_ranges)
self.assertEqual([(23697, 32680), (32732, 42287), (42325, 97748), (97821, 115419)], hsp.hit_inter_ranges)
self.assertEqual([(378, 379), (376, 378)], hsp.query_split_codons)
self.assertEqual([(42324, 42325), (97748, 97750)], hsp.hit_split_codons)
- self.assertEqual(5, len(hsp.queries))
- self.assertEqual(5, len(hsp.hits))
+ self.assertEqual(5, len(hsp.query_all))
+ self.assertEqual(5, len(hsp.hit_all))
# first block
- self.assertEqual('CCCTTTAAATGGAGATTACAAACTAGCGA', str(hsp.queries[0].seq))
+ self.assertEqual('CCCTTTAAATGGAGATTACAAACTAGCGA', str(hsp.query_all[0].seq))
self.assertEqual('|| | ||| | ||| ||||| | | |', hsp[0].aln_annotation['homology'])
- self.assertEqual('CCGCTGAAAGGAAGAGAACAAAGTTACAA', str(hsp.hits[0].seq))
+ self.assertEqual('CCGCTGAAAGGAAGAGAACAAAGTTACAA', str(hsp.hit_all[0].seq))
# last block
- self.assertEqual('TTTTCTTTACTAAC-TCGAGGAAGAGTGAGGTTTTCTTCC', str(hsp.queries[-1].seq)[:40])
+ self.assertEqual('TTTTCTTTACTAAC-TCGAGGAAGAGTGAGGTTTTCTTCC', str(hsp.query_all[-1].seq)[:40])
self.assertEqual('| || || | | | |||||| |||| | | | |||', hsp[-1].aln_annotation['homology'][:40])
- self.assertEqual('TCTTGAAGACCAGCATGTAGGAAG-GTGATGATATGCTCC', str(hsp.hits[-1].seq)[:40])
- self.assertEqual('TTTGTGTGTGTACATTTGAATATATATATTTAC-TAACAA', str(hsp.queries[-1].seq)[-40:])
+ self.assertEqual('TCTTGAAGACCAGCATGTAGGAAG-GTGATGATATGCTCC', str(hsp.hit_all[-1].seq)[:40])
+ self.assertEqual('TTTGTGTGTGTACATTTGAATATATATATTTAC-TAACAA', str(hsp.query_all[-1].seq)[-40:])
self.assertEqual(' ||| ||| | ||||||||||||| | | ||||||', hsp[-1].aln_annotation['homology'][-40:])
- self.assertEqual('ATTGATTGTTTTGTTTTGAATATATATTGATGCTTAACAA', str(hsp.hits[-1].seq)[-40:])
+ self.assertEqual('ATTGATTGTTTTGTTTTGAATATATATTGATGCTTAACAA', str(hsp.hit_all[-1].seq)[-40:])
# third hit
hit = qresult[2]
@@ -711,25 +711,25 @@ def test_exn_22_m_genome2genome(self):
self.assertEqual(71883, hsp.hit_start)
self.assertEqual(529, hsp.query_end)
self.assertEqual(641760, hsp.hit_end)
- self.assertEqual([(449, 529), (319, 388), (198, 284), (161, 198), (78, 114)], hsp.query_ranges)
- self.assertEqual([(641682, 641760), (487327, 487387), (386123, 386207), (208639, 208677), (71883, 71917)], hsp.hit_ranges)
+ self.assertEqual([(449, 529), (319, 388), (198, 284), (161, 198), (78, 114)], hsp.query_range_all)
+ self.assertEqual([(641682, 641760), (487327, 487387), (386123, 386207), (208639, 208677), (71883, 71917)], hsp.hit_range_all)
self.assertEqual([(388, 449), (284, 319), (198, 198), (114, 161)], hsp.query_inter_ranges)
self.assertEqual([(487387, 641682), (386207, 487327), (208677, 386123), (71917, 208639)], hsp.hit_inter_ranges)
self.assertEqual([(198, 200), (197, 198)], hsp.query_split_codons)
self.assertEqual([(386123, 386125), (208676, 208677)], hsp.hit_split_codons)
- self.assertEqual(5, len(hsp.queries))
- self.assertEqual(5, len(hsp.hits))
+ self.assertEqual(5, len(hsp.query_all))
+ self.assertEqual(5, len(hsp.hit_all))
# first block
- self.assertEqual('ATCCCTTATCTCTTTATCTTGTTGCCTGGTTCTCTTTTCC', str(hsp.queries[0].seq)[:40])
+ self.assertEqual('ATCCCTTATCTCTTTATCTTGTTGCCTGGTTCTCTTTTCC', str(hsp.query_all[0].seq)[:40])
self.assertEqual('|||||||||||||| ||| ||||| |||| ', hsp[0].aln_annotation['homology'][:40])
- self.assertEqual('ATCCCTTATCTCTTCTAAAGATTGTGTGGTT---TTTT--', str(hsp.hits[0].seq)[:40])
- self.assertEqual('AAATGGAGATTACAA---ACTAGCGAA-ACTGCAGAAAAG', str(hsp.queries[0].seq)[-40:])
+ self.assertEqual('ATCCCTTATCTCTTCTAAAGATTGTGTGGTT---TTTT--', str(hsp.hit_all[0].seq)[:40])
+ self.assertEqual('AAATGGAGATTACAA---ACTAGCGAA-ACTGCAGAAAAG', str(hsp.query_all[0].seq)[-40:])
self.assertEqual(' || || ||| || || || || || | |||', hsp[0].aln_annotation['homology'][-40:])
- self.assertEqual('GCATATTTTTTCCAACCTTCTTGCCAATTCTTCA-ACAAG', str(hsp.hits[0].seq)[-40:])
+ self.assertEqual('GCATATTTTTTCCAACCTTCTTGCCAATTCTTCA-ACAAG', str(hsp.hit_all[0].seq)[-40:])
# last block
- self.assertEqual('TAAAGATGCTCTGGACAAGTACCAGTTGGAAAGAGA', str(hsp.queries[-1].seq))
+ self.assertEqual('TAAAGATGCTCTGGACAAGTACCAGTTGGAAAGAGA', str(hsp.query_all[-1].seq))
self.assertEqual(' |||||| ||| || | | ||||||||||||||', hsp[-1].aln_annotation['homology'])
- self.assertEqual('AAAAGATTTTCT--ACGACTTGCAGTTGGAAAGAGA', str(hsp.hits[-1].seq))
+ self.assertEqual('AAAAGATTTTCT--ACGACTTGCAGTTGGAAAGAGA', str(hsp.hit_all[-1].seq))
def test_exn_22_m_ungapped(self):
"""Test parsing exonerate output (exn_22_m_ungapped.exn)"""
@@ -763,20 +763,20 @@ def test_exn_22_m_ungapped(self):