Skip to content

Instantly share code, notes, and snippets.

@mdshw5
Last active August 1, 2017 21:07
Show Gist options
  • Save mdshw5/a8ce8748aa6f9e7a96607e7d8b2c8bfe to your computer and use it in GitHub Desktop.
Save mdshw5/a8ce8748aa6f9e7a96607e7d8b2c8bfe to your computer and use it in GitHub Desktop.
biostars 265692
import gffutils
import pyfaidx
db = gffutils.create_db('input.gff')
fasta = pyfaidx.Fasta('input.fa')
for cds in db.features_of_type('cds', order_by='start'):
print(cds.sequence(fasta))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment