def __init__(self, namesToReferences): from ssw import ssw_wrap self.namesToAligners = {} for name, ref in namesToReferences.iteritems(): self.namesToAligners[name] = ssw_wrap.Aligner( ref, report_cigar=True, report_secondary=True)
def check_swalign(): try: from ssw import ssw_wrap aligner = ssw_wrap.Aligner("AGTCGT", report_cigar=True, report_secondary=True) aligner.align("AGTC") except OSError: return False return True
def __init__(self, namesToReferences, tryExact=False): from ssw import ssw_wrap self.tryExact = tryExact self.namesToAligners = {} self.namesToRefs = {} for name, ref in namesToReferences.items(): self.namesToAligners[name] = ssw_wrap.Aligner( ref, report_cigar=True, report_secondary=True) self.namesToRefs[name] = ref
def align(ref, seq): aligner = ssw_wrap.Aligner(ref, report_cigar=True, report_secondary=True) result = remap.alignBothStrands(seq, aligner) print result
def __init__(self, names_to_contigs): self.names_to_aligners = collections.OrderedDict() for name, contig in names_to_contigs.items(): self.names_to_aligners[name] = ssw_wrap.Aligner( contig, report_cigar=True, report_secondary=True)