def align(seq1, seq2, min_overlap_frac=0.9): aligner = Aligner(seq1, 0.0, SEMIGLOBAL, False, False) aligner.min_overlap = math.ceil(min(len(seq1), len(seq2)) * min_overlap_frac) aligner.indel_cost = 100000 match = aligner.locate(seq2) if match: return seq1[match[0] : match[1]] else: return None
def align(seq1, seq2, min_overlap_frac=0.9): aligner = Aligner(seq1, 0.0, SEMIGLOBAL, False, False) aligner.min_overlap = math.ceil( min(len(seq1), len(seq2)) * min_overlap_frac) aligner.indel_cost = 100000 match = aligner.locate(seq2) if match: return seq1[match[0]:match[1]] else: return None
def align(seq1, seq2, min_overlap_frac=0.9): """Align two sequences. Args: seq1: The second sequence to align. seq2: The first sequence to align. min_overlap_frac: Minimum fraction of overlapping bases required for a match. Returns: The matching portion of the sequence. """ aligner = Aligner(seq1, 0.0, SEMIGLOBAL, False, False) aligner.min_overlap = math.ceil( min(len(seq1), len(seq2)) * min_overlap_frac) aligner.indel_cost = 100000 match = aligner.locate(seq2) if match: return seq1[match[0]:match[1]] else: return None
def align(seq1, seq2, min_overlap_frac=0.9): """Align two sequences. Args: seq1, seq2: The sequences to align. min_overlap_frac: Minimum fraction of overlapping bases required for a match. Returns: The matching portion of the sequence. """ aligner = Aligner( seq1, 0.0, SEMIGLOBAL, False, False) aligner.min_overlap = math.ceil( min(len(seq1), len(seq2)) * min_overlap_frac) aligner.indel_cost = 100000 match = aligner.locate(seq2) if match: return seq1[match[0]:match[1]] else: return None