Skip to content

Commit

Permalink
Update code and pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ljgarcia committed Feb 1, 2024
1 parent 7e6375f commit 457b671
Show file tree
Hide file tree
Showing 14 changed files with 1,709 additions and 224 deletions.
67 changes: 55 additions & 12 deletions code/createPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
import json
import subprocess
import shutil
import traceback

DOCS_SUBFOLDERS = ['consortia', 'projects', 'theses']
RO_CRATE_SUBFOLDERS = ['projects', 'theses']
MAPPINGS = [("employee", "Current project members"), ("alumni", "Previous project members"), ("alternativeHeadline", "Cite as"), ("citation", "Cite as"), ("member", "External contributors"), ("knowsAbout", "Outcomes"), ("parentOrganization", "Parent organization, consortium or research project"), ("subOrganization", "Sub-projects")]
MAPPINGS = [("employee", "Current project members"), ("alumni", "Previous project members"), ("alternativeHeadline", "Cite as"), ("citation", "Cite as"), ("member", "External contributors"), ("knowsAbout", "Outcomes"), ("parentOrganization", "Parent organization, consortium or research project"), ("subOrganization", "Sub-projects"), ("targetproduct", "Release")]
MAPPINGS_FROM = [i[0] for i in MAPPINGS]
MAPPINGS_TO = [i[1] for i in MAPPINGS]

Expand Down Expand Up @@ -284,12 +285,52 @@ def processNamesInProject(item) :
subTypeURL = item["@type"]
idURL = item["@id"]
md += f'<a href="{idURL}" target="_blank"><img src = "/images/visit.svg" alt="Visit URL"/> Visit {subTypeURL}</a>\n\n'
for prop, val in item.items():
if prop not in ["@type", "@id", "name", "http://purl.org/dc/terms/conformsTo", "funder", "givenName", "familyName"]:
if prop == 'url':
md += renderUrlAsHref(val)
else :
md += f'- {prop.capitalize()}: {val}\n'
if isinstance(item, (dict)):
for prop, val in item.items():
if prop not in ["@type", "@id", "name", "http://purl.org/dc/terms/conformsTo", "funder", "givenName", "familyName"]:
if prop == 'url':
md += renderUrlAsHref(val)
elif prop == 'license':
try:
idURL = val["@id"]
md += f'- License: <a href="{idURL}" target="_blank">{idURL}</a> \n'
except:
md += f'- License: {val}\n'
elif (prop == 'author'):
try:
if isinstance(val, list):
md += f'- {prop.capitalize()}s: '
for elem in val:
idURL = elem["@id"]
md += f'<a href="{idURL}" target="_blank">{idURL}</a>. '
md += '\n'
else:
md += f'- {prop.capitalize()}: '
idURL = val["@id"]
md += f'<a href="{idURL}" target="_blank">{idURL}</a> \n'
except:
pass
elif (prop == 'targetProduct'):
try:
if isinstance(val, list):
md += f'- Releases: '
for elem in val:
idURL = elem["@id"]
md += f'<a href="{idURL}" target="_blank">{idURL}</a>. '
md += '\n'
else:
md += f'- Release: '
idURL = val["@id"]
md += f'<a href="{idURL}" target="_blank">{idURL}</a> \n'
except:
pass
else :
if prop in MAPPINGS_FROM :
i = MAPPINGS_FROM.index(prop)
md += f'- {MAPPINGS_TO[i]}: '
else :
md += f'- {prop.capitalize()}: '
md += f'{val}\n'
return md

def processProjectData(data, jsonFileURL, rocrateFileURL, htmlFileURL):
Expand Down Expand Up @@ -324,10 +365,9 @@ def processProjectData(data, jsonFileURL, rocrateFileURL, htmlFileURL):
if isinstance(item, (dict, list)):
#each item is an object/dict
#loop on each key, value pair
for mdFolderName in item:
subItem = item.get(mdFolderName, "")
if (isinstance(subItem,(dict, list))):
md += processNamesInProject(subItem)
#for keyPair in item:
# valuePair = item.get(keyPair, "")
# md += processKeyValuePair(keyPair, valuePair)
md += processNamesInProject(item)
elif isinstance(value, dict):
for subProperty, subValue in value.items():
Expand Down Expand Up @@ -437,6 +477,7 @@ def fromMetadatatoDocs():
folderIndex = DOCS_SUBFOLDERS.index(mdFolderName)
jsonFileURL = f"../../metadata/{mdFolderName}/{fileNameNoExt}.json"
rocrateFileURL = ""
htmlFileURL = ""
if mdFolderName in RO_CRATE_SUBFOLDERS:
rocrateFileURL = f"../../metadata/{mdFolderName}/{fileNameNoExt}/ro-crate-metadata.json"
htmlFileURL = f"../../metadata/{mdFolderName}/{fileNameNoExt}/ro-crate-preview.html"
Expand All @@ -447,7 +488,9 @@ def fromMetadatatoDocs():
mdDocFile.write(md)
mdDocFile.write(f'\n\n<script type="application/ld+json">\n{json.dumps(data, indent=2)}\n</script>\n\n')
except Exception as e:
#print(e)
print(jsonFileName)
print(e)
#print(traceback.format_exc())
jsonFileURL = f"../metadata/{mdFolderName}/{fileNameNoExt}.json"
md = generateMDTableFromJSON(data, jsonFileURL)
with open(docFilePath, "a", encoding="utf-8") as mdDocFile:
Expand Down
16 changes: 6 additions & 10 deletions docs/consortia/2018_STELLA.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,15 @@ Evaluation framework, A/B testing, Interlinking, Information Retrieval, Recommen

#### OntoClue

<a href="https://zbmed-semtec.github.io/projects/2021_OntoClue" target="_blank"><img src = "/images/visit.svg" alt="Visit URL"/> Visit ResearchProject</a>
<a href="https://w3id.org/zbmed-semtec/projects/2021_OntoClue" target="_blank"><img src = "/images/visit.svg" alt="Visit URL"/> Visit ResearchProject</a>

#### TREC document-to-document relevance assessment

<a href="https://zbmed-semtec.github.io/projects/2022_TREC_doc2doc" target="_blank"><img src = "/images/visit.svg" alt="Visit URL"/> Visit ResearchProject</a>
<a href="https://w3id.org/zbmed-semtec/projects/2022_TREC_doc2doc" target="_blank"><img src = "/images/visit.svg" alt="Visit URL"/> Visit ResearchProject</a>

### Funding

#### Deutsche Forschungsgemeinschaft

<a href="https://ror.org/018mejw64" target="_blank"><img src = "/images/visit.svg" alt="Visit URL"/> Visit Organization</a>

- Alternatename: German Research Foundation
- URL: <a href="http://www.dfg.de/en/" target="_blank">http://www.dfg.de/en/</a>
<a href="https://gepris.dfg.de/gepris/projekt/407518790" target="_blank"><img src = "/images/visit.svg" alt="Visit URL"/> Visit Grant</a>

- Identifier: 407518790
- Description: Project no. 407518790 (corresponding to the STELLA project)
Expand Down Expand Up @@ -107,18 +102,19 @@ Evaluation framework, A/B testing, Interlinking, Information Retrieval, Recommen
"subOrganization": [
{
"@type": "ResearchProject",
"@id": "https://zbmed-semtec.github.io/projects/2021_OntoClue",
"@id": "https://w3id.org/zbmed-semtec/projects/2021_OntoClue",
"name": "OntoClue"
},
{
"@type": "ResearchProject",
"@id": "https://zbmed-semtec.github.io/projects/2022_TREC_doc2doc",
"@id": "https://w3id.org/zbmed-semtec/projects/2022_TREC_doc2doc",
"name": "TREC document-to-document relevance assessment"
}
],
"funding": [
{
"@type": "Grant",
"@id": "https://gepris.dfg.de/gepris/projekt/407518790",
"funder": {
"@type": "Organization",
"@id": "https://ror.org/018mejw64",
Expand Down
7 changes: 0 additions & 7 deletions docs/consortia/2021_NFDI4DataScience.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ NFDI, Data Science, Artificial Intelligence

### Funding

#### Deutsche Forschungsgemeinschaft

<a href="https://ror.org/018mejw64" target="_blank"><img src = "/images/visit.svg" alt="Visit URL"/> Visit Organization</a>

- Alternatename: German Research Foundation
- URL: <a href="http://www.dfg.de/en/" target="_blank">http://www.dfg.de/en/</a>

<a href="https://gepris.dfg.de/gepris/projekt/460234259" target="_blank"><img src = "/images/visit.svg" alt="Visit URL"/> Visit Grant</a>

- Identifier: 460234259
Expand Down
30 changes: 0 additions & 30 deletions docs/current_members.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,36 +90,6 @@
}
</script>

### Sarker Sunzid Mahmud
<p><img src = "/images/get.svg" alt="Get JSON-LD"/><a href="../metadata/current_members/mahmud_0009-0003-8268-9090.json" target="_blank" download="metadata.json"> Get JSON-LD</a> | <a href="https://orcid.org/0000-0002-7672-9186" target="_blank"><img src = "/images/visit.svg" alt="Visit URL"/> Visit Person</a></p>
<table style="background-color: #F5F5F5; width: 100%; text-align: left; border: 1px solid black;">
<tbody>
<tr>
<td>familyName</td>
<td>Mahmud</td>
</tr>
<tr>
<td>givenName</td>
<td>Sarker Sunzid</td>
</tr>
<tr>
<td>jobTitle</td>
<td>Student assistant</td>
</tr>
</tbody>
</table>

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Person",
"@id": "https://orcid.org/0000-0002-7672-9186",
"familyName": "Mahmud",
"givenName": "Sarker Sunzid",
"jobTitle": "Student assistant"
}
</script>

### Nelson Quiñones
<p><img src = "/images/get.svg" alt="Get JSON-LD"/><a href="../metadata/current_members/quinones_0000-0002-5037-0443.json" target="_blank" download="metadata.json"> Get JSON-LD</a> | <a href="https://orcid.org/0000-0002-5037-0443" target="_blank"><img src = "/images/visit.svg" alt="Visit URL"/> Visit Person</a></p>
<table style="background-color: #F5F5F5; width: 100%; text-align: left; border: 1px solid black;">
Expand Down
29 changes: 29 additions & 0 deletions docs/metadata/projects/2021_OntoClue.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,13 @@
"alternativeHeadline": "Ravinder R, Fellerhof T, Dadi V, Geist L, Talha M, Rebholz-Schuhmann D, et al. A Comparison of Vector-based Approaches for Document Similarity Using the RELISH Corpus. Proceedings of the 6th Workshop on Semantic Web Solutions for Large-Scale Biomedical Data Analytics co-located with ESWC 2023. CEUR; 2023. Available: https://ceur-ws.org/Vol-3466/paper5.pdf",
"name": "A Comparison of Vector-based Approaches for Document Similarity Using the RELISH Corpus",
"datePublished": "2023-03-01",
"license": {
"@type": "CreativeWork",
"@id": "https://spdx.org/licenses/CC-BY-4.0.html",
"name": "Creative Commons Attribution 4.0 International",
"alternateName": "CC BY 4.0",
"url": "https://creativecommons.org/licenses/by/4.0/"
},
"url": "https://ceur-ws.org/Vol-3466/paper5.pdf#",
"author": [
{"@id": "https://orcid.org/0009-0004-4484-6283"},
Expand All @@ -196,6 +203,13 @@
"citation": "Ravinder R, Fellerhoff T, Dadi VV, Geist L, Rocamora G, Talha M, et al. OntoClue, a framework to compare vector-based approaches for document relatedness using the RELISH corpus - Poster. ZB MED - Informationszentrum Lebenswissenschaften; 2023. Available: https://repository.publisso.de/resource/frl:6440397",
"name": "OntoClue, a framework to compare vector-based approaches for document relatedness using the RELISH corpus",
"datePublished": "2023-06-22",
"license": {
"@type": "CreativeWork",
"@id": "https://spdx.org/licenses/CC-BY-4.0.html",
"name": "Creative Commons Attribution 4.0 International",
"alternateName": "CC BY 4.0",
"url": "https://creativecommons.org/licenses/by/4.0/"
},
"url": "https://repository.publisso.de/resource/frl:6440397",
"author": [
{"@id": "https://orcid.org/0009-0004-4484-6283"},
Expand All @@ -215,6 +229,13 @@
"alternativeHeadline": "Ravinder R, Fellerhoff T, Dadi V, Geist L, Rocamora G, Talha M, et al. OntoClue, a framework to compare vector-based approaches for document relatedness using the RELISH corpus. CEUR; 2023. Available: https://ceur-ws.org/Vol-3415/paper-38.pdf",
"name": "OntoClue, a framework to compare vector-based approaches for document relatedness using the RELISH corpus - Poster",
"datePublished": "2023-03-01",
"license": {
"@type": "CreativeWork",
"@id": "https://spdx.org/licenses/CC-BY-4.0.html",
"name": "Creative Commons Attribution 4.0 International",
"alternateName": "CC BY 4.0",
"url": "https://creativecommons.org/licenses/by/4.0/"
},
"url": "https://ceur-ws.org/Vol-3415/paper-38.pdf#",
"author": [
{"@id": "https://orcid.org/0009-0004-4484-6283"},
Expand All @@ -235,6 +256,14 @@
"alternativeHeadline": "Ritchie A, Chen J, Castro LJ, Rebholz-Schuhmann D, Jimenez-Ruiz E. Ontology Clustering with OWL2Vec*. CEUR Workshop Proceedings. Online: CEUR Workshop Proceedings; 2021. Available: http://ceur-ws.org/",
"name": "Ontology Clustering with OWL2Vec*",
"datePublished": "2021-07-28",
"license": {
"@type": "CreativeWork",
"@id": "https://spdx.org/licenses/CC-BY-4.0.html",
"name": "Creative Commons Attribution 4.0 International",
"alternateName": "CC BY 4.0",
"url": "https://creativecommons.org/licenses/by/4.0/"
},
"url": "https://ceur-ws.org/Vol-2918/short3.pdf#",
"author": [
{"@id": "https://zbmed-semtec.github.io/previous_members/#ashley-ritchie"},
{"@id": "https://chenjiaoyan.github.io/"},
Expand Down
25 changes: 25 additions & 0 deletions docs/metadata/projects/2022_TREC_doc2doc.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,16 @@
"@id": "https://ceur-ws.org/Vol-3415/paper-12.pdf",
"http://purl.org/dc/terms/conformsTo": "https://bioschemas.org/profiles/ScholarlyArticle/0.3-DRAFT",
"identifier": "CEUR:Vol-3415/paper-12",
"alternativeHeadline": "Giraldo O, Cadena MF, Robayo-Gama A, Solanki D, Fellerhoff T, Geist L, et al. Document-to-document relevance assessment for TREC Genomics Track 2005. CEUR; 2023. Available: https://ceur-ws.org/Vol-3415/paper-12.pdf",
"name": "Document-to-document relevance assessment for TREC Genomics Track 2005",
"datePublished": "2023-06-22",
"license": {
"@type": "CreativeWork",
"@id": "https://spdx.org/licenses/CC-BY-4.0.html",
"name": "Creative Commons Attribution 4.0 International",
"alternateName": "CC BY 4.0",
"url": "https://creativecommons.org/licenses/by/4.0/"
},
"url": "https://ceur-ws.org/Vol-3415/paper-12.pdf#",
"author": [
{"@id": "https://orcid.org/0000-0003-2978-8922"},
Expand All @@ -129,11 +137,19 @@
"@type": "SoftwareApplication",
"@id": "https://doi.org/10.5281/zenodo.7341391",
"http://purl.org/dc/terms/conformsTo": "https://bioschemas.org/profiles/ComputationalTool/1.0-RELEASE",
"identifier": "DOI:10.5281/zenodo.7341391",
"citation": "Talha M, Geist L, Fellerhof T, Ravinder R, Giraldo O, Rebholz-Schuhmann D, et al. TREC-doc-2-doc-relevance assessment interface. Zenodo; 2022. doi:10.5281/zenodo.7341391",
"name": "TREC-doc-2-doc-relevance assessment interface",
"description": "The code, data and docs at this release aim at facilitating the creation of a doc-2-doc relevance assessment on PMIDs used in the TREC 2005 Genomics track. A doc-2-doc relevance assessment takes one document as reference and assess a second document regarding its relevance to the reference one. This doc-2-doc collection will be used to evaluate the doc-2-doc recommendations approaches that we are working on.",
"url": "https://zenodo.org/records/7341391",
"softwareVersion": "1.0.0",
"datePublished": "2022-11-21",
"license": {
"@type": "CreativeWork",
"@id": "https://spdx.org/licenses/MIT.html",
"name": "MIT License",
"url": "https://opensource.org/license/mit/"
},
"author": [
{"@id": "https://zbmed-semtec.github.io/previous_members/#muhammad-talha"},
{"@id": "http://orcid.org/0000-0002-2910-7982"},
Expand All @@ -146,10 +162,17 @@
},{
"@type": "SoftwareSourceCode",
"@id": "https://github.com/zbmed-semtec/TREC-doc-2-doc-relevance",
"citation": "Talha M, Geist L, Fellerhof T, Ravinder R, Giraldo O, Rebholz-Schuhmann D, et al. TREC-doc-2-doc-relevance [Software source code]. GitHub; 2022.",
"name": "TREC-doc-2-doc-relevance",
"description": "This is the software source code facilitating the creation of a doc-2-doc relevance assessment on PMIDs used in the TREC 2005 Genomics track along with its metadata.",
"url": "https://github.com/zbmed-semtec/TREC-doc-2-doc-relevance",
"targetProduct": { "@id": "https://doi.org/10.5281/zenodo.7341391" },
"license": {
"@type": "CreativeWork",
"@id": "https://spdx.org/licenses/MIT.html",
"name": "MIT License",
"url": "https://opensource.org/license/mit/"
},
"author": [
{"@id": "https://zbmed-semtec.github.io/previous_members/#muhammad-talha"},
{"@id": "http://orcid.org/0000-0002-2910-7982"},
Expand All @@ -164,6 +187,7 @@
"@id": "https://doi.org/10.5281/zenodo.7338056",
"conformsTo": "https://bioschemas.org/profiles/Dataset/1.1-DRAFT",
"identifier": "DOI:10.5281/zenodo.7338056",
"citation": "Giraldo O, Solanki D, Rebholz-Schuhmann D, Castro LJ. Fleiss kappa for doc-2-doc relevance assessment. Zenodo; 2022. doi:10.5281/zenodo.7338056",
"name": "Fleiss kappa for doc-2-doc relevance assessment",
"description": "Fleiss' kappa measuring inter-annotator agreement on a document-to-document relevance assessment task. The table contains 7 columns, the first one presents the topics, 8 in total. The second column shows the “reference articles”, represented by their PubMed-ID and organized by topic. The third column shows the Fleiss’ Kappa results. The fourth column shows the interpretation of the Fleiss' Kappa results being: i) “Poor” results <0.20, ii) “Fair” results within 0.21 - 0.40, and iii) “Moderate” results within 0.41 - 0.60. The fifth column shows the PubMed-IDs of evaluation articles rated by the four annotators as “Relevant” regarding its corresponding “reference article”. The sixth column shows the PubMed-IDs of evaluation articles rated by the four annotators as “Partially relevant” regarding its corresponding “reference article”. The seventh column shows the PubMed-IDs of evaluation articles rated by the four annotators as “Non-relevant” regarding its corresponding “reference article”",
"keywords": "Fleiss' Kappa, Inter-annoator agreement, TREC Genomics Track 2005, relevance assessment",
Expand All @@ -187,6 +211,7 @@
"@id": "https://doi.org/10.5281/zenodo.7324822",
"http://purl.org/dc/terms/conformsTo": "https://bioschemas.org/profiles/Dataset/1.1-DRAFT",
"identifier": "DOI:10.5281/zenodo.7324822",
"citation": "Giraldo O, Solanki D, Cadena F, Robayo-Gama A, Rebholz-Schuhmann D, Castro LJ. Document-to-document relevant assessment for TREC Genomics Track 2005. Zenodo; 2022. doi:10.5281/zenodo.7324822",
"name": "Document-to-document relevant assessment for TREC Genomics Track 2005",
"description": "A CSV table with document-to-document relevance assessment judgements on a subset of the TREC Genomics Track 2005 produced by four annotators. The 'raw data document evaluation' contains six columns, first row consecutive id, second original TREC topic, third PubMed Id used as reference document, fourth PMID used to evaluate the relevance wrt the reference document, fifth the relevance score (2 definitely relevant, 1 partially relevant, 0 non-relevant), and sixth annotator id",
"keywords": "Document-to-document relevance, TREC GEnomics Track 2005, relevance assessment",
Expand Down
Loading

0 comments on commit 457b671

Please sign in to comment.