Skip to content

Commit 189fda2

Browse files
committed
updated tool script
1 parent 2361091 commit 189fda2

File tree

6 files changed

+18
-10
lines changed

6 files changed

+18
-10
lines changed

script/ingestion/s3_update.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ def backup_file(df, suffix, include_index=True, quoting=True):
3636
s_buf = io.StringIO()
3737
# df.to_csv(s_buf, header=True, sep="\t")
3838
# print(s_buf.read())
39-
if include_index:
39+
if include_index and quoting:
4040
df.to_csv(s_buf, header=True, sep="\t")
41-
elif not quoting:
41+
elif not quoting and include_index:
4242
df.to_csv(s_buf, header=True, sep="\t", quoting=csv.QUOTE_NONE)
4343
else:
4444
df.to_csv(s_buf, header=True, sep="\t", index=None)

script/ingestion/tools.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from ingest_common import connection
88
import io
99
import csv
10+
import json
1011
publication_df = pd.read_csv('https://cfde-drc.s3.amazonaws.com/database/files/current_publications.tsv', sep="\t", index_col=0)
1112
publication_mapper = {}
1213
for i, row in publication_df.iterrows():
@@ -31,8 +32,11 @@
3132
doi = v.replace("https://doi.org/", "")
3233
pub_id = publication_mapper[doi]
3334
publication_df.at[pub_id, 'tool_id'] = uid
34-
elif k not in ["layout", "id"]:
35+
elif k not in ["layout", "id", "tutorial"]:
3536
val[k] = v
37+
elif k == "tutorial":
38+
val[k] = json.dumps(v)
39+
print(val[k], type(v))
3640

3741
tools[uid] = val
3842

src/pages/tools/GDLPA.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ label: GDLPA
66
layout: '@/layouts/Tools.astro'
77
short_description: Query 53 gene-centric, 18 variant-centric, and 19 drug-centric
88
repositories
9-
tutorial: '[ "https://www.youtube.com/watch?v=eO9zsT6Tyzk", "https://www.youtube.com/watch?v=up8WY7N44ws"
10-
]'
9+
tutorial:
10+
- https://www.youtube.com/watch?v=eO9zsT6Tyzk
11+
- https://www.youtube.com/watch?v=up8WY7N44ws
1112
url: https://cfde-gene-pages.cloud/
1213
---
1314
Gene and Drug Landing Page Aggregator (GDLPA) has links to 53 gene, 18 variant and 19 drug repositories that provide direct links to gene and drug landing pages. You can search by gene or drug name and then choose the sites that contain knowledge about your gene or drug of interest. Resources supported by the NIH Common Fund are listed first and have the CFDE logo at their top right corner.

src/pages/tools/GeneSetCart.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ layout: '@/layouts/Tools.astro'
77
short_description: GeneSetCart is interactive web-based application that enables users
88
to fetch gene sets, augment, perform set operations, visualize, and analyze gene
99
sets in a single session.
10-
tutorial: '[ "https://www.youtube.com/watch?v=yp0pfpJt1_M" ]'
10+
tutorial:
11+
- https://www.youtube.com/watch?v=yp0pfpJt1_M
1112
url: https://genesetcart.cfde.cloud/
1213
doi: https://doi.org/10.1093/gigascience/giaf025
1314
---

src/pages/tools/Playbook Workflow Builder.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ image: /img/pwb-screenshot.png
55
label: Playbook Workflow Builder
66
layout: '@/layouts/Tools.astro'
77
short_description: Web-based platform to construct biomedical workflows
8-
tutorial: '[ "https://www.youtube.com/watch?v=xfnaNJL5-8c", "https://www.youtube.com/watch?v=k_3wLDWDj8M"
9-
]'
8+
tutorial:
9+
- https://www.youtube.com/watch?v=xfnaNJL5-8c
10+
- https://www.youtube.com/watch?v=k_3wLDWDj8M
1011
url: https://playbook-workflow-builder.cloud/
1112
doi: https://doi.org/10.1371/journal.pcbi.1012901
1213
---

src/pages/tools/ReproTox-KG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ image: /img/reprotox-kg-screenshot.png
66
label: ReproTox-KG
77
layout: '@/layouts/Tools.astro'
88
short_description: Toxicology knowledge graph for structural birth defects
9-
tutorial: '[ "https://www.youtube.com/watch?v=Gt3CCsvTppc", "https://www.youtube.com/watch?v=nqzDOsDFJ7g"
10-
]'
9+
tutorial:
10+
- https://www.youtube.com/watch?v=Gt3CCsvTppc
11+
- https://www.youtube.com/watch?v=nqzDOsDFJ7g
1112
url: https://maayanlab.cloud/reprotox-kg
1213
---
1314
To further characterize associations between small molecule compounds and their potential to induce specific birth abnormalities, we gathered knowledge from multiple sources to construct a reproductive toxicity Knowledge Graph (ReproTox-KG) with a focus on associations between birth defects, drugs, and genes.

0 commit comments

Comments
 (0)