Пример #1
0
def main():
    filename, pattern , alphabet = parse_args(sys.argv)
    t = read_genome(filename)
    p_bm = BoyerMoore(pattern, alphabet)
    occurences, character_comparison_total, alignmnets_tried = boyer_moore(pattern, t, n)
    print(" The pattern matches the genome %d times at locations %s " % (len(occurences), occurences))
    print(" alignments tried: %d, character comparisons: %d" % (alignmnets_tried, character_comparison_total))
def main():
    filename, barcode_file, mismatch = parse_args(sys.argv)
    reference_file = read_genome(filename)
    barcodes = read_barcodes(barcode_file)
    barcode_count = count_barcodes_v2(barcodes, reference_file, mismatch)
    write_to_csv("%s_result.csv" % filename, barcode_count)
    print(" Table of barcodes %s " % (barcode_count))
Пример #3
0
def main():
    filename, pattern = parse_args(sys.argv)
    reference_genome = read_genome(filename)
    #f.close() opened in utils, should I close it in utils?????
    occur, occur_rc = naive_rc(pattern, reference_genome)
    print(" The pattern matches the genome at locations %s " % occur)
    print(" The RC matches the genome at locations %s " % occur_rc)
    print("Occurences: %d, Occurences in RC: %d, Total: %d" %
          (len(occur), len(occur_rc), (len(occur) + len(occur_rc))))
Пример #4
0
def main():
    filename, pattern, mismatch = parse_args(sys.argv)
    t = read_genome(filename)
    all_matches, index_hits = approximate_match(pattern, t, mismatch)
    print("there are %d exact macthes and %d index hits. Hit locations: %s" %
          (len(all_matches), index_hits, all_matches))
Пример #5
0
def main():
    filename, pattern, mismatch = parse_args(sys.argv)
    reference_genome = read_genome(filename)
    result, character_comparison_total, alignmnets_tried = naive(pattern, reference_genome, mismatch)
    print(" The pattern matches the genome %d times at locations %s " % (len(result), result))
    print(" alignments tried: %d, character comparisons: %d" % (alignmnets_tried, character_comparison_total))
Пример #6
0
def main():
    filename, pattern = parse_args(sys.argv)
    reference_genome = read_genome(filename)
    #f.close() opened in utils, should I close it in utils?????
    result = naive(pattern, reference_genome)
    print(" The pattern matches the genome %d times at locations %s " % (len(result), result))