@Istvan Albert I'm new to Biopython and trying to figure it out, I was able to print out what you suggested above. I have three gb records, genome.gb, bacteria1.gb, bacteria2.gb that have several entries inside them and I want to sort them just the records themselves by type?
Split multple gbk records by molecule type
I have multiple genbank gz files that I'm trying to sort by the molecule_type in biopython. For it to grab the protein gz files and the nucleotides in a separate entry.
• 1,479 views
•
link
1 answer
Here is a recent post on how to extract the qualifiers of the source feature.
As you can see there the mol_type is a key in the same ordered dictionary
How can I print and write the strain /isolate/voucher number of a SeqRecord objec in biopython?
to open a gz file, use gzopen.open
• 0 views
•
link
• 0 views
•
link
Make a list that contains all records, then use the sort function with a key as explained here:
https://docs.python.org/3/howto/sorting.html
then you'll have a sorted list
• 0 views
•
link
Log in to answer this question.