Skip to content

Conversation

@stitam
Copy link
Owner

@stitam stitam commented Dec 26, 2024

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.

@stitam stitam merged commit 147dfc8 into master Dec 26, 2024
6 checks passed
@stitam stitam deleted the abgram branch December 26, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants