Skip to content

Instantly share code, notes, and snippets.

@bmpvieira
Forked from blahah/pubmed_retractions.sh
Created April 18, 2017 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmpvieira/251e2ca293abadcf27041bbf669e5b2c to your computer and use it in GitHub Desktop.
Save bmpvieira/251e2ca293abadcf27041bbf669e5b2c to your computer and use it in GitHub Desktop.
easily find retracted papers in PubMed, using only bionode-ncbi and jq
# you'll need:
# - bionode-ncbi (https://github.com/bionode/bionode-ncbi)
# - jq (https://github.com/stedolan/jq)
# count the number of retracted papers
bionode-ncbi search pubmed "\"Retracted Publication\"" \
| jq -c 'select(.pubtype[] | inside("Retracted Publication"))'
| wc -l
# get DOIs for all the retracted papers
# note that not all retracted papers have DOIs - those without DOIs will be left out of this list
bionode-ncbi search pubmed "\"Retracted Publication\"" \
| jq -c 'select(.pubtype[] | inside("Retracted Publication")) | .articleids | .[] | select(.idtype == "doi")| .value' \
> pubmed_retracted_DOIs.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment