Skip to content


This is the primary module responsible for generating svg visualizations




HEX_BLACK = '#000000'


this is the main drawing function. It decides between layouts where each view-level is split into one or two diagrams (side-by-side) dependant on whether the event is interchromosomal, within a single transcript, etc.

Diagrams have four levels - template - gene - transcript - fusion transcript/translation

def draw_sv_summary_diagram(
    config: DiagramSettings,
    ann: Annotation,
    reference_genome: ReferenceGenome = None,
    templates: List[Template] = None,
    ignore_absent_templates: bool = True,
    user_friendly_labels: bool = True,
    template_display_label_prefix: str = '',
    draw_reference_transcripts: bool = True,
    draw_reference_genes: bool = True,
    draw_reference_templates: bool = True,
    draw_fusion_transcript: bool = True,
    stack_reference_transcripts: bool = False,


  • config (DiagramSettings)
  • ann (Annotation): the annotation object to be illustrated
  • reference_genome (ReferenceGenome): reference sequences
  • templates (List[Template]): list of templates, used in drawing the template-level view

  • template_display_label_prefix (str): the character to precede the template label

  • draw_reference_transcripts (bool)
  • draw_reference_genes (bool)
  • draw_reference_templates (bool)
  • draw_fusion_transcript (bool)
  • stack_reference_transcripts (bool)