Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
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
Exemplo n.º 3
0
    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
Exemplo n.º 4
0
def align(ref, seq):
    aligner = ssw_wrap.Aligner(ref, report_cigar=True, report_secondary=True)
    result = remap.alignBothStrands(seq, aligner)
    print result
Exemplo n.º 5
0
 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)