Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a command 'pubmed-annotate' to retrieve PMIDs for a search term, then apply a template to all of them to extract info #127

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

justaddcoffee
Copy link
Member

@justaddcoffee justaddcoffee commented Jun 7, 2023

@AgranyaGitHub @caufieldjh @pnrobinson along the lines of what we discussed today

@justaddcoffee justaddcoffee marked this pull request as draft June 7, 2023 20:13
@AgranyaGitHub AgranyaGitHub marked this pull request as ready for review June 7, 2023 20:41
@AgranyaGitHub AgranyaGitHub merged commit 79ff420 into ibd_template Jun 7, 2023
@AgranyaGitHub AgranyaGitHub deleted the pubmed_annotate branch June 7, 2023 20:47
@@ -280,6 +280,26 @@ def pubmed_extract(pmid, template, output, output_format, **kwargs):
write_extraction(results, output, output_format)


@main.command()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note we already have pubmed-extract which I think does the same thing...?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or rather search-and-extract

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open to suggestions here, but pubmed-extract (IIUC) takes a list of PMIDs and extracts info

The idea here is to take a search term, retrieve PMIDs, then extract info on all of them

Glad to refactor if there is a better way to do this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be more intuitive to modify pubmed-extract to accept more than one PMID

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

though that also assumes you already have the PMIDs, so maybe more like providing a flag to do the search, output the PMID list, then pass that to extract

While making the distinction that there's also a use case for search -> get PMIDs -> extract keywords -> new search -> new PMIDs -> extract/summarize

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my $0.02 I'd say why not make a command to do this in one go, rather than making the user run two commands (one to get PMIDs and another to extract info)

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.

4 participants