Merge pull request #5202 from RosettaCommons/vmullig/citation_script
Add a python script to automatically update the citations list in the database given a new PubMed ID
This adds a script to the `code_templates` directory called `add_citation_by_pubmed_id.py`. As the name suggests, it adds a new citation to `database/citations/rosetta_citations.txt` from an input PubMed ID. Example usage:
```
>~/rosetta_devcopy/Rosetta/main/source$ ./code_templates/add_citation_by_pubmed_id.py --pmid 31239046
Successfully imported pubmed-lookup package.
Successfully found article titled "Using Rosetta for RNA homology modeling.".
Adding PubMed ID 31239046 (DOI 10.1016/bs.mie.2019.05.026). to citations file.
Wrote sorted citations list to "../database/citations/rosetta_citations.txt". Please be sure to commit your changes with "git add ../database/citations/rosetta_citations.txt && git commit".
```
After running this, `git diff` gives you the following:
```
diff --git a/database/citations/rosetta_citations.txt b/database/citations/rosetta_citations.txt
index f8a24ebe767..855c5019c6f 100644
--- a/database/citations/rosetta_citations.txt
+++ b/database/citations/rosetta_citations.txt
@@ -504,6 +504,33 @@
[END_DOI]
[END_CITATION]
+[BEGIN_CITATION]
+ [BEGIN_PRIMARY_AUTHORS]
+ "" "Watkins" "AM"
+ [END_PRIMARY_AUTHORS]
+ [BEGIN_COAUTHORS]
+ "" "Rangan" "R"
+ [END_COAUTHORS]
+ [BEGIN_SENIOR_AUTHORS]
+ "" "Das" "R"
+ [END_SENIOR_AUTHORS]
+ [BEGIN_YEAR]
+ 2019
+ [END_YEAR]
+ [BEGIN_TITLE]
+ Using Rosetta for RNA homology modeling.
+ [END_TITLE]
+ [BEGIN_JOURNAL]
+ Methods Enzymol
+ [END_JOURNAL]
+ [BEGIN_VOLUME_ISSUE_PAGES]
+ 623:177-207
+ [END_VOLUME_ISSUE_PAGES]
+ [BEGIN_DOI]
+ 10.1016/bs.mie.2019.05.026
+ [END_DOI]
+[END_CITATION]
+
[BEGIN_CITATION]
[BEGIN_PRIMARY_AUTHORS]
"Vikram Khipple" "Mulligan" "VK"
@@ -539,3 +566,4 @@
10.1002/pro.3974
[END_DOI]
[END_CITATION]
```
It's not quite perfect since it doesn't fill in the first names, but it's close enough.