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(multtest) | |
## A convenience function cut&paste from | |
## https://github.com/sneumann/xcms/blob/master/R/xcmsSet.R#L2052 | |
pval <- function(X, classlabel, teststat) { | |
n1 <- rowSums(!is.na(X[,classlabel == 0])) | |
n2 <- rowSums(!is.na(X[,classlabel == 1])) | |
A <- apply(X[,classlabel == 0], 1, sd, na.rm=TRUE)^2/n1 ## sd(t(X[,classlabel == 0]), na.rm = TRUE)^2/n1 |
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
## TODO: | |
## study-variable , separated -> DONE | |
## assay[1]-assay[2]-assay[3]-assay[4]-assay[5]-assay[6] | |
## link sample - assay: | |
## | |
## MTD sample[1]-description KO15 | |
## MTD assay[1]-sample_ref sample[1] | |
library(plyr) ## for rbind.fill |
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
- id: chemont | |
preferredPrefix: ChemOnt | |
title: ChemOnt: A semantic-based ontology for chemical and biological data integration. | |
uri: http://classyfire.wishartlab.com/ | |
description: "ChemOnt is comphrehensive, computable, and manually curated. | |
It covers >4000 chemical classes of organic and inorganic compounds. The set of classes was created | |
and extended by extracting common terms from the scientific literature (e.g.: IUPAC) and available databases. | |
The flexibility The taxonomy is currently mapped to the ChEBI and LIPID MAPS ontologies in collaboration | |
with the respective teams. Moreover, ChemOnt has been partially mappped to the MeSH thesaurus. | |
The mapping effort in this regard is ongoing. Thanks to the flexibility and simplicity of its structure |
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(httr) | |
library(rmzTabM) | |
library(xcms) | |
library(faahKO) | |
data(faahko3) | |
faahkoMzTab <- rmzTabM::MzTab$new( | |
metadata=Metadata$new( | |
'mzTab-version' = "2.2.0-M", | |
'mzTab-ID' = "faahKO", |
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 |
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
#!/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
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
## 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
#!/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'` | |
( |
OlderNewer