def main(): ap = ArgumentParser() ap.add_argument("genome", nargs=1) args = ap.parse_args() genome = load(args.genome[0]) codons = to_codons(genome) shuffle(codons) print(from_codons(codons))
def main(): ap = ArgumentParser() ap.add_argument("genome", nargs=1) ap.add_argument("range", help="For example 24750..24983", nargs="+") args = ap.parse_args() genome = load(args.genome[0]) for r in args.range: start, end = [int(x) for x in re.split(r'[^\d+]', r) if x] print(r) print(fill(genome[start:end], 80))
def main(): ap = ArgumentParser() ap.add_argument("haystacks", nargs="+") ap.add_argument("-t", "--needle", type=str) ap.add_argument("-v", "--verbose", action="store_true") args = ap.parse_args() term = args.needle.lower() for h in args.haystacks: genome = load(h) n = search(genome, term, args.verbose) print("{}: {}".format(h, n))
def main(): ap = ArgumentParser() ap.add_argument('-n', "--newlines", action="store_true") ap.add_argument("genome", nargs=1) args = ap.parse_args() genome = load(args.genome[0]) aa = convert_to_aa(genome) if args.newlines: for a in aa: print(a) else: print(convert_to_aa(genome))
def main(): ap = ArgumentParser() ap.add_argument("genome", nargs="+") ap.add_argument('-s', "--shift", type=int) args = ap.parse_args() for fname in args.genome: genome = cg.load(fname) if args.shift: genome = genome[args.shift:] display(genome)