dasi.models.Alignment¶
-
class
dasi.models.
Alignment
(query_region, subject_region, atype, query_key, subject_key, meta=None)[source]¶ Bases:
dasi.models.alignment.RepresentsMolecule
,collections.abc.Sized
A pair of Regions that ‘aligns’ two regions of DNA sequences. All regions must always be the same length.
A subregion of both regions may be taken.
Makes an alignment between two regions of sequences. Validates the regions are the same length.
- Parameters
Methods
copy
([atype])Do shallow copy of this alignment.
size_ok
()Determine if the size of this molecule is ‘acceptable’ from the bounded molecule type.
sub_region
(qstart, qend[, atype])Returns a copy of the alignment between the inclusive start and end relative to the query region.
-
__init__
(query_region, subject_region, atype, query_key, subject_key, meta=None)[source]¶ Makes an alignment between two regions of sequences. Validates the regions are the same length.
Methods
__init__
(query_region, subject_region, …)Makes an alignment between two regions of sequences.
copy
([atype])Do shallow copy of this alignment.
eq_hash
()is_perfect_subject
()size_ok
()Determine if the size of this molecule is ‘acceptable’ from the bounded molecule type.
sub_region
(qstart, qend[, atype])Returns a copy of the alignment between the inclusive start and end relative to the query region.
validate
()Attributes
query_key
query_region
subject_key
subject_region
type
uid
-
copy
(atype=None)[source]¶ Do shallow copy of this alignment. Query and subject regions between this and the copied alignment will be identical.
- Parameters
atype – new alignment type
- Return type
Alignment
- Returns
-
size_ok
()¶ Determine if the size of this molecule is ‘acceptable’ from the bounded molecule type.
- Returns
whether this passes the size requirement of the molecule type.
-
sub_region
(qstart, qend, atype=None)[source]¶ Returns a copy of the alignment between the inclusive start and end relative to the query region.
- Parameters
qstart (
int
) – start of the query sub regionqend (
int
) – end of the query sub regionatype – optional type of alignment to return
- Return type
Alignment
- Returns