dasi.models.AlignmentGroup¶
-
class
dasi.models.
AlignmentGroup
(alignments, group_type, name=None, meta=None)[source]¶ Bases:
dasi.models.alignment.AlignmentGroupBase
A representative Alignment representing a group of alignments sharing the same starting and ending position for a query sequence.
- Parameters
alignments (
List
[Alignment
]) –group_type (
str
) –name (
Optional
[str
]) –query_region –
meta (
Optional
[dict
]) –
Methods
prioritize_alignments
(indices)Prioritize alignments by pushing groupings at the given indices into the front of the alignments list.
reindex_alignments
(indices)Reindex the alignments list by index.
size_ok
()Determine if the size of this molecule is ‘acceptable’ from the bounded molecule type.
sub_region
(qstart, qend, atype)Produce a new alignment group with sub-regions of the query region and subject regions at the specified new indicies.
Attributes
Return the query key associated with the query region.
Return the list of subject keys in this alignment group.
Return the list of subject regions in this alignment group.
-
__init__
(alignments, group_type, name=None, meta=None)[source]¶ - Parameters
alignments (
List
[Alignment
]) –group_type (
str
) –name (
Optional
[str
]) –query_region –
meta (
Optional
[dict
]) –
Methods
__init__
(alignments, group_type[, name, meta])- type alignments
List
[Alignment
]
size_ok
()Determine if the size of this molecule is ‘acceptable’ from the bounded molecule type.
sub_region
(qstart, qend, atype)Produce a new alignment group with sub-regions of the query region and subject regions at the specified new indicies.
Attributes
alignments
meta
name
Return the query key associated with the query region.
query_region
Return the list of subject keys in this alignment group.
Return the list of subject regions in this alignment group.
type
-
prioritize_alignments
(indices)[source]¶ Prioritize alignments by pushing groupings at the given indices into the front of the alignments list.
- Parameters
indices (
List
[int
]) – list of indices to prioritize- Returns
None
-
property
query_key
¶ Return the query key associated with the query region.
- Return type
str
-
reindex_alignments
(indices)[source]¶ Reindex the alignments list by index.
- Parameters
indices (
List
[int
]) – list of indices- Returns
None
-
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)¶ Produce a new alignment group with sub-regions of the query region and subject regions at the specified new indicies.
- Return type
AlignmentGroupBase
-
property
subject_keys
¶ Return the list of subject keys in this alignment group.
- Return type
List
[str
]