align module

Should take in a sam file from a aligner like bwa aln or bwa mem and convert it into a

class mavis.align.SplitAlignment(read1, read2=None)[source]

Bases: object

static breakpoint_contig_remapped_depth(breakpoint, contig, read)[source]
opposing_strands
query_consumption()[source]

fraction of the query sequence which is aligned (everything not soft-clipped) in either alignment

query_coverage()[source]

interval representing the total region of the input sequence that is covered by the combination of alignments

query_coverage_read1()[source]
query_coverage_read2()[source]
query_overlap_extension()[source]
score(consec_bonus=10)[source]
select_supporting_alignments(bpp, alignments, min_query_consumption, min_extend_overlap, max_event_size, min_anchor_size, merge_inner_anchor, merge_outer_anchor)[source]

give a breakpoint pair and a set of alignments for contigs associated with the given pair, alignments are paired (some events cannot be represented with a single bamfile alignment) and the most appropriate alignments supporting the breakpoint pair are selected and returned

mavis.align.align_contigs(evidence, INPUT_BAM_CACHE, reference_genome, aligner, aligner_reference, aligner_output_file='aligner_out.temp', aligner_fa_input_file='aligner_in.fa', blat_min_identity=0.7, contig_aln_min_query_consumption=0.5, contig_aln_max_event_size=50, contig_aln_min_anchor_size=50, contig_aln_merge_inner_anchor=20, contig_aln_merge_outer_anchor=20, blat_limit_top_aln=25, is_protein=False, min_extend_overlap=10, clean_files=True, log=<function devnull>, **kwargs)[source]

given a set of contigs, call the aligner from the command line and adds the results to the contigs associated with each Evidence object

mavis.align.query_coverage_interval(read)[source]
Returns:The portion of the original query sequence that is aligned by this read
Return type:Interval