Mercurial > repos > cpt_testbed > functionalworkflow
comparison fasta_len.py @ 0:f678e282b320 draft default tip
"planemo upload"
author | cpt_testbed |
---|---|
date | Fri, 06 May 2022 07:07:23 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f678e282b320 |
---|---|
1 #!/usr/bin/env python | |
2 import argparse | |
3 from Bio import SeqIO | |
4 import sys | |
5 | |
6 | |
7 if __name__ == "__main__": | |
8 parser = argparse.ArgumentParser() | |
9 parser.add_argument("fasta", type=argparse.FileType("r")) | |
10 args = parser.parse_args() | |
11 | |
12 for record in SeqIO.parse(args.fasta, "fasta"): | |
13 sys.stdout.write("%s\t%s\n" % (record.id, len(record))) |