view gff3_reformat.py @ 0:f678e282b320 draft default tip

"planemo upload"
author cpt_testbed
date Fri, 06 May 2022 07:07:23 +0000
parents
children
line wrap: on
line source

#!/usr/bin/env python
import sys
import argparse
from CPT_GFFParser import gffParse, gffWrite
import logging

logging.basicConfig(level=logging.INFO)


def reformat(data):
    for record in gffParse(data):
        record.annotations = {}
        gffWrite([record], sys.stdout)


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Reformat GFF files")
    parser.add_argument("data", type=argparse.FileType("r"), help="Input annotations")
    args = parser.parse_args()
    reformat(**vars(args))