Extract antibiograms from NCBI biosample metadata #90
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.
Related to issue #64.
This PR adds new functionality to extract antibiograms from NCBI BioSample metadata.
Example: https://www.ncbi.nlm.nih.gov/biosample/SAMN18874759/
The above BioSample contains an antibiogram in its description field. Before this PR this field was not parsed but instead the text "WEBSEQ WARNING: DESCRIPTION CONTAINS A TABLE. CHECK MANUALLY." was returned within the description variable of the returned data frame.
This PR changes the structure of the object returned by
ncbi_parse()when parsing biosample metadata. It will no longer be a data frame, but a list (!) of data frames. If none of the biosamples contain a table in their description field, it will return a list with a single data frame called "main". If any of the biosamples contain e.g. an antibiogram, these will be merged and the function will return these as a second list item.Note, the function will not explicitly look for antibiograms but any table in the description field. Note, the function is only tested to work with a single table in the description field. I have not yeet found an example with multiple tables, if I'll find one, I'll update, if necessary.