https://github.com/digital-botanical-gardens-initiative/rdflib_trydb_globi

https://github.com/digital-botanical-gardens-initiative/rdflib_trydb_globi

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.7%) to scientific vocabulary
Last synced: 5 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: digital-botanical-gardens-initiative
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Size: 2.64 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed 11 months ago
Metadata Files
Readme License

README.md

This repo consists of codes for generating triples from trydb, globi and taxonomy files for the DBGI work. It also containes codes that I use often for matching random terms to ontology entities.

Steps to follow: 1. Generate globi tsv file

cd modGLoBI python globiDown.py <Globi tsv-file> categories.txt qlever/data/<output-file>

  1. Generate ontology mappings [LifestageNames (DevelopmentalStage) and BodyPartNames (AnatomicalEntity)]

cd ontology python matchNamesToOntology.py <input-file> <output-file>

e.g: python matchNamesToOntology.py data/globi/unmappedBodyPartNamesGlobi.csv data/globi/mappedBodyPartNamesGlobi.csv

  1. Generate triples

Place the tsv-files in qlever/data.

a) Make a config file config.txt (present in this folder) and update files and then run the respective scripts

cd src python makeTriples_trydb_rdf_v1.py python makeTriples_globi_rdf_v1.py python makeTriples_taxonomy_rdf_v1.py OR

b) If config file is not present, then add command-line arguments

cd src python makeTriples_trydb_rdf_v1.py <trydb tsv-file> <enpkg wd ids> <output-file> python makeTriples_globi_rdf_v1.py <globi tsv-file> <enpkg wd ids> <output-file> python makeTriples_taxonomy_rdf_v1.py <taxonomy tsv-file> <enpkg wd ids> <output-file>

  1. Generate qlever sparql endpoint

a) Generate first set of index and start the server

cd qlever qlever --qleverfile Qlever.try_globi index --overwrite-existing --parallel-parsing false qlever --qleverfile Qlever.try_globi start

b) Generate void file for the triples

Obtain void-generator jar file

java -jar void-generator-0.6-SNAPSHOT-uber.jar -r "http://localhost:<port-name>" --void-file void-trydbglobi1.ttl -i http://localhost:<port-name>/.voidX/ --max-concurrency 1 -f

c) Generate second set of index and start the server for querying

qlever --qleverfile Qlever.try_globi stop qlever --qleverfile Qlever.try_globi.spql_editor index --overwrite-existing --parallel-parsing false qlever --qleverfile Qlever.try_globi start ```

  1. Obtain the html file from sparql-editor

a) Copy the index.html file obtained to qlever/sparql-editor-index.html. Add the appropriate js-file and the sparql endpoint to the html file.

b) Start the server inside the qlever directory

python cors_server.py

c) Open the qlever/sparql-editor-index.html to query and explore the class overview.

Tree structure and comments for each file

. ├── modGLoBI #folder for automating globi tsv file │   ├── categories.txt #taxonomy to be considered for globi │   └── globiDwn.py #script to generate tsv file ├── ontology │   ├── data │   │   ├── globi #folder for ontology matches of body part and life stage names to ontologies like UBERON, PO, ENVO, PATO, etc. │   │   │   ├── correctedBodyPartNamesGlobi.csv │   │   │   ├── mappedBodyPartNamesGlobi.csv │   │   │   ├── unmappedBodyPartNamesGlobi.csv │   │   │   ├── correctedLifeStageNamesGlobi.csv │   │   │   ├── mappedLifeStageNamesGlobi.csv │   │   │   │── unmappedLifeStageNamesGlobi.csv │   │   │   │── correctedBiologicalSexNames.tsv │   │   │   ├── mappedBiologicalSexNames.tsv │   │   │   ├── unmappedBiologicalSexNames.tsv │   │   ├── README.md │   │   └── trydb #folder for ontology matches of units from trydb to quft │   │   ├── EmiMappingToTryDb.txt #mapping of units (not in qudt) │   │   └── qudtMappingToTryDb.txt #mapping of units present in qudt │   └── matchNamesToOntology.py #given a list of names, match them to ontology entities from UBERON, PO, ENVO, PATO, etc. │── src #main codes and functions for generating triples in turtle format │ ├── config.txt #config file with locations to input, accessory and output files │ ├── functions │ │   │── data_processing.py #functions to parse files, dataframes and strings │   │   └── matchNamesBiologicalGender.py #function to assign biological gender while maing the rdf triples │ ├── makeTriples_globi_rdf_v1.py #main code to generate triples for globi interaction data │ ├── makeTriples_taxonomy_rdf_v1.py #main code to generate triples for taxonomy │ ├── makeTriples_trydb_rdf_v1.py #main code to generate triples for trydb traits data │ └── turtle_custom │ └── serializer.py ├── qlever #settings for qlever │   ├── cors_server.py #start a server with CORS enabled in python │   ├── data #data for building qlever index │   │   └── accessory #folder with accessory files │   ├── Qlever.try_globi #configuration for qlever without void and example ttls │   ├── Qlever.try_globi.spql_editor #configuration for qlever with -void, examples- required for sparql-editor │   └── sparql_editor_index.html #implement sparql editor ├── README.md └── requirements.txt #pip install -r requirements.txt

Owner

  • Name: The Digital Botanical Garden Initiative
  • Login: digital-botanical-gardens-initiative
  • Kind: organization

GitHub Events

Total
  • Push event: 21
  • Fork event: 1
Last Year
  • Push event: 21
  • Fork event: 1

Dependencies

requirements.txt pypi
  • argcomplete ==3.1.4
  • owlready2 ==0.47
  • pandas ==2.2.3
  • rdflib ==7.1.1
  • sentence-transformers ==3.3.1