SkillAgentSearch skills...

Pmidcite

Get citation counts for a PubMed paper from the command line

Install / Use

/learn @dvklopfenstein/Pmidcite

README

PubMed ID (PMID) Cite

Latest PyPI version Zenodo DOI Bioconda Anaconda-Server Badge Python Version from PEP 621 TOML Project Status: Active – The project has reached a stable, usable state and is being actively developed.

<p align="center"><img src="https://github.com/dvklopfenstein/pmidcite/raw/main/docs/images/pmidcite_citedby.png" alt="pmidcite summary" width="500"/></p>

Turbocharge a PubMed literature search with the command, icite, rather than clicking and clicking and clicking on Google Scholar "Cited by N" links.

This open-source project is part of a peer-reviewed commentary that was invited by the editors of Research Synthesis Methods. Please Cite and star on GitHub if you use pmidcite in your research or literature search.

Contact: dvklopfenstein@protonmail.com

PubMed and NIH Citation data

PubMed contains peer-reviewed research papers in biomedicine, biochemistry, chemistry, behavioral science, and other life sciences.

Freely available Citation data from the National Institutes of Health (NIH) is freshly downloaded when icite is run and provides much more than just citation counts, including:

  • Specifies citing clinical papers
  • Performance of the paper among its peers
  • Presence of MeSH terms for the human, animal, and molecular/cellular categories

Table of Contents

Quickstart

1) Download citation counts and data for a research paper

$ icite -H 26032263

  • This paper (PMID 26032263) has 25 citations, 10 references, and 4 authors.
  • This paper is performing well (74th percentile in column %) compared to its peers.

Starting usage

NIH percentile

This paper is performing well (74th percentile) compared to its peers (column %).

The NIH percentile grouping (column G) helps to highlight the better performing papers in groups 2, 3, and 4 by sorting the citing papers by group first, then publication year.

The sort places the lower performing papers in groups 0 or 1 at the back.

New papers appear at the beginning of a sorted list, no matter how many citations they have to better facilitate researchers in finding the latest discoveries.

The grouping of papers by NIH percentile grouping is a novel feature created by dvklopfenstein for this project.

2) Forward citation search

<p align="left"><img src="https://github.com/dvklopfenstein/pmidcite/raw/main/docs/images/pmidcite_citedby_cit.png" alt="pmidcite summary" width="300"/></p>

Also known as following a paper's Cited by links or Forward snowballing

icite -H; icite 26032263 --load_citations | sort -k6 -r
or
icite -H; icite 26032263 -c | sort -k6 -r

3) Backward citation search

Also known as following links to a paper's references or Backward snowballing

<p align="left"><img src="https://github.com/dvklopfenstein/pmidcite/raw/main/docs/images/pmidcite_citedby_ref.png" alt="pmidcite summary" width="300"/></p>

$ icite -H; icite 26032263 --load_references | sort -k6 -r
or
$ icite -H; icite 26032263 -r | sort -k6 -r

4) Summarize a group of citations

Create a file containing numerous PMIDs annotated with icite info

$ icite 30022098 -c -o goatools_cites.txt
  WROTE: goatools_cites.txt

Count the number of lines in the file

$ wc -l goatools_cites.txt
468 goatools_cites.txt

Summarize the papers in "goatools_cites.txt"

$ sumpaps goatools_cites.txt
i=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
  • The output is on one line so many files containing sets of PMIDs may be compared
  • The groups are from newest(i) to top-performing(4), great(3), very good(2), and overlooked(1 and 0)

5) Download citations for all papers returned from a PubMed search

  1. Do a search in PubMed
  2. Save all results into a file containing all PMIDs found by the search
  3. Download the list of PMIDs
  4. Run icite to analyze all the PMIDs

1. Do a search in PubMed

<p align="center"><img src="https://github.com/dvklopfenstein/pmidcite/raw/main/doc/images/pubmed_HIV_AND_Me_srch.png" alt="pmidcite summary" width="800"/></p>

2. Save all results into a list of PMIDs

<p align="center"><img src="https://github.com/dvklopfenstein/pmidcite/raw/main/doc/images/pubmed_HIV_AND_Me_save.png" alt="pmidcite summary" width="800"/></p>

3. Download the list of PMIDs

<p align="center"><img src="https://github.com/dvklopfenstein/pmidcite/raw/main/doc/images/pubmed_HIV_AND_Me_dnld.png" alt="pmidcite summary" width="800"/></p>

4. Run icite to analyze all the PMIDs

$ icite -i pmid-HIVANDDNAm-set.txt -o pmid-HIVANDDNAm-icite.txt
$ grep TOP pmid-HIVANDDNAm-icite.txt | sort -k6

Command Line Interface (CLI)

A Command-Line Interface (CLI) can be preferable to a Graphical User Interface (GUI) because:

  • processing can be automated from a script
  • time-consuming mouse clicking is reduced
  • more data can be seen at once on a text screen than in a browser, giving the researcher a better overall impression of the full set of information [1]

Researchers who use Linux or Mac already work from the command line. Researchers who use Windows can get that Linux-like command line feeling while still running native Windows programs by downloading Cygwin from https://www.cygwin.com/ [1].

PubMed vs Google Scholar

<p align="center"> <img src="https://github.com/dvklopfenstein/pmidcite/raw/main/docs/images/Search_Features_GS_v_PubMed.png" alt="Google Scholar vs PubMed" width="600"/> </p>

In 2013, Boeker et al. [6] recommended that a scientific search interface contain five integrated search criteria. PubMed implements all five, while Google did not in 2013 or today.

Google's highly popular implementation of the forward citation search through their ubiquitous "Cited by N" links is a "Better" experience than the PubMed's "forward citation search" implementation.

But if your research is in the health sciences and you are amenable to working from the command line, you can use PubMed in your browser plus citation data downloaded from the NIH using the command-line using pmidcite. The NIH's citation data includes a paper's ranking among its co-citation network.

What is in PubMed? Take a quick tour

<img src="https://github.com/dvklopfenstein/pmidcite/raw/main/docs/images/pubmed_content_2020_01_10.png" alt="PubMed Contents" width="850"/>

PubMed is a search interface and toolset used to access over 30.5 million article records from databases such as:

  • MEDLINE: a highly selective database started in the 1960s
  • PubMed Central (PMC): an open-access database for full-text papers that are free of cost
  • Additional content such as books and articles published b
View on GitHub
GitHub Stars34
CategoryDevelopment
Updated1mo ago
Forks7

Languages

Python

Security Score

95/100

Audited on Feb 27, 2026

No findings