This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
chmo2definedterm () { | |
CURIE=`echo "$1" | sed -e 's/.*\(CHMO:[0-9]*\).*/\1/'` | |
wget -q -O- "https://service.tib.eu/ts4tib/api/ontologies/chmo/terms?obo_id=$CURIE" |\ | |
jq '{ measurementTechnique: { "@type": "DefinedTerm", "@id": ._embedded.terms[0].iri, "termCode": ._embedded.terms[0].obo_id, "name": ._embedded.terms[0].label, "url": ("https://terminology.nfdi4chem.de/ts/ontologies/"+._embedded.terms[0].ontology_name+"/terms?iri="+._embedded.terms[0].iri), "inDefinedTermSet": { "@type": "DefinedTermSet", "@id": ._embedded.terms[0].ontology_iri, "name": ._embedded.terms[0].ontology_name, } } }' |\ | |
grep -v '^[{}]$' | |
echo "," | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BASEURL=https://www.chemotion-repository.net/api/v1/public/metadata/publications | |
LIMIT=500 | |
MAXPARALLEL=25 | |
MAXRECORDS=99999999 | |
#MAXRECORDS=2000 | |
# There are currently ~6000 Samples, ~25000 Containers and ~5000 Reactions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BASEURL=https://www.chemotion-repository.net/api/v1/public/metadata/publications | |
LIMIT=500 | |
MAXPARALLEL=25 | |
MAXRECORDS=99999999 | |
MAXRECORDS=2000 | |
# There are currently ~6000 Samples, ~25000 Containers and ~5000 Reactions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@context": "https://schema.org", | |
"@type": "Study", | |
"@id": "https://dx.doi.org/10.14272/reaction/SA-FUHFF-UHFFFADPSC-UWHQATUHQV-UHFFFADPSC-NUHFF-NUHFF-NUHFF-ZZZ", | |
"identifier": "CCR-33542", | |
"dct:conformsTo": { | |
"@type": "CreativeWork", | |
"@id": "https://bioschemas.org/types/Study/0.3-DRAFT" | |
}, | |
"url": "https://www.chemotion-repository.net/inchikey/reaction/SA-FUHFF-UHFFFADPSC-UWHQATUHQV-UHFFFADPSC-NUHFF-NUHFF-NUHFF-ZZZ", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export BACKEND=http://localhost:8081/oai-backend | |
jq -c '.[]' DataDump-IPB.jsonld | \ | |
while read i; do | |
IDENTIFIER=`echo "$i" | jq '.identifier'` | |
( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 1) Get paginated list of Molecules from Chemotion | |
## 2) extract DOI and internal chemotion ID for each molecule with `jq` | |
## 3) Query each molecule and convert with `jq` to (bio)schemas | |
## 4) Embedd the JSON in a CDATA in a minimalistic XML | |
## 5) Pipe the XML to the FIZ-OAI backend running at $BACKEND, e.g. localhost | |
export BACKEND=http://localhost:8081/oai-backend | |
for I in 1 2 3 4 5 6 7 8 9 10; do | |
wget -O- "https://www.chemotion-repository.net/api/v1/public/molecules.json?page=$I&per_page=100" |\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rmzTabM) ## https://lifs-tools.github.io/rmzTab-m/ | |
library(metabolighteR) ## https://aberhrml.github.io/metabolighteR/ | |
convertMzTab2MAF <- function(mzTabfile, MAFfile) { | |
mzTabTable <- readMzTab(mzTabfile) | |
## To turn these tables into objects, use the R6 class constructor method `new()`: | |
mzTabObject <- MzTab$new()$fromDataFrame(mzTabTable) | |
metadata <- mzTabObject$metadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget -O- https://www.chemotion-repository.net/api/v1/public/molecule.json?id=6338 |\ | |
jq "$(cat <<EOF | |
{ "@context": "https://schema.org/", | |
"@type": "MolecularEntity", | |
"dct:conformsTo": { "http://purl.org/dc/terms/conformsTo": { | |
"@id": "https://bioschemas.org/profiles/MolecularEntity/0.5-RELEASE", | |
"@type": "CreativeWork" } | |
}, | |
"@id": .molecule.tag.taggable_data.chemotion.doi, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install.packages("microbenchmark") | |
install.packages("plyr") | |
install.packages("rcdk") | |
install.packages("OrgMassSpecR") | |
install.packages("CHNOSZ") | |
BiocManager::install("Rdisop") | |
BiocManager::install("MetaboCoreUtils") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pykube | |
from os import environ as os_environ | |
# pykube imports: | |
try: | |
from pykube.config import KubeConfig | |
from pykube.http import HTTPClient | |
from pykube.objects import ( | |
Job, | |
Pod |
NewerOlder