fusion module

class mavis.annotate.fusion.FusionTranscript[source]

Bases: mavis.annotate.genomic.PreTranscript

FusionTranscript is a PreTranscript built from two parent PreTranscripts. It has most of the same functionality as a regular PreTranscript except that it will not have a parent gene and retains a mapping of the new exons to the exons in the PreTranscript they originated from

Additionally the FusionTranscript is always constructed on the positive strand.

The preferred way to construct a FusionTranscript is through the build method.

classmethod build(ann, reference_genome, min_orf_size=None, max_orf_cap=None, min_domain_mapping_match=None)[source]
Parameters:
  • ann (Annotation) – the annotation object we want to build a FusionTranscript for
  • reference_genome (dict of Bio.SeqRecord by str) – dict of reference sequence by template/chr name
Returns:

the newly built fusion transcript

Return type:

FusionTranscript

exon_number(exon)[source]
Parameters:exon (Exon) – the exon to be numbered
Returns:the number of the exon in the original transcript (prior to fusion)
Return type:int
get_cdna_seq(splicing_pattern, reference_genome=None, ignore_cache=False)[source]
Parameters:
  • splicing_pattern (list of int) – the list of splicing positions
  • reference_genome (dict of Bio.SeqRecord by str) – dict of reference seq by template/chr name
Returns:

the spliced cDNA seq

Return type:

str

get_seq(reference_genome=None, ignore_cache=False)[source]
map_region_to_genome(chr, interval_on_fusion, genome_interval, flipped=False)[source]
mavis.annotate.fusion.determine_prime(transcript, breakpoint)[source]

determine the side of the transcript 5’ or 3’ which is ‘kept’ given the breakpoint

Parameters:
Returns:

5’ or 3’

Return type:

PRIME

Raises:

AttributeError – if the orientation of the breakpoint or the strand of the transcript is not specified