call module

class mavis.validate.call.EventCall(b1, b2, source_evidence, event_type, call_method, break2_call_method=None, contig=None, contig_alignment=None, untemplated_seq=None)[source]

Bases: mavis.breakpoint.BreakpointPair

class for holding evidence and the related calls since we can’t freeze the evidence object directly without a lot of copying. Instead we use call objects which are basically just a reference to the evidence object and decisions on class, exact breakpoints, etc

Parameters:
  • evidence (Evidence) – the evidence object we are calling based on
  • event_type (SVTYPE) – the type of structural variant
  • breakpoint_pair (BreakpointPair) – the breakpoint pair representing the exact breakpoints
  • call_method (CALL_METHOD) – the way the breakpoints were called
  • contig (Contig) – the contig used to call the breakpoints (if applicable)
add_break1_split_read(read)[source]
add_break2_split_read(read)[source]
add_flanking_support(flanking_pairs)[source]

counts the flanking read-pair support for the event called. The original source evidence may have contained evidence for multiple events and uses a larger range so flanking pairs here are checked specifically against the current breakpoint call

Returns:
  • set of str - set of the read query_names
  • int - the median insert size
  • int - the standard deviation (from the median) of the insert size
Return type:tuple

see theory - determining flanking support

add_spanning_read(read)[source]
flanking_metrics()[source]

computes the median and standard deviation of the flanking pairs. Note that standard deviation is calculated wrt the median and not the average. Also that the fragment size is calculated as a range so the start and end of the range are used in computing these metrics

Returns:
  • float - the median fragment size
  • float - the fragment size standard deviation wrt the median
Return type:tuple
flatten()[source]
support()[source]
mavis.validate.call.call_events(source_evidence)[source]

generates a set of event calls based on the evidence associated with the source_evidence object will also narrow down the event type

Parameters:
  • source_evidence (Evidence) – the input evidence
  • event_type (SVTYPE) – the type of event we are collecting evidence for
Returns:

list of calls

Return type:

list of EventCall