align module

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

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_percent_of_max_score=0.8, 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, pair_scoring_function=<function paired_alignment_score>, 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 asscoated with each Evidence object

mavis.align.paired_alignment_score(read1, read2=None)[source]
mavis.align.query_coverage_interval(read)[source]
Returns:The portion of the original query sequence that is aligned by this read
Return type:Interval
mavis.align.select_paired_alignments(bpp, aligned_contigs, 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