Mercurial > repos > cpt_testbed > functionalworkflow
comparison gff3_reformat.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 sys | |
| 3 import argparse | |
| 4 from CPT_GFFParser import gffParse, gffWrite | |
| 5 import logging | |
| 6 | |
| 7 logging.basicConfig(level=logging.INFO) | |
| 8 | |
| 9 | |
| 10 def reformat(data): | |
| 11 for record in gffParse(data): | |
| 12 record.annotations = {} | |
| 13 gffWrite([record], sys.stdout) | |
| 14 | |
| 15 | |
| 16 if __name__ == "__main__": | |
| 17 parser = argparse.ArgumentParser(description="Reformat GFF files") | |
| 18 parser.add_argument("data", type=argparse.FileType("r"), help="Input annotations") | |
| 19 args = parser.parse_args() | |
| 20 reformat(**vars(args)) |
