Skip to content

mavis/annotate/base

class ReferenceName

inherits str

Class for reference sequence names. Ensures that hg19/hg38 chromosome names match.

class BioInterval

Attributes

  • position (Interval)
  • name (Optional[str])
  • data (Dict)
  • seq (Optional[str])
  • reference_object (Any)
  • strand (Optional[str])

BioInterval.start()

the start position

@property
def start(self) -> int:

Args

  • self

Returns

  • int

BioInterval.end()

the end position

@property
def end(self) -> int:

Args

  • self

Returns

  • int

BioInterval.key()

Tuple: a tuple representing the items expected to be unique. for hashing and comparing

def key(self):

BioInterval.get_seq()

get the sequence for the current annotation object

def get_seq(self, reference_genome: Optional[ReferenceGenome] = None, ignore_cache=False):

Args

Raises

  • NotImplementedError: abstract method

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

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

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

BioInterval.to_dict()

creates a dictionary representing the current object

def to_dict(self):

Returns

  • Dict[str]: the dictionary of attribute values