{"id":16619446,"url":"https://github.com/dvklopfenstein/pmidcite","last_synced_at":"2025-04-02T18:10:40.690Z","repository":{"id":39740786,"uuid":"223454354","full_name":"dvklopfenstein/pmidcite","owner":"dvklopfenstein","description":"Turbocharge a PubMed literature search rather than clicking and clicking and clicking on Google Scholar","archived":false,"fork":false,"pushed_at":"2024-09-30T16:20:39.000Z","size":23542,"stargazers_count":30,"open_issues_count":8,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-24T02:56:43.838Z","etag":null,"topics":["citation-analysis","citation-counts","citation-downloader","citedby","command-line-tool","library","literature-review","literature-search","ncbi","nih-citation-data","pmid","pubmed","snowballing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dvklopfenstein.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["dvklopfenstein"]}},"created_at":"2019-11-22T17:36:34.000Z","updated_at":"2025-01-08T16:24:24.000Z","dependencies_parsed_at":"2023-02-16T09:01:17.162Z","dependency_job_id":"85add94e-3cda-48b2-9815-502ddddcd0fe","html_url":"https://github.com/dvklopfenstein/pmidcite","commit_stats":{"total_commits":745,"total_committers":3,"mean_commits":"248.33333333333334","dds":0.01744966442953022,"last_synced_commit":"bc6037a834eaada2fb5282aaaf071f659c3a4f82"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvklopfenstein%2Fpmidcite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvklopfenstein%2Fpmidcite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvklopfenstein%2Fpmidcite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvklopfenstein%2Fpmidcite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dvklopfenstein","download_url":"https://codeload.github.com/dvklopfenstein/pmidcite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246866097,"owners_count":20846496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["citation-analysis","citation-counts","citation-downloader","citedby","command-line-tool","library","literature-review","literature-search","ncbi","nih-citation-data","pmid","pubmed","snowballing"],"created_at":"2024-10-12T02:25:26.729Z","updated_at":"2025-04-02T18:10:40.657Z","avatar_url":"https://github.com/dvklopfenstein.png","language":"Python","funding_links":["https://github.com/sponsors/dvklopfenstein"],"categories":[],"sub_categories":[],"readme":"# PubMed ID (PMID) Cite\n\n[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Python%20library%20to%20download%20pubmed%20citation%20counts%20and%20data,%20given%20a%20PMID\u0026url=https://github.com/dvklopfenstein/pmidcite\u0026via=dvklopfenstein\u0026hashtags=pubmed,pmid,citations,pubmed2cite,writingtips,scientificwriting)\n[![CodeQL](https://github.com/dvklopfenstein/pmidcite/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/dvklopfenstein/pmidcite/actions/workflows/codeql-analysis.yml)\n[![Latest PyPI version](https://img.shields.io/pypi/v/pmidcite.svg)](https://pypi.org/project/pmidcite/)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5172712.svg)](https://doi.org/10.5281/zenodo.5172712)\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/dvklopfenstein/pmidcite/raw/main/docs/images/pmidcite_citedby.png\" alt=\"pmidcite summary\" width=\"500\"/\u003e\u003c/p\u003e\n\nTurbocharge a [**PubMed**](https://pubmed.ncbi.nlm.nih.gov) literature search with the command, `icite`, rather than clicking and clicking and clicking on [**Google Scholar**](/doc/images/README_twitter.md) \"*Cited by N*\" links.\n\nThis open-source project is part of [**a peer-reviewed**](https://pubmed.ncbi.nlm.nih.gov/33031632) [**commentary**](https://onlinelibrary.wiley.com/doi/10.1002/jrsm.1456) that was invited by the editors of [***Research Synthesis Methods***](https://onlinelibrary.wiley.com/journal/17592887).\nPlease [**Cite**](#how-to-cite) if you use *pmidcite* in your research or literature search.    \n\nContact: dvklopfenstein@protonmail.com     \n\n# PubMed and NIH Citation data\nPubMed contains peer-reviewed research papers\nin biomedicine, biochemistry, chemistry, behavioral science, and other life sciences.\n[**Citation data**](https://icite.od.nih.gov) is downloaded\neach time `icite` is run\nfrom the [**National Institutes of Health (NIH)**](https://www.nih.gov/) and includes:\n* Citation counts of all papers and clinical papers\n* Performance of a paper among its peer papers\n* Existence of MeSH terms for the human, animal, and molecular/cellular categories\n\n# Table of Contents\n* ***Quickstart on the*** [***command line***](https://github.com/dvklopfenstein/pmidcite/blob/main/README.md#command-line-interface-cli)\n  * [**1) Download citation counts and data for a research paper**](https://github.com/dvklopfenstein/pmidcite#1-download-citation-counts-and-data-for-a-research-paper)\n  * [**2) Forward citation search**](https://github.com/dvklopfenstein/pmidcite#2-forward-citation-search): following a paper's *Cited by* links or *Forward snowballing*\n  * [**3) Backward citation search**](https://github.com/dvklopfenstein/pmidcite#3-backward-citation-search): following the links to a paper's references or *Backward snowballing*\n  * [**4) Summarize a group of citations**](https://github.com/dvklopfenstein/pmidcite#4-summarize-a-group-of-citations)\n  * [**5) Download citations for all papers returned from a PubMed search**](https://github.com/dvklopfenstein/pmidcite/blob/main/README.md#5-download-citations-for-all-papers-returned-from-a-pubmed-search)\n* ***Examples in Jupyter notebooks using the *pmidcite* Python library***\n  * [**1) Download NIH-OCC citation data**](https://github.com/dvklopfenstein/pmidcite/blob/main/notebooks/NIHOCC_data_download_always.ipynb)\n  * [**2) Download missing or load existing NIH-OCC citation data**](https://github.com/dvklopfenstein/pmidcite/blob/main/notebooks/NIHOCC_data_download_or_import.ipynb)\n  * [**3) Print a paper's citation and reference data**](https://github.com/dvklopfenstein/pmidcite/blob/main/notebooks/print_paper_all_refs_cites.ipynb)\n  * [**4) Sort NIH iCite entries**](https://github.com/dvklopfenstein/pmidcite/blob/main/notebooks/print_paper_sort_cites.ipynb)\n  * [**5) Query PubMed**](https://github.com/dvklopfenstein/pmidcite/blob/main/notebooks/query_pubmed.ipynb)\n* ***Installation \u0026 citation***:\n  * [**Installation**](#installation)\n  * [**Setup**](#setup)\n  * [**Google Scholar vs. PubMed**](https://github.com/dvklopfenstein/pmidcite/blob/main/README.md#pubmed-vs-google-scholar)\n    * [**What is in PubMed?**](https://github.com/dvklopfenstein/pmidcite/blob/main/README.md#what-is-in-pubmed--take-a-quick-tour)\n  * [**How to Cite *pmidcite***](#how-to-cite)\n  * [**Contributing**](#contributing)\n* [***References***](#references)\n\n## 1) Download citation counts and data for a research paper\n```$ icite -H 26032263```    \n* This paper (PMID 26032263) has `25` citations, `10` references, and `4` authors.    \n* This paper is performing well (`74`th percentile in column `%`) compared to its [peers](https://icite.od.nih.gov/user_guide?page_id=ug_overview).    \n    \n![Starting usage](https://github.com/dvklopfenstein/pmidcite/raw/main/docs/images/pmidcite0.png)\n### NIH percentile\nThis paper is performing well (`74`th percentile) compared to its [peers](https://icite.od.nih.gov/user_guide?page_id=ug_overview) (column `%`).     \n\nThe NIH percentile grouping (column `G`) helps to\nhighlight the better performing papers in groups `2`, `3`, and `4` by\nsorting the citing papers by group first, then publication year.\n\nThe sort places the lower performing papers in groups `0` or `1` at the back.\n\nNew papers appear at the beginning of a sorted list,\nno matter how many citations they have to\nbetter facilitate researchers in finding the latest discoveries.\n\nThe grouping of papers by NIH percentile grouping is a novel feature created by [dvklopfenstein](https://github.com/dvklopfenstein) for this project.\n\n## 2) Forward citation search\n\u003cp align=\"left\"\u003e\u003cimg src=\"https://github.com/dvklopfenstein/pmidcite/raw/main/docs/images/pmidcite_citedby_cit.png\" alt=\"pmidcite summary\" width=\"300\"/\u003e\u003c/p\u003e\n\nAlso known as following a paper's *Cited by* links or *Forward snowballing*    \n\n```icite -H; icite 26032263 --load_citations | sort -k6 -r```    \nor    \n```icite -H; icite 26032263 -c | sort -k6 -r```    \n\n\n## 3) Backward citation search\nAlso known as following links to a paper's references or *Backward snowballing*    \n\u003cp align=\"left\"\u003e\u003cimg src=\"https://github.com/dvklopfenstein/pmidcite/raw/main/docs/images/pmidcite_citedby_ref.png\" alt=\"pmidcite summary\" width=\"300\"/\u003e\u003c/p\u003e\n\n```$ icite -H; icite 26032263 --load_references | sort -k6 -r```    \nor    \n```$ icite -H; icite 26032263 -r | sort -k6 -r```     \n\n## 4) Summarize a group of citations\nCreate a file containing numerous PMIDs annotated with icite info\n```\n$ icite 30022098 -c -o goatools_cites.txt\n  WROTE: goatools_cites.txt\n```\n\nCount the number of lines in the file\n```\n$ wc -l goatools_cites.txt\n468 goatools_cites.txt\n```\n\nSummarize the papers in \"goatools_cites.txt\"\n```\n$ sumpaps goatools_cites.txt\ni=026.9% 4=003.0% 3=018.9% 2=028.8% 1=015.9% 0=006.5%   6 years:2018-2024   465 papers goatools_cites.txt\n```\n* The output is on one line so many files containing sets of PMIDs may be compared\n* The groups are from newest(`i`) to top-performing(`4`), great(`3`), very good(`2`), and overlooked(`1` and `0`)\n\n\n## 5) Download citations for all papers returned from a PubMed search\n1. [Do a search in PubMed](#1-do-a-search-in-pubmed)\n2. [Save all results into a file containing all PMIDs found by the search](#2-save-all-results-into-a-list-of-pmids)\n3. [Download the list of PMIDs](#3-download-the-list-of-pmids)\n4. [Run icite to analyze all the PMIDs](#4-run-icite-to-analyze-all-the-pmids)\n\n### 1. Do a search in [PubMed](https://pubmed.ncbi.nlm.nih.gov/)\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/dvklopfenstein/pmidcite/raw/main/doc/images/pubmed_HIV_AND_Me_srch.png\" alt=\"pmidcite summary\" width=\"800\"/\u003e\u003c/p\u003e   \n\n### 2. Save all results into a list of PMIDs\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/dvklopfenstein/pmidcite/raw/main/doc/images/pubmed_HIV_AND_Me_save.png\" alt=\"pmidcite summary\" width=\"800\"/\u003e\u003c/p\u003e   \n\n### 3. Download the list of PMIDs\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/dvklopfenstein/pmidcite/raw/main/doc/images/pubmed_HIV_AND_Me_dnld.png\" alt=\"pmidcite summary\" width=\"800\"/\u003e\u003c/p\u003e   \n\n### 4. Run icite to analyze all the PMIDs\n```\n$ icite -i pmid-HIVANDDNAm-set.txt -o pmid-HIVANDDNAm-icite.txt\n$ grep TOP pmid-HIVANDDNAm-icite.txt | sort -k6\n```\n\n\n## Command Line Interface (CLI)\n\nA Command-Line Interface (CLI) can be preferable \nto a Graphical User Interface (GUI) because: \n* processing can be automated from a script\n* time-consuming mouse clicking is reduced\n* more data can be seen at once on a text screen\nthan in a browser, giving the researcher \na better overall impression of the full set of information [[1]](#how-to-cite)\n\nResearchers who use Linux or Mac already work from the command line.\nResearchers who use Windows can get that Linux-like command line feeling\nwhile still running native Windows programs by\ndownloading Cygwin from https://www.cygwin.com/ [[1]](#how-to-cite).\n\n\n# PubMed vs Google Scholar\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/dvklopfenstein/pmidcite/raw/main/docs/images/Search_Features_GS_v_PubMed.png\" alt=\"Google Scholar vs PubMed\" width=\"600\"/\u003e\n\u003c/p\u003e\n\nIn 2013, Boeker et al. [[6](#references)]\nrecommended that a scientific search interface contain five integrated search criteria. \nPubMed implements all five, while Google did not in 2013 or today.\n\nGoogle's highly popular implementation of the forward citation search through their ubiquitous \"Cited by N\" links\nis a \"Better\" experience than the PubMed's \"forward citation search\" implementation.\n\nBut if your research is in the health sciences and\nyou are amenable to working from the [command line](#command-line-interface-cli),\nyou can use PubMed in your browser plus\ncitation data downloaded from the NIH using the command-line  using *pmidcite*.\nThe NIH's citation data includes a paper's ranking among its co-citation network.\n\n\n## What is in [PubMed](https://pubmed.ncbi.nlm.nih.gov)?  Take a [**quick tour**](https://www.nlm.nih.gov/pubs/techbull/ma20/brief/ma20_pubmed_essentials.html)\n\u003cimg src=\"https://github.com/dvklopfenstein/pmidcite/raw/main/docs/images/pubmed_content_2020_01_10.png\" alt=\"PubMed Contents\" width=\"850\"/\u003e\n\nPubMed is a search interface and toolset used to access over 30.5 million article records from databases such as:\n* **MEDLINE**: a highly selective database started in the 1960s\n* **PubMed Central (PMC)**: an open-access database for full-text papers that are free of cost\n* Additional content such as books and articles published before the 1960s\n\n\n## Installation\nTo install from [**PyPI**](https://pypi.org/project/pmidcite/)    \n```$ pip3 install pmidcite```\n\nTo install locally\n```\n$ git clone https://github.com/dvklopfenstein/pmidcite.git\n$ cd ./pmidcite\n$ pip3 install .\n```\n\n## Setup\nSave your literature search in a GitHub repo.\n\n### 1. Add a [pmidcite init file](doc/example_cfg/.pmidciterc)\nAdd a .pmidciterc init file to a non-git managed directory, such as home (~)\n```\n$ icite --generate-rcfile | tee ~/.pmidciterc\n[pmidcite]\nemail = myname@email.edu\n# To download PubMed search results, get an NCBI API key here:\n# https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities\napikey = MY_LONG_HEX_NCBI_API_KEY\ntool = my_scripts\n```\n```\n$ export PMIDCITECONF=~/.pmidciterc\n```\nDo not version manage the `.pmidciterc` using a tool such as GitHub because it\ncontains your personal email and your private NCBI API key.\n\n\n### 2. NCBI E-Utils API key\nTo download PubMed abstracts and PubMed search results using NCBI's E-Utils,\nget an NCBI API key using these instructions:    \nhttps://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities\n\nSet the `apikey` value in the config file: `~/.pmidciterc`\n\n# Contributing\nSee the [**contributing guide**](/docs/CONTRIBUTING.md) for detailed instructions on how to get started contributing to the **pmidcite** project.\n\n# Contact\nemail: dvklopfenstein@protonmail.com    \nhttps://orcid.org/0000-0003-0161-7603\n\n## How to Cite\n_If you use **pmidcite** in your research or literature search, please cite paper 1 (pmidcite) and paper 3 (NIH citation data)._      \n\n_Please also consider reading and citing Gusenbauer's response (paper 2) about improving search for all during the information avalanche of these times:_\n\n1. **The *pmidcite* paper:**    \n[**Commentary to Gusenbauer and Haddaway 2020: Evaluating Retrieval Qualities of PubMed and Google Scholar**](http://dx.doi.org/10.1002/jrsm.1456)    \nKlopfenstein DV and Dampier W    \n2020 | _Research Synthesis Methods_ | PMID: [33031632](https://pubmed.ncbi.nlm.nih.gov/33031632/) | DOI: [10.1002/jrsm.1456](http://dx.doi.org/10.1002/jrsm.1456) | [pdf](/doc/paper/JRSM_1456_iCite_main.pdf)\n\n2. **Gusenbauer's response to the *pmidcite* paper:**    \n[**What every Researcher should know about Searching – Clarified Concepts, Search Advice, and an Agenda to improve Finding in Academia**](https://onlinelibrary.wiley.com/doi/10.1002/jrsm.1457)    \nGusenbauer M and Haddaway N    \n2020 | _Research Synthesis Methods_ | PMID: [33031639](https://pubmed.ncbi.nlm.nih.gov/33031639/) | DOI: [10.1002/jrsm.1457](https://onlinelibrary.wiley.com/doi/10.1002/jrsm.1457) | [pdf](/doc/paper/jrsm.1457.pdf)\n\n3. **The NIH citation data used by *pmidcite* -- Scientific Influence, Translation, and Citation counts:**     \n[**The NIH Open Citation Collection: A public access, broad coverage resource**](https://pubmed.ncbi.nlm.nih.gov/31600197/)    \nHutchins BI ... Santangelo GM    \n2019 | _PLoS Biology_ | PMID: [31600197](https://pubmed.ncbi.nlm.nih.gov/31600197) | DOI: [10.1371/journal.pbio.3000385](https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.3000385)    \n\n## References\n\n_Please consider reading and citing the paper [4] which inspired the creation of **pmidcite** [1] and the authors' response to our paper [2]_:\n\n4. [**Which Academic Search Systems are Suitable for Systematic Reviews or Meta-Analyses? Evaluating Retrieval Qualities of Google Scholar, PubMed and 26 other Resources**](https://pubmed.ncbi.nlm.nih.gov/31614060/)    \nGusenbauer M and Haddaway N    \n2019 | _Research Synthesis Methods_ | PMID: [31614060](https://pubmed.ncbi.nlm.nih.gov/31614060) | DOI: [10.1002/jrsm.1378](https://onlinelibrary.wiley.com/doi/full/10.1002/jrsm.1378)\n\n_Mentioned in this README are also these outstanding contributions_:\n\n5. [**Relative Citation Ratio (RCR): A New Metric That Uses Citation Rates to Measure Influence at the Article Level**](https://pubmed.ncbi.nlm.nih.gov/27599104/)    \nHutchins BI, Xin Yuan, Anderson JM, and Santangelo, George M.    \n2016 | _PLoS Biology_ | PMID: [27599104](https://pubmed.ncbi.nlm.nih.gov/27599104) | DOI: [10.1371/journal.pbio.1002541](https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.1002541)\n\n6. [**Google Scholar as replacement for systematic literature searches: good relative recall and precision are not enough**](https://pubmed.ncbi.nlm.nih.gov/24160679/)    \nBoeker M et al.    \n2013 | BMC Medical Research Methodology | PMID: [24160679](https://pubmed.ncbi.nlm.nih.gov/24160679) | DOI: [10.1186/1471-2288-13-131](https://bmcmedresmethodol.biomedcentral.com/articles/10.1186/1471-2288-13-131)\n\n7. [**Best Match: New relevance search for PubMed**](https://pubmed.ncbi.nlm.nih.gov/30153250/)    \nFiorini N ... Lu Zhiyong    \n2018 | PLoS Biology | PMID: [30153250](https://pubmed.ncbi.nlm.nih.gov/30153250) | DOI: [10.1371/journal.pbio.2005343](https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.2005343)    \n\n## [PDFs](/doc/paper/JRSM_1456_iCite_main.pdf)\n  * [**PMIDCITE Manuscript**](/doc/paper/JRSM_1456_iCite_main.pdf) with the original text box formatting\n    * **Supplemental Material**\n      * [S1. *pmidcite* information](/doc/paper/JRSM_1456_iCite_supp1_CitedByN.pdf)\n      * [S2. Contents of PubMed](/doc/paper/JRSM_1456_iCite_supp2_PMcontents.pdf)\n      * [S3. Screen shots Google Scholar taken Jan 2020](/doc/paper/JRSM_1456_iCite_supp3_GS.pdf)\n  * [**Gusenbauer's Response**](/doc/paper/jrsm.1457.pdf)\n\n## Contact\ndvklopfenstein@protonmail.com    \nhttps://orcid.org/0000-0003-0161-7603\n\nCopyright (C) 2019-present [pmidcite](https://dvklopfenstein.github.io/pmidcite/), DV Klopfenstein, PhD. All rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvklopfenstein%2Fpmidcite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdvklopfenstein%2Fpmidcite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvklopfenstein%2Fpmidcite/lists"}