Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a function that parses the XML Annotation data properly. Removed existing code reading it as a string.
Fixes issue #21
Comment
All annotations are now (from the XML annotations) are created as list. Optionally, the annotations that only refer to a single id per databse can be strings, but I thought this was more consistent. Anyway, it is easy to change this.
Demonstration
OrderedDict([('SBOTerm', 'SBO:0000176'),
('ec-code', ['2.6.1.19']),
('rhea', ['23352', '23353', '23354', '23355']),
('biocyc', ['META:GABATRANSAM-RXN']),
('metanetx.reaction', ['MNXR95186']),
('kegg.reaction', ['R01648']),
('seed.reaction', ['rxn01204'])])
OrderedDict([('FORMULA', 'C6H12O6'),
('CHARGE', '0'),
('SBOTerm', 'SBO:0000247'),
('kegg.compound', ['C00031']),
('chebi',
['CHEBI:12965', 'CHEBI:17634', 'CHEBI:20999', 'CHEBI:4167']),
('kegg.drug', ['D00009']),
('hmdb', ['HMDB00122', 'HMDB06564']),
('biocyc', ['META:Glucopyranose']),
('metanetx.chemical', ['MNXM41']),
('inchikey', ['WQZGKKKJIJFFOK-GASJEMHNSA-N']),
('seed.compound', ['cpd00027', 'cpd26821'])])