daler / gffutils

GFF and GTF file manipulation and interconversion
http://daler.github.io/gffutils
MIT License
282 stars 76 forks source link

how to save the modified gff to the disk #217

Closed z626093820 closed 1 year ago

z626093820 commented 1 year ago

Excuse me, how to save the modified gff file to the hard disk? thanks in advance

novigit commented 1 year ago

Once you have done what you wanted to do with your loaded input GFF3 file (here stored in the db object), I use this snippet to print the entire db into a logical order

# print updated gff record in logical order
for g in db.features_of_type('gene', order_by=('seqid', 'start')):
    print()
    print(g)
    for f in db.children(g, order_by='start'):
        print(f)
z626093820 commented 1 year ago

THANKYOU!!