diff --git a/src/poly_a.py b/src/poly_a.py index b04574470c1bb290fd35f22fb83949563f390e3a..6ca8baf9f7a7a41d7e114edae89adb673ac0f665 100644 --- a/src/poly_a.py +++ b/src/poly_a.py @@ -72,13 +72,12 @@ def generate_poly_a( def main(): - """Append poly A tails to fasta sequences and write to file - - This function iterates over `input` fasta sequences from a specified file, - appends tails of given `length` and composition specified by `weights`, + """Append poly A tails to fasta sequences and write to file. + + This function iterates over `input` fasta sequences from a specified file, + appends tails of given `length` and composition specified by `weights`, and writes them to file specified as `output`. """ - parser = argparse.ArgumentParser(description='Process some integers.') parser.add_argument('-i', '--input', required=True, help='Fasta file to add tails to') @@ -91,7 +90,7 @@ def main(): args = parser.parse_args() new_records = [] - for fasta in SeqIO.parse(open(args.input),'fasta'): + for fasta in SeqIO.parse(open(args.input), 'fasta'): new_seq = fasta.seq + Seq(generate_poly_a(args.length, args.weights)) new_records.append(SeqRecord(new_seq, id=fasta.id, description=fasta.description)) SeqIO.write(new_records, args.output, "fasta")