NIH requires adding PMCID to references cited in proposals, and PMCID may be difficult to add because many reference libraries and citation styles omit them. As a result, some colleagues add them manually, which is rather time consuming. To avoid this drudgery, I wrote a couple of scripts available from this GitHub repository that allow adding PMCID automatically to proposals using LaTeX/BibTeX/Biber. The scripts use the paper’s DOI to find the corresponding PMCID and then add both types of IDs to each reference that has them.
Scripts and usage
- The script get_doi.pl extracts digital object identifiers (DOIs) from the bbl file. Run it as: perl get_doi.pl Your_bbl_file.bbl. It will output the DOIs in a file named DOIs_Your_bbl_file.bbl
- Take the DOIs from DOIs_Your_bbl_file.bbl and input them into https://www.ncbi.nlm.nih.gov/pmc/pmctopmid/ to extract in batch all corresponding PMCIDs. Save the output as csv file in ids.csv, which is an option of the website.
- The script add_PMCID.pl adds PMCIDs to the bbl file. Run it as: perl add_PMCID.pl ids.csv Your_bbl_file.bbl. This will output _Your_bbl_file.bbl file that should contain the PMCID added at the end of each reference that had a DOI with a corresponding PMCID.
- perl get_doi.pl Slavov_Research_Stategy.bbl
- Get PubMed IDs in batch mode from https://www.ncbi.nlm.nih.gov/pmc/pmctopmid/ and save them ids.csv
- perl add_PMCID.pl ids.csv Slavov_Research_Stategy.bbl
- This strategy requires that your bibliography outputs DOIs in the bbl file, so any modifications should preserve this feature.
- Depending on the formatting of the DOIs output in your bbl file, you may need to change the regular expressions in the perl scripts a bit.
I wrote scripts that add PubMed Common IDs (PMCID) automatically to the entire bibliography in one go. I am happy to share them if there is interest. https://t.co/b42cpiRpu8
— Nikolai Slavov (@slavov_n) June 27, 2020