mavis.annotate.base
class mavis.annotate.base.ReferenceName
inherits str
Class for reference sequence names. Ensures that hg19/hg38 chromosome names match.
class mavis.annotate.base.BioInterval
mavis.annotate.base.BioInterval.start()
int: the start position
@property
def start(self):
Args
- self
mavis.annotate.base.BioInterval.end()
int: the end position
@property
def end(self):
Args
- self
mavis.annotate.base.BioInterval.key()
Tuple: a tuple representing the items expected to be unique. for hashing and comparing
def key(self):
mavis.annotate.base.BioInterval.get_seq()
get the sequence for the current annotation object
def get_seq(self, reference_genome=None, ignore_cache=False):
Args
- reference_genome
- ignore_cache
Raises
NotImplementedError
: abstract method
mavis.annotate.base.BioInterval.get_strand()
pulls strand information from the current object, or follows reference objects until the strand is found
def get_strand(self):
Returns
STRAND
: the strand of this or any of its reference objects
Raises
AttributeError
: raised if the strand is not set on this or any of its reference objects
mavis.annotate.base.BioInterval.is_reverse()
True if the gene is on the reverse/negative strand.
@property
def is_reverse(self):
Args
- self
Raises
AttributeError
: if the strand is not specified
mavis.annotate.base.BioInterval.get_chr()
pulls chromosome information from the current object, or follows reference objects until the chromosome is found
def get_chr(self):
Returns
str
: the chromosome of this or any of its reference objects
Raises
AttributeError
: raised if the chromosome is not set on this or any of its reference objects
mavis.annotate.base.BioInterval.to_dict()
creates a dictionary representing the current object
def to_dict(self):
Returns
Dict[str]
: the dictionary of attribute values