Skip to content

Commit

Permalink
changes to add ss_id and pmid to all new items and avoid duplicate bi…
Browse files Browse the repository at this point in the history
…bkeys
  • Loading branch information
keelinm committed Nov 30, 2023
1 parent d2db236 commit 69b1565
Show file tree
Hide file tree
Showing 8 changed files with 5,310 additions and 2,725 deletions.
1,580 changes: 1,120 additions & 460 deletions diag.bib

Large diffs are not rendered by default.

1,435 changes: 891 additions & 544 deletions diag_orig_and_ss_merged.bib

Large diffs are not rendered by default.

61 changes: 36 additions & 25 deletions scripts/MergeChanges.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 15,
"id": "f92463da",
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"sys.path.append('C:/Users/keeli/nov23/repos/Literature')\n",
"sys.path.append('C:/Users/keeli/nov23/repos/Literature/scripts')"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "d377a755",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\keeli\\anaconda3\\envs\\lit-env\\lib\\site-packages\\tqdm\\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
" from .autonotebook import tqdm as notebook_tqdm\n"
]
}
],
"outputs": [],
"source": [
"import pandas as pd\n",
"import os\n",
Expand All @@ -24,7 +27,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 17,
"id": "f6cf2984",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -66,7 +69,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 18,
"id": "5b5596e1",
"metadata": {},
"outputs": [],
Expand All @@ -83,7 +86,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 19,
"id": "98489bba",
"metadata": {},
"outputs": [],
Expand All @@ -93,7 +96,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 20,
"id": "2374dcc9",
"metadata": {},
"outputs": [],
Expand All @@ -103,7 +106,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 21,
"id": "f38e2c4c",
"metadata": {},
"outputs": [],
Expand All @@ -117,7 +120,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 22,
"id": "366debbe",
"metadata": {},
"outputs": [
Expand All @@ -127,7 +130,7 @@
"\"KM: I propose that the updated bib file is the one we will keep and we only need to check if it misses anything that is in the original\\nfor entry in diag_bib_raw:\\n if entry.type == 'string':\\n continue\\n bibkey = entry.key\\n if bibkey in new_bibkeys:\\n corresponding_entry = get_entry(updated_bib_raw, bibkey)\\n if 'all_ss_ids' in corresponding_entry.fields:\\n entry.fields['all_ss_ids'] = corresponding_entry.fields['all_ss_ids']\\n if 'pmid' in corresponding_entry.fields:\\n entry.fields['pmid'] = corresponding_entry.fields['pmid']\\n\""
]
},
"execution_count": 8,
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -150,15 +153,15 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 23,
"id": "550580b1",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'Brou23', 'Twil23c', 'Hump23', 'Anto23a', 'Aswo23', 'Hend23b'}\n"
"{'Brou23', 'Hend23b', 'Hump23', 'Aswo23', 'Twil23c', 'Anto23a'}\n"
]
}
],
Expand All @@ -169,7 +172,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 24,
"id": "21522e57",
"metadata": {},
"outputs": [],
Expand All @@ -180,7 +183,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 25,
"id": "3c023620",
"metadata": {},
"outputs": [],
Expand All @@ -190,7 +193,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 26,
"id": "82d6aeeb",
"metadata": {},
"outputs": [
Expand All @@ -217,7 +220,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 27,
"id": "6224df11",
"metadata": {},
"outputs": [],
Expand All @@ -227,7 +230,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 28,
"id": "cf941ddf",
"metadata": {},
"outputs": [],
Expand All @@ -243,6 +246,14 @@
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "ccdc05fc",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Loading

0 comments on commit 69b1565

Please sign in to comment.