Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import gffutils
- import sys
- def parse_anotation(anotation_file):
- anotation = gffutils.create_db(dbfn=anotation_file, data="Somedata", force=True, keep_order=True, merge_strategy='merge', sort_attribute_values=True)
- db = gffutils.FeatureDB(anotation, keep_order=True)
- return db
- def main(anotation_file):
- anotation = parse_anotation(anotation_file)
- for item in anotation.children(gene, featuretype="CDS"):
- print (item.start," ",item.end)
- main(sys.argv[1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement