diff --git a/tools/nmr_annotation2d/annotationRmn2D.R b/tools/nmr_annotation2d/annotationRmn2D.R index 1f3ab973f0..93f25f4a93 100644 --- a/tools/nmr_annotation2d/annotationRmn2D.R +++ b/tools/nmr_annotation2d/annotationRmn2D.R @@ -1,12 +1,12 @@ -########################################################################## -# ANNOTATION SPECTRE 2D MATRICE COMPLEXE BASEE SUR UNE SEQUENCE RMN # -# matriceComplexe : data.frame liste couples ppm de la matrice a annoter # -# BdDStandards : objet contenant la base de donnees des composes standards # -# nom_sequence : nom sequence 2D a utiliser pour annotation ("JRES", "COSY", "TOCSY", "HMBC", "HSQC") # -# ppm1Tol : tolerance ppm axe abscisses # -# ppm2Tol : tolerance ppm axe ordonnees # -# nb_ligne_template : preciser le nombre total de ligne de la feuille de calcul a annoter # -####################################################################################################### +########################################################################################################################################### +# ANNOTATION SPECTRE 2D MATRICE COMPLEXE BASEE SUR UNE SEQUENCE RMN # +# matriceComplexe : data.frame liste couples ppm de la matrice a annoter # +# BdDStandards : objet contenant la base de donnees des composes standards # +# nom_s�quence : nom sequence 2D a utiliser pour annotation ("JRES","COSY","TOCSY","HMBC","HSQC") # +# ppm1Tol : tolerance ppm axe abscisses # +# ppm2Tol : tolerance ppm axe ordonnees # +# nb_ligne_template : pr�ciser le nombre total de ligne de la feuille de calcul � annoter # +########################################################################################################################################### annotationRmn2D <- function(matriceComplexe, BdDStandards, nom_sequence, ppm1Tol = 0.01, ppm2Tol = 0.01, seuil = 0, unicite = "NO") { ## Longueur de la peak-list de la matrice a annoter @@ -19,14 +19,15 @@ annotationRmn2D <- function(matriceComplexe, BdDStandards, nom_sequence, ppm1Tol seuil_score <- seuil ## Boucle sur les metabolites inclus dans BdD - for (i in seq_len(nbMetabolitesBdD)) { + for (i in 1:nbMetabolitesBdD) + { ## Infos metabolite en cours iMetabolite <- BdDStandards[[i]] ppm1M <- iMetabolite[, 1] ppm2M <- iMetabolite[, 2] nbPeakMetabolite <- length(ppm1M) MetaboliteName <- names(BdDStandards[i]) - + ## print(MetaboliteName) ## Initialisation k <- 0 presenceScore <- 0 @@ -37,7 +38,8 @@ annotationRmn2D <- function(matriceComplexe, BdDStandards, nom_sequence, ppm1Tol metabolitesList <- data.frame() ## Boucle sur les couples de pics de la matrice a annoter - for (p in seq_len(PeakListLength)) { + for (p in 1:PeakListLength) + { ppmAnnotationF1 <- as.numeric(matriceComplexe[p, 3]) ppmAnnotationF2 <- as.numeric(matriceComplexe[p, 2]) e <- simpleMessage("end of file") @@ -52,7 +54,8 @@ annotationRmn2D <- function(matriceComplexe, BdDStandards, nom_sequence, ppm1Tol WhichMetaboliteIn <- which(metaboliteIn) # Si au moins un couple de la matrice a annoter dans liste couples metabolite standard if (length(WhichMetaboliteIn) > 0) { - for (a in seq_len(length(WhichMetaboliteIn))) { + for (a in 1:length(WhichMetaboliteIn)) + { annotatedPpmList <- data.frame(ppm1 = ppm1M[WhichMetaboliteIn[a]], ppm2 = ppm2M[WhichMetaboliteIn[a]], theoricalLength = nbPeakMetabolite) annotatedPpmRef <- rbind(annotatedPpmRef, annotatedPpmList) } @@ -75,7 +78,7 @@ annotationRmn2D <- function(matriceComplexe, BdDStandards, nom_sequence, ppm1Tol annotatedPeakLength <- nrow(annotatedPpmRef) - sum(duplicated(annotatedPpmRef)) annotatedPpmRef <- annotatedPpmRef[-duplicated(annotatedPpmRef), ] } - presenceScore <- round(annotatedPeakLength / nbPeakMetabolite, 2) + presenceScore <- annotatedPeakLength / nbPeakMetabolite } ## Conservation metabolites dont score > seuil @@ -91,6 +94,7 @@ annotationRmn2D <- function(matriceComplexe, BdDStandards, nom_sequence, ppm1Tol commonPpmList <- data.frame() metaboliteAdd <- data.frame() metaboliteAddList <- data.frame() + # metabolite_ref <- data.frame() commonMetabolitesList <- data.frame() commonMetabolitesPpmList <- data.frame() commonMetabolitesPpmAllList1 <- data.frame() @@ -100,9 +104,11 @@ annotationRmn2D <- function(matriceComplexe, BdDStandards, nom_sequence, ppm1Tol metabolitesAllUnicite <- data.frame() ## Boucle sur tous couples annotes - for (j in seq_len(length(allMetabolitesList$ppm1))) { + for (j in 1:length(allMetabolitesList$ppm1)) + { ## Boucle sur metabolites dans BdD composes standards - for (i in seq_len(nbMetabolitesBdD)) { + for (i in 1:nbMetabolitesBdD) + { ppmMetaboliteBdD <- BdDStandards[[i]] ppm1M <- ppmMetaboliteBdD[, 1] ppm2M <- ppmMetaboliteBdD[, 2] @@ -121,6 +127,7 @@ annotationRmn2D <- function(matriceComplexe, BdDStandards, nom_sequence, ppm1Tol commonPpmList <- unique(commonPpmList) metaboliteAdd <- data.frame(nom_metabolite = MetaboliteName) metaboliteAddList <- rbind.data.frame(metaboliteAddList, metaboliteAdd) + # metabolite_ref <- data.frame(nom_metabolite=allMetabolitesList[j,3]) commonMetabolitesList <- rbind.data.frame(data.frame(nom_metabolite = allMetabolitesList[j, 3]), metaboliteAddList) commonMetabolitesPpmList <- cbind.data.frame(commonPpm, commonMetabolitesList) commonMetabolitesPpmAllList1 <- rbind.data.frame(commonMetabolitesPpmAllList1, commonMetabolitesPpmList) @@ -146,7 +153,8 @@ annotationRmn2D <- function(matriceComplexe, BdDStandards, nom_sequence, ppm1Tol } unicitynbCouplesRectif <- data.frame() - for (g in seq_len(nrow(unicityAllList))) { + for (g in 1:nrow(unicityAllList)) + { metaboliteUnicity <- (unicityAllList$Metabolite == unicityAllList$Metabolite[g]) WhichMetaboliteUnicity <- which(metaboliteUnicity) nb_occurence <- length(WhichMetaboliteUnicity) @@ -159,15 +167,18 @@ annotationRmn2D <- function(matriceComplexe, BdDStandards, nom_sequence, ppm1Tol unicityAllList <- unicityAllList[, -3] unicityAllList <- unicityAllList[, -4] + ## unicityAllList <- filter(unicityAllList, unicityAllList$score_unicite > seuil_score) unicityAllList <- unicityAllList[unicityAllList$score_unicite > seuil_score, ] listeTotale_metabo <- data.frame() if (nrow(commonPpmList) != 0) { - for (o in seq_len(length(commonPpmList[, 1]))) { + for (o in 1:length(commonPpmList[, 1])) + { tf6 <- (commonMetabolitesPpmAllList$ppm1 == commonPpmList[o, 1] & commonMetabolitesPpmAllList$ppm2 == commonPpmList[o, 2]) w6 <- which(tf6) - for (s in seq_len(length(w6))) { + for (s in 1:length(w6)) + { metaboliteAdd <- data.frame(nom_metabolite = commonMetabolitesPpmAllList[w6[s], 3]) commonMetabolitesList <- paste(commonMetabolitesList, metaboliteAdd[1, ], sep = " ") } @@ -214,13 +225,17 @@ annotationRmn2D <- function(matriceComplexe, BdDStandards, nom_sequence, ppm1Tol scale_y_reverse(breaks = seq(maxY, 0, indice_negatif)) + xlab("1H chemical shift (ppm)") + ylab(paste(atome, " chemical shift (ppm)")) + ggtitle(nom_sequence) + geom_text( - data = listeTotale_2D_a_utiliser, aes(d1.ppm, d2.ppm, label = str_to_lower(substr(listeTotale_2D_a_utiliser[, 3], 1, 3)), col = probability.score), + data = listeTotale_2D_a_utiliser, aes(d1.ppm, d2.ppm, + label = str_to_lower(substr(listeTotale_2D_a_utiliser[, 3], 1, 3)), + col = probability.score + ), size = 4, hjust = 0, nudge_x = 0.02, vjust = 0, nudge_y = 0.2 ) + scale_colour_manual(values = viridis(lgr)) + ## scale_color_colormap('Annotation', discrete=T, reverse=T) print(sp) } - # Liste des resultats (couples pmm / metabolite / score) + liste ppms metabolites communs + # Liste des r�sultats (couples pmm / metabolite / score) + liste ppms metabolites communs if (unicite == "NO") { return(list(liste_resultat = allMetabolitesList, listing_ppm_commun = listeTotale_metabo)) } else { diff --git a/tools/nmr_annotation2d/annotationRmn2D.xml b/tools/nmr_annotation2d/annotationRmn2D.xml index e3f62098b1..e2bee01af9 100644 --- a/tools/nmr_annotation2d/annotationRmn2D.xml +++ b/tools/nmr_annotation2d/annotationRmn2D.xml @@ -1,4 +1,4 @@ - + Annotation of complex mixture bidimensional NMR spectra diff --git a/tools/nmr_annotation2d/annotationRmn2DGlobale.R b/tools/nmr_annotation2d/annotationRmn2DGlobale.R index 18a6c09151..f0f4aa985b 100644 --- a/tools/nmr_annotation2d/annotationRmn2DGlobale.R +++ b/tools/nmr_annotation2d/annotationRmn2DGlobale.R @@ -1,23 +1,24 @@ -################################################################################################### -# ANNOTATION SPECTRE 2D MATRICE COMPLEXE BASEE SUR UNE (OU PLUSIEURS) SEQUENCE(s) # -# template : dataframe contenant la liste des couples de deplacements chimiques de la matrice complexe a annoter # -# cosy : 1 si sequence a utiliser / 0 sinon # -# hmbc : 1 si sequence a utiliser / 0 sinon # -# hsqc : 1 si sequence a utiliser / 0 sinon # -# jres : 1 si sequence a utiliser / 0 sinon # -# tocsy : 1 si sequence a utiliser / 0 sinon # -# tolPpm1 : tolerance autorisee autour de la valeur1 du couple de deplacements chimiques # -# tolPpm2HJRes : tolerance autorisee autour de la valeur2 du couple de deplacements chimiques si H dans dimension 2 # -# tolPpm2C : tolerance autorisee autour de la valeur2 du couple de deplacements chimiques si C dans dimension 2 # -# seuil : valeur du score de presence en dela de laquelle les metabolites annotes ne sont pas retenus # -# unicite : boolean pour ne retenir que les ... # -################################################################################################### +########################################################################################################################################### +# ANNOTATION SPECTRE 2D MATRICE COMPLEXE BASEE SUR UNE (OU PLUSIEURS) SEQUENCE(s) RMN # +# template : dataframe contenant la liste des couples de deplacements chimiques de la matrice complexe a annoter # +# cosy : 1 si sequence a utiliser / 0 sinon # +# hmbc : 1 si sequence a utiliser / 0 sinon # +# hsqc : 1 si sequence a utiliser / 0 sinon # +# jres : 1 si sequence a utiliser / 0 sinon # +# tocsy : 1 si sequence a utiliser / 0 sinon # +# tolPpm1 : tolerance autorisee autour de la valeur1 du couple de deplacements chimiques # +# tolPpm2HJRes : tolerance autorisee autour de la valeur2 du couple de deplacements chimiques si H dans dimension 2 # +# tolPpm2C : tolerance autorisee autour de la valeur2 du couple de deplacements chimiques si C dans dimension 2 # +# seuil : valeur du score de presence en de�a de laquelle les metabolites annotes ne sont pas retenus # +# unicite : boolean pour ne retenir que les ... # +########################################################################################################################################### ## CALCUL MOYENNE SANS VALEUR(S) MANQUANTE(S) mean.rmNa <- function(x) { mean(x, na.rm = TRUE) } -annotationRmn2DGlobale <- function(template, tolPpm1 = 0.01, tolPpm2HJRes = 0.002, tolPpm2C = 0.5, cosy = 1, hmbc = 1, hsqc = 1, jres = 1, tocsy = 1, seuil, unicite = "NO") { +annotationRmn2DGlobale <- function(template, tolPpm1 = 0.01, tolPpm2HJRes = 0.002, tolPpm2C = 0.5, cosy = 1, hmbc = 1, hsqc = 1, jres = 1, tocsy = 1, + seuil, unicite = "NO") { ## Initialisation options(max.print = 999999999) annotationCOSY <- data.frame() @@ -33,12 +34,18 @@ annotationRmn2DGlobale <- function(template, tolPpm1 = 0.01, tolPpm2HJRes = 0.00 dataTOCSY <- "NA" ## Application seuil seulement si annotation avec 1 seule sequence + ## seuilPls2D <- 0 + ## if ((sum(cosy, hmbc, hsqc, jres, tocsy)) == 1) + ## seuilPls2D <- seuil seuilPls2D <- seuil if (cosy == 1) { matrice.cosy <- read.xlsx(template, sheet = "COSY", startRow = 2, colNames = TRUE, rowNames = FALSE, cols = 1:3, na.strings = "NA") matrice.cosy <- matrice.cosy[matrice.cosy$peak.index != "x", ] - annotationCOSY <- annotationRmn2D(matrice.cosy, BdDReference_COSY, "COSY", ppm1Tol = tolPpm1, ppm2Tol = tolPpm1, seuil = seuilPls2D, unicite = unicite) + annotationCOSY <- annotationRmn2D(matrice.cosy, BdDReference_COSY, "COSY", + ppm1Tol = tolPpm1, ppm2Tol = tolPpm1, seuil = seuilPls2D, + unicite = unicite + ) dataCOSY <- data.frame(Metabolite = str_to_lower(annotationCOSY$liste_resultat$Metabolite), score.COSY = annotationCOSY$liste_resultat$score) dataCOSY <- unique.data.frame(dataCOSY) } @@ -46,7 +53,10 @@ annotationRmn2DGlobale <- function(template, tolPpm1 = 0.01, tolPpm2HJRes = 0.00 if (hmbc == 1) { matrice.hmbc <- read.xlsx(template, sheet = "HMBC", startRow = 2, colNames = TRUE, rowNames = FALSE, cols = 1:3, na.strings = "NA") matrice.hmbc <- matrice.hmbc[matrice.hmbc$peak.index != "x", ] - annotationHMBC <- annotationRmn2D(matrice.hmbc, BdDReference_HMBC, "HMBC", ppm1Tol = tolPpm1, ppm2Tol = tolPpm2C, seuil = seuilPls2D, unicite = unicite) + annotationHMBC <- annotationRmn2D(matrice.hmbc, BdDReference_HMBC, "HMBC", + ppm1Tol = tolPpm1, ppm2Tol = tolPpm2C, seuil = seuilPls2D, + unicite = unicite + ) dataHMBC <- data.frame(Metabolite = str_to_lower(annotationHMBC$liste_resultat$Metabolite), score.HMBC = annotationHMBC$liste_resultat$score) dataHMBC <- unique.data.frame(dataHMBC) } @@ -54,7 +64,10 @@ annotationRmn2DGlobale <- function(template, tolPpm1 = 0.01, tolPpm2HJRes = 0.00 if (hsqc == 1) { matrice.hsqc <- read.xlsx(template, sheet = "HSQC", startRow = 2, colNames = TRUE, rowNames = FALSE, cols = 1:3, na.strings = "NA") matrice.hsqc <- matrice.hsqc[matrice.hsqc$peak.index != "x", ] - annotationHSQC <- annotationRmn2D(matrice.hsqc, BdDReference_HSQC, "HSQC", ppm1Tol = tolPpm1, ppm2Tol = tolPpm2C, seuil = seuilPls2D, unicite = unicite) + annotationHSQC <- annotationRmn2D(matrice.hsqc, BdDReference_HSQC, "HSQC", + ppm1Tol = tolPpm1, ppm2Tol = tolPpm2C, seuil = seuilPls2D, + unicite = unicite + ) dataHSQC <- data.frame(Metabolite = str_to_lower(annotationHSQC$liste_resultat$Metabolite), score.HSQC = annotationHSQC$liste_resultat$score) dataHSQC <- unique.data.frame(dataHSQC) } @@ -62,7 +75,10 @@ annotationRmn2DGlobale <- function(template, tolPpm1 = 0.01, tolPpm2HJRes = 0.00 if (jres == 1) { matrice.jres <- read.xlsx(template, sheet = "JRES", startRow = 2, colNames = TRUE, rowNames = FALSE, cols = 1:3, na.strings = "NA") matrice.jres <- matrice.jres[matrice.jres$peak.index != "x", ] - annotationJRES <- annotationRmn2D(matrice.jres, BdDReference_JRES, "JRES", ppm1Tol = tolPpm1, ppm2Tol = tolPpm2HJRes, seuil = seuilPls2D, unicite = unicite) + annotationJRES <- annotationRmn2D(matrice.jres, BdDReference_JRES, "JRES", + ppm1Tol = tolPpm1, ppm2Tol = tolPpm2HJRes, seuil = seuilPls2D, + unicite = unicite + ) dataJRES <- data.frame(Metabolite = str_to_lower(annotationJRES$liste_resultat$Metabolite), score.JRES = annotationJRES$liste_resultat$score) dataJRES <- unique.data.frame(dataJRES) } @@ -70,20 +86,23 @@ annotationRmn2DGlobale <- function(template, tolPpm1 = 0.01, tolPpm2HJRes = 0.00 if (tocsy == 1) { matrice.tocsy <- read.xlsx(template, sheet = "TOCSY", startRow = 2, colNames = TRUE, rowNames = FALSE, cols = 1:3, na.strings = "NA") matrice.tocsy <- matrice.tocsy[matrice.tocsy$peak.index != "x", ] - annotationTOCSY <- annotationRmn2D(matrice.tocsy, BdDReference_TOCSY, "TOCSY", ppm1Tol = tolPpm1, ppm2Tol = tolPpm1, seuil = seuilPls2D, unicite = unicite) + annotationTOCSY <- annotationRmn2D(matrice.tocsy, BdDReference_TOCSY, "TOCSY", + ppm1Tol = tolPpm1, ppm2Tol = tolPpm1, seuil = seuilPls2D, + unicite = unicite + ) dataTOCSY <- data.frame(Metabolite = str_to_lower(annotationTOCSY$liste_resultat$Metabolite), score.TOCSY = annotationTOCSY$liste_resultat$score) dataTOCSY <- unique.data.frame(dataTOCSY) } - seqCombiMeanScoreSeuil <- data.frame() - seqCombiMeanScoreSeuilFiltre <- data.frame() + sequencesCombinationAverageScoreSeuil <- data.frame() + sequencesCombinationAverageScoreSeuilFiltre <- data.frame() ## CONCATENATION RESULTATS DIFFERENTES SEQUENCES data2D <- list(dataCOSY, dataHMBC, dataHSQC, dataJRES, dataTOCSY) whichSequenceNaN <- which((data2D != "NA")) data2D <- data2D[whichSequenceNaN] sequencesCombination <- data.frame(data2D[1]) - seqCombiMeanScore <- sequencesCombination + sequencesCombinationAverageScore <- sequencesCombination ## Si une seule sequence et seuil sur score = filtre applique dans la fonction annotationRmn2D if (length(data2D) >= 2) { @@ -92,67 +111,16 @@ annotationRmn2DGlobale <- function(template, tolPpm1 = 0.01, tolPpm2HJRes = 0.00 sequencesCombination <- merge.data.frame(sequencesCombination, data2D[l], by = "Metabolite", all.x = TRUE, all.y = TRUE) } - ## Replacement of NA values due to mis annotation - for (m in seq_len(nrow(sequencesCombination))) { - COSYcompound <- sort(names(BdDReference_COSY)) - HMBCcompound <- sort(names(BdDReference_HMBC)) - HSQCcompound <- sort(names(BdDReference_HSQC)) - JREScompound <- sort(names(BdDReference_JRES)) - TOCSYcompound <- sort(names(BdDReference_TOCSY)) - - if (is.na(sequencesCombination[m, 2])) { - compound <- as.character(sequencesCombination[m, 1]) - for (c in seq_len(length(COSYcompound))) { - if (str_to_lower(compound) == str_to_lower(COSYcompound[c])) { - sequencesCombination[m, 2] <- 0 - } - } - } - - if (is.na(sequencesCombination[m, 3])) { - compound <- as.character(sequencesCombination[m, 1]) - for (c in seq_len(length(HMBCcompound))) { - if (str_to_lower(compound) == str_to_lower(HMBCcompound[c])) { - sequencesCombination[m, 3] <- 0 - } - } - } - - if (is.na(sequencesCombination[m, 4])) { - compound <- as.character(sequencesCombination[m, 1]) - for (c in seq_len(length(HSQCcompound))) { - if (str_to_lower(compound) == str_to_lower(HSQCcompound[c])) { - sequencesCombination[m, 4] <- 0 - } - } - } - - if (is.na(sequencesCombination[m, 5])) { - compound <- as.character(sequencesCombination[m, 1]) - for (c in seq_len(length(JREScompound))) { - if (str_to_lower(compound) == str_to_lower(JREScompound[c])) { - sequencesCombination[m, 5] <- 0 - } - } - } - - if (is.na(sequencesCombination[m, 6])) { - compound <- as.character(sequencesCombination[m, 1]) - for (c in seq_len(length(TOCSYcompound))) { - if (str_to_lower(compound) == str_to_lower(TOCSYcompound[c])) { - sequencesCombination[m, 6] <- 0 - } - } - } - } - ## SCORE MOYEN (sans prise en compte valeurs manquantes) - meanScore <- round(apply(sequencesCombination[, -1], 1, FUN = mean.rmNa), 2) - seqCombiMeanScore <- cbind.data.frame(sequencesCombination, averageScore = meanScore) - + meanScore <- apply(sequencesCombination[, -1], 1, FUN = mean.rmNa) + sequencesCombinationAverageScore <- cbind.data.frame(sequencesCombination, averageScore = meanScore) ## SUPPRESSION METABOLITE AVEC SCORE MOYEN < SEUIL - seqCombiMeanScoreSeuilFiltre <- seqCombiMeanScore[seqCombiMeanScore$averageScore > seuil, ] + ## sequencesCombinationAverageScoreSeuilFiltre <- filter(sequencesCombinationAverageScore, averageScore >= seuil) + sequencesCombinationAverageScoreSeuilFiltre <- sequencesCombinationAverageScore[sequencesCombinationAverageScore$averageScore > seuil, ] } - return(list(COSY = annotationCOSY, HMBC = annotationHMBC, HSQC = annotationHSQC, JRES = annotationJRES, TOCSY = annotationTOCSY, combination = seqCombiMeanScoreSeuilFiltre)) + return(list( + COSY = annotationCOSY, HMBC = annotationHMBC, HSQC = annotationHSQC, JRES = annotationJRES, TOCSY = annotationTOCSY, + combination = sequencesCombinationAverageScoreSeuilFiltre + )) } diff --git a/tools/nmr_annotation2d/annotationRmn2DWrapper.R b/tools/nmr_annotation2d/annotationRmn2DWrapper.R index aca2a50caa..2e20345e1a 100755 --- a/tools/nmr_annotation2d/annotationRmn2DWrapper.R +++ b/tools/nmr_annotation2d/annotationRmn2DWrapper.R @@ -1,25 +1,8 @@ -#!/usr/local/public/bin/Rscript --vanilla --slave --no-site-file - -## 201919016 2DNmrAnnotation_1.0.0.R -## Marie Tremblay-Franco -## MetaboHUB: The French Infrastructure for Metabolomics and Fluxomics -## marie.tremblay-franco@inrae.fr - -runExampleL <- FALSE - -if (runExampleL) { - ## ------------------------------ - ## Example of arguments - ## ------------------------------ -} - - ## ------------------------------ ## Options ## ------------------------------ strAsFacL <- options()$stringsAsFactors options(stringsAsFactors = FALSE) -options(digits = 8, scipen = 3) ## ------------------------------ ## Constants @@ -41,9 +24,6 @@ library(ggplot2) library(openxlsx) library(stringr) library(tidyr) -library(curl) -library(jsonlite) -library(stringi) if (!runExampleL) { argLs <- parseCommandArgs(evaluate = FALSE) @@ -58,10 +38,11 @@ sessionInfo() ## Functions ## ------------------------------ source_local <- function(fname) { - argv <- commandArgs(trailingOnly = FALSE) - base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)) - source(paste(base_dir, fname, sep = "/")) + argv <- commandArgs(trailingOnly = FALSE) + base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)) + source(paste(base_dir, fname, sep = "/")) } + # Import the different functions source_local("annotationRmn2D.R") source_local("annotationRmn2DGlobale.R") @@ -69,10 +50,6 @@ source_local("viridis.R") ## Input parameter values fileToAnnotate <- argLs[[1]] -# Constraints values -ph <- argLs$pH -field <- argLs$magneticField - # Chosen sequence(s) cosy <- 0 hmbc <- 0 @@ -80,167 +57,43 @@ hsqc <- 0 jres <- 0 tocsy <- 0 -if (argLs$cosy_2dsequences == "yes") { - cosy <- 1 - peakforestSpectra <- readLines(curl("https://metabohub.peakforest.org/rest/v1/spectra/nmr2d/search?query=cosy&token=9131jq9l8gsjn1j14t351h716u&max=500")) - peakforestSpectra <- fromJSON(peakforestSpectra, simplifyDataFrame = TRUE) - if (ph != 0) { - peakforestSpectra <- peakforestSpectra[peakforestSpectra$sampleNMRTubeConditionsMetadata$potentiaHydrogenii == ph, ] - } - if (field != 0) { - peakforestSpectra <- peakforestSpectra[peakforestSpectra$analyzerNMRSpectrometerDevice$magneticFieldStrenght == field, ] - } - - if (nrow(peakforestSpectra) != 0) { - BdDReference_COSY <- peakforestSpectra$peaks - names(BdDReference_COSY) <- str_split(peakforestSpectra[, 2], simplify = TRUE, pattern = ";")[, 1] - names(BdDReference_COSY) <- enc2utf8(names(BdDReference_COSY)) - names(BdDReference_COSY) <- str_replace_all(names(BdDReference_COSY), "\u00e9", "e") - - for (k in seq_len(length(BdDReference_COSY))) { - peakforestSpectra_df <- data.frame( - ppm.dim1 = BdDReference_COSY[[k]][, 2], ppm.dim2 = BdDReference_COSY[[k]][, 1], - BdDReference_COSY[[k]][, 3:ncol(BdDReference_COSY[[k]])] - ) - BdDReference_COSY[[k]] <- peakforestSpectra_df - } - } else { - stop("No COSY spectra correspond to requested pH and/or magnetic field", call. = FALSE) - } - rm(peakforestSpectra) - rm(peakforestSpectra_df) +if (argLs[[2]] == "yes") { + argv <- commandArgs(trailingOnly = FALSE) + currentDir <- dirname(substring(argv[grep("--file=", argv)], 8)) + cosy <- 1 + load(paste(currentDir, "BdDReference_COSY.RData", sep = "/")) } -if (argLs$hmbc_2dsequences == "yes") { - hmbc <- 1 - peakforestSpectra <- readLines(curl("https://metabohub.peakforest.org/rest/v1/spectra/nmr2d/search?query=hmbc&token=9131jq9l8gsjn1j14t351h716u&max=500")) - peakforestSpectra <- fromJSON(peakforestSpectra, simplifyDataFrame = TRUE) - if (ph != 0) { - peakforestSpectra <- peakforestSpectra[peakforestSpectra$sampleNMRTubeConditionsMetadata$potentiaHydrogenii == ph, ] - } - if (field != 0) { - peakforestSpectra <- peakforestSpectra[peakforestSpectra$analyzerNMRSpectrometerDevice$magneticFieldStrenght == field, ] - } - - if (nrow(peakforestSpectra) != 0) { - BdDReference_HMBC <- peakforestSpectra$peaks - names(BdDReference_HMBC) <- str_split(peakforestSpectra[, 2], simplify = TRUE, pattern = ";")[, 1] - names(BdDReference_HMBC) <- enc2utf8(names(BdDReference_HMBC)) - names(BdDReference_HMBC) <- str_replace_all(names(BdDReference_HMBC), "\u00e9", "e") - - peakforestSpectra_df <- data.frame() - for (k in seq_len(length(BdDReference_HMBC))) { - peakforestSpectra_df <- data.frame( - ppm.dim1 = BdDReference_HMBC[[k]][, 2], ppm.dim2 = BdDReference_HMBC[[k]][, 1], - BdDReference_HMBC[[k]][, 3:ncol(BdDReference_HMBC[[k]])] - ) - BdDReference_HMBC[[k]] <- peakforestSpectra_df - } - } else { - stop("No HMBC spectra correspond to requested pH and/or magnetic field", call. = FALSE) - } - rm(peakforestSpectra) - rm(peakforestSpectra_df) +if (argLs[[3]] == "yes") { + argv <- commandArgs(trailingOnly = FALSE) + currentDir <- dirname(substring(argv[grep("--file=", argv)], 8)) + jres <- 1 + load(paste(currentDir, "BdDReference_JRES.RData", sep = "/")) } -if (argLs$hsqc_2dsequences == "yes") { - hsqc <- 1 - peakforestSpectra <- readLines(curl("https://metabohub.peakforest.org/rest/v1/spectra/nmr2d/search?query=hsqc&token=9131jq9l8gsjn1j14t351h716u&max=500")) - peakforestSpectra <- fromJSON(peakforestSpectra, simplifyDataFrame = TRUE) - - if (ph != 0) { - peakforestSpectra <- peakforestSpectra[peakforestSpectra$sampleNMRTubeConditionsMetadata$potentiaHydrogenii == ph, ] - } - if (field != 0) { - peakforestSpectra <- peakforestSpectra[peakforestSpectra$analyzerNMRSpectrometerDevice$magneticFieldStrenght == field, ] - } - - if (nrow(peakforestSpectra) != 0) { - BdDReference_HSQC <- peakforestSpectra$peaks - names(BdDReference_HSQC) <- str_split(peakforestSpectra[, 2], simplify = TRUE, pattern = ";")[, 1] - names(BdDReference_HSQC) <- enc2utf8(names(BdDReference_HSQC)) - names(BdDReference_HSQC) <- str_replace_all(names(BdDReference_HSQC), "\u00e9", "e") - - for (k in seq_len(length(BdDReference_HSQC))) { - peakforestSpectra_df <- data.frame( - ppm.dim1 = BdDReference_HSQC[[k]][, 2], ppm.dim2 = BdDReference_HSQC[[k]][, 1], - BdDReference_HSQC[[k]][, 3:ncol(BdDReference_HSQC[[k]])] - ) - BdDReference_HSQC[[k]] <- peakforestSpectra_df - } - } else { - stop("No HSQC spectra correspond to requested pH and/or magnetic field", call. = FALSE) - } - rm(peakforestSpectra) - rm(peakforestSpectra_df) +if (argLs[[4]] == "yes") { + argv <- commandArgs(trailingOnly = FALSE) + currentDir <- dirname(substring(argv[grep("--file=", argv)], 8)) + hmbc <- 1 + load(paste(currentDir, "BdDReference_HMBC.RData", sep = "/")) } -if (argLs$jres_2dsequences == "yes") { - jres <- 1 - peakforestSpectra <- readLines(curl("https://metabohub.peakforest.org/rest/v1/spectra/nmr2d/search?query=jres&token=9131jq9l8gsjn1j14t351h716u&max=500")) - peakforestSpectra <- fromJSON(peakforestSpectra, simplifyDataFrame = TRUE) - - if (ph != 0) { - peakforestSpectra <- peakforestSpectra[peakforestSpectra$sampleNMRTubeConditionsMetadata$potentiaHydrogenii == ph, ] - } - if (field != 0) { - peakforestSpectra <- peakforestSpectra[peakforestSpectra$analyzerNMRSpectrometerDevice$magneticFieldStrenght == field, ] - } - - if (nrow(peakforestSpectra) != 0) { - BdDReference_JRES <- peakforestSpectra$peaks - names(BdDReference_JRES) <- str_split(peakforestSpectra[, 2], simplify = TRUE, pattern = ";")[, 1] - names(BdDReference_JRES) <- enc2utf8(names(BdDReference_JRES)) - names(BdDReference_JRES) <- str_replace_all(names(BdDReference_JRES), "\u00e9", "e") - - for (k in seq_len(length(BdDReference_JRES))) { - peakforestSpectra_df <- data.frame( - ppm.dim1 = BdDReference_JRES[[k]][, 2], ppm.dim2 = BdDReference_JRES[[k]][, 1], - BdDReference_JRES[[k]][, 3:ncol(BdDReference_JRES[[k]])] - ) - BdDReference_JRES[[k]] <- peakforestSpectra_df - } - } else { - stop("No JRES spectra correspond to requested pH and/or magnetic field", call. = FALSE) - } - rm(peakforestSpectra) - rm(peakforestSpectra_df) +if (argLs[[5]] == "yes") { + argv <- commandArgs(trailingOnly = FALSE) + currentDir <- dirname(substring(argv[grep("--file=", argv)], 8)) + hsqc <- 1 + load(paste(currentDir, "BdDReference_HSQC.RData", sep = "/")) } -if (argLs$tocsy_2dsequences == "yes") { - tocsy <- 1 - peakforestSpectra <- readLines(curl("https://metabohub.peakforest.org/rest/v1/spectra/nmr2d/search?query=tocsy&token=9131jq9l8gsjn1j14t351h716u&max=500")) - peakforestSpectra <- fromJSON(peakforestSpectra, simplifyDataFrame = TRUE) - - if (ph != 0) { - peakforestSpectra <- peakforestSpectra[peakforestSpectra$sampleNMRTubeConditionsMetadata$potentiaHydrogenii == ph, ] - } - if (field != 0) { - peakforestSpectra <- peakforestSpectra[peakforestSpectra$analyzerNMRSpectrometerDevice$magneticFieldStrenght == field, ] - } - - if (nrow(peakforestSpectra) != 0) { - BdDReference_TOCSY <- peakforestSpectra$peaks - names(BdDReference_TOCSY) <- str_split(peakforestSpectra[, 2], simplify = TRUE, pattern = ";")[, 1] - names(BdDReference_TOCSY) <- enc2utf8(names(BdDReference_TOCSY)) - names(BdDReference_TOCSY) <- str_replace_all(names(BdDReference_TOCSY), "\u00e9", "e") - - for (k in seq_len(length(BdDReference_TOCSY))) { - peakforestSpectra_df <- data.frame( - ppm.dim1 = BdDReference_TOCSY[[k]][, 2], ppm.dim2 = BdDReference_TOCSY[[k]][, 1], - BdDReference_TOCSY[[k]][, 3:ncol(BdDReference_TOCSY[[k]])] - ) - BdDReference_TOCSY[[k]] <- peakforestSpectra_df - } - } else { - stop("No TOCSY spectra correspond to requested pH and/or magnetic field", call. = FALSE) - } - rm(peakforestSpectra) - rm(peakforestSpectra_df) +if (argLs[[6]] == "yes") { + argv <- commandArgs(trailingOnly = FALSE) + currentDir <- dirname(substring(argv[grep("--file=", argv)], 8)) + tocsy <- 1 + load(paste(currentDir, "BdDReference_TOCSY.RData", sep = "/")) } -if (argLs$cosy_2dsequences == "no" & argLs$hmbc_2dsequences == "no" & argLs$hsqc_2dsequences == "no" & argLs$jres_2dsequences == "no" & argLs$tocsy_2dsequences == "no") { - stop("No chosen sequence. You have to choose at least 1 sequence", call. = FALSE) +if (argLs[[2]] == "no" & argLs[[3]] == "no" & argLs[[4]] == "no" & argLs[[5]] == "no" & argLs[[6]] == "no") { + stop("No chosen sequence", call. = FALSE) } @@ -265,90 +118,90 @@ print(argLs) st0 <- Sys.time() pdf(AnnotationGraph, onefile = TRUE) annotationMelange <- annotationRmn2DGlobale(fileToAnnotate, - tolPpm1 = tolPpm1, tolPpm2HJRes = tolPpm2HJRes, - tolPpm2C = tolPpm2C, cosy = cosy, hmbc = hmbc, hsqc = hsqc, - jres = jres, tocsy = tocsy, seuil = seuil, unicite = unicite -) + tolPpm1 = tolPpm1, + tolPpm2HJRes = tolPpm2HJRes, + tolPpm2C = tolPpm2C, cosy = cosy, hmbc = hmbc, hsqc = hsqc, + jres = jres, tocsy = tocsy, seuil = seuil, unicite = unicite) dev.off() if (cosy == 1) { - write.table(annotationMelange$COSY$liste_resultat, - file = argLs[["annotationCOSY"]], quote = FALSE, - row.names = FALSE, sep = "\t" + write.table(annotationMelange$COSY$liste_resultat, + file = argLs[["annotationCOSY"]], quote = FALSE, + row.names = FALSE, sep = "\t" + ) + if (nrow(annotationMelange$COSY$listing_ppm_commun) != 0) { + write.table(annotationMelange$COSY$listing_ppm_commun, + file = argLs[["ppmCommunCOSY"]], quote = FALSE, + row.names = FALSE, sep = "\t" ) - if (nrow(annotationMelange$COSY$listing_ppm_commun) != 0) { - write.table(annotationMelange$COSY$listing_ppm_commun, - file = argLs[["ppmCommunCOSY"]], quote = FALSE, - row.names = FALSE, sep = "\t" - ) - } + } } if (hmbc == 1) { - write.table(annotationMelange$HMBC$liste_resultat, - file = argLs[["annotationHMBC"]], quote = FALSE, - row.names = FALSE, sep = "\t" + write.table(annotationMelange$HMBC$liste_resultat, + file = argLs[["annotationHMBC"]], quote = FALSE, + row.names = FALSE, sep = "\t" + ) + if (nrow(annotationMelange$HMBC$listing_ppm_commun) != 0) { + write.table(annotationMelange$HMBC$listing_ppm_commun, + file = argLs[["ppmCommunHMBC"]], quote = FALSE, + row.names = FALSE, sep = "\t" ) - if (nrow(annotationMelange$HMBC$listing_ppm_commun) != 0) { - write.table(annotationMelange$HMBC$listing_ppm_commun, - file = argLs[["ppmCommunHMBC"]], quote = FALSE, - row.names = FALSE, sep = "\t" - ) - } + } } if (hsqc == 1) { - write.table(annotationMelange$HSQC$liste_resultat, - file = argLs[["annotationHSQC"]], quote = FALSE, - row.names = FALSE, sep = "\t" + write.table(annotationMelange$HSQC$liste_resultat, + file = argLs[["annotationHSQC"]], quote = FALSE, + row.names = FALSE, sep = "\t" + ) + if (nrow(annotationMelange$HSQC$listing_ppm_commun) != 0) { + write.table(annotationMelange$HSQC$listing_ppm_commun, + file = argLs[["ppmCommunHSQC"]], quote = FALSE, + row.names = FALSE, sep = "\t" ) - if (nrow(annotationMelange$HSQC$listing_ppm_commun) != 0) { - write.table(annotationMelange$HSQC$listing_ppm_commun, - file = argLs[["ppmCommunHSQC"]], quote = FALSE, - row.names = FALSE, sep = "\t" - ) - } + } } if (jres == 1) { - write.table(annotationMelange$JRES$liste_resultat, - file = argLs[["annotationJRES"]], quote = FALSE, - row.names = FALSE, sep = "\t" + write.table(annotationMelange$JRES$liste_resultat, + file = argLs[["annotationJRES"]], quote = FALSE, + row.names = FALSE, sep = "\t" + ) + if (nrow(annotationMelange$JRES$listing_ppm_commun) != 0) { + write.table(annotationMelange$JRES$listing_ppm_commun, + file = argLs[["ppmCommunJRES"]], quote = FALSE, + row.names = FALSE, sep = "\t" ) - if (nrow(annotationMelange$JRES$listing_ppm_commun) != 0) { - write.table(annotationMelange$JRES$listing_ppm_commun, - file = argLs[["ppmCommunJRES"]], quote = FALSE, - row.names = FALSE, sep = "\t" - ) - } + } } if (tocsy == 1) { - write.table(annotationMelange$TOCSY$liste_resultat, - file = argLs[["annotationTOCSY"]], quote = FALSE, - row.names = FALSE, sep = "\t" + write.table(annotationMelange$TOCSY$liste_resultat, + file = argLs[["annotationTOCSY"]], quote = FALSE, + row.names = FALSE, sep = "\t" + ) + if (nrow(annotationMelange$TOCSY$listing_ppm_commun) != 0) { + write.table(annotationMelange$TOCSY$listing_ppm_commun, + file = argLs[["ppmCommunTOCSY"]], quote = FALSE, + row.names = FALSE, sep = "\t" ) - if (nrow(annotationMelange$TOCSY$listing_ppm_commun) != 0) { - write.table(annotationMelange$TOCSY$listing_ppm_commun, - file = argLs[["ppmCommunTOCSY"]], quote = FALSE, - row.names = FALSE, sep = "\t" - ) - } + } } ## Combinaison de sequences if (cosy + jres + hmbc + hsqc + tocsy > 1) { - write.table(annotationMelange$combination, - file = argLs[["annotationCombination"]], quote = FALSE, - row.names = FALSE, sep = "\t" - ) + write.table(annotationMelange$combination, + file = argLs[["annotationCombination"]], + quote = FALSE, row.names = FALSE, sep = "\t" + ) } st1 <- Sys.time() print(st1 - st0) ## Ending ## -------- -cat("\nEnd of '2D NMR annotation' Galaxy module call: ", as.character(Sys.time()), sep = "") +cat("\nEnd of 2DNMR annotation tool call: ", as.character(Sys.time()), sep = "") sink() options(stringsAsFactors = strAsFacL) rm(list = ls()) diff --git a/tools/nmr_annotation2d/test-data/2DNMR_Annotation_annotationCombination.tabular b/tools/nmr_annotation2d/test-data/2DNMR_Annotation_annotationCombination.tabular new file mode 100644 index 0000000000..e04f9a5092 --- /dev/null +++ b/tools/nmr_annotation2d/test-data/2DNMR_Annotation_annotationCombination.tabular @@ -0,0 +1,34 @@ +Metabolite score.HSQC score.JRES averageScore +4_hydroxyphenylpropionic_acid NA 0.5 0.5 +alanine 1 1 1 +arabinose NA 0.348837209302326 0.348837209302326 +asparagine 1 1 1 +aspartic_acid 1 1 1 +betaine 1 1 1 +butyric acid 0.333333333333333 0.916666666666667 0.625 +cadaverine 0.333333333333333 0.615384615384615 0.474358974358974 +carnitine 1 0.611111111111111 0.805555555555556 +cholinechloride 0.666666666666667 0.714285714285714 0.69047619047619 +creatine NA 0.5 0.5 +desaminotyrosine NA 0.4 0.4 +dimethylamine NA 1 1 +dimethylglycine NA 0.333333333333333 0.333333333333333 +fumaric acid 1 1 1 +gaba 0.333333333333333 NA 0.333333333333333 +galactose 0.833333333333333 0.473684210526316 0.653508771929825 +glucose 0.666666666666667 0.8125 0.739583333333333 +glycerol NA 0.666666666666667 0.666666666666667 +glycine 1 1 1 +hippuric_acid 1 1 1 +histidine 1 0.428571428571429 0.714285714285714 +indoxylsulfate NA 0.545454545454545 0.545454545454545 +isoleucine 1 0.379310344827586 0.689655172413793 +lactic acid 1 1 1 +mannose NA 0.3125 0.3125 +myo_inositol NA 0.384615384615385 0.384615384615385 +proline 1 0.409090909090909 0.704545454545455 +taurine NA 0.333333333333333 0.333333333333333 +threonine 1 1 1 +tryptophan 1 0.521739130434783 0.760869565217391 +uracil NA 0.5 0.5 +valine 0.75 0.75 0.75 diff --git a/tools/nmr_annotation2d/test-data/2DNMR_Annotation_log.txt b/tools/nmr_annotation2d/test-data/2DNMR_Annotation_log.txt new file mode 100644 index 0000000000..89b5c770d3 --- /dev/null +++ b/tools/nmr_annotation2d/test-data/2DNMR_Annotation_log.txt @@ -0,0 +1,112 @@ + PACKAGE INFO +R version 3.4.3 (2017-11-30) +Platform: x86_64-pc-linux-gnu (64-bit) +Running under: Ubuntu 14.04.5 LTS + +Matrix products: default +BLAS: /usr/lib/libblas/libblas.so.3.0 +LAPACK: /usr/lib/lapack/liblapack.so.3.0 + +locale: + [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C + [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 + [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 + [7] LC_PAPER=en_US.UTF-8 LC_NAME=C + [9] LC_ADDRESS=C LC_TELEPHONE=C +[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C + +attached base packages: +[1] stats graphics grDevices utils datasets base + +other attached packages: +[1] tidyr_0.7.2 stringr_1.2.0 openxlsx_4.1.3 ggplot2_2.2.1 dplyr_0.7.4 +[6] batch_1.1-4 + +loaded via a namespace (and not attached): + [1] Rcpp_0.12.14 bindr_0.1 magrittr_1.5 munsell_0.4.3 + [5] colorspace_1.3-2 R6_2.2.2 rlang_0.4.2 plyr_1.8.4 + [9] tools_3.4.3 grid_3.4.3 gtable_0.2.0 cli_1.1.0 +[13] lazyeval_0.2.1 assertthat_0.2.0 tibble_1.3.4 crayon_1.3.4 +[17] bindrcpp_0.2 zip_1.0.0 purrr_0.3.3 glue_1.2.0 +[21] stringi_1.1.6 compiler_3.4.3 methods_3.4.3 scales_0.5.0 +[25] pkgconfig_2.0.1 +$xlsfile +[1] "/home/vagrant/galaxy/database/datasets/001/dataset_1825.dat" + +$cosy_2dsequences +[1] "no" + +$jres_2dsequences +[1] "yes" + +$hmbc_2dsequences +[1] "no" + +$hsqc_2dsequences +[1] "yes" + +$tocsy_2dsequences +[1] "no" + +$inHouse_DB_choices.choice +[1] "no" + +$tolppm1 +[1] 0.01 + +$tolppm2 +[1] 0.5 + +$tolppmJRES +[1] 0.002 + +$threshold +[1] 0.3 + +$unicity +[1] "no" + +$logOut +[1] "/home/vagrant/galaxy/database/datasets/002/dataset_2767.dat" + +$annotationCOSY +[1] "None" + +$ppmCommunCOSY +[1] "None" + +$annotationJRES +[1] "/home/vagrant/galaxy/database/datasets/002/dataset_2768.dat" + +$ppmCommunJRES +[1] "/home/vagrant/galaxy/database/datasets/002/dataset_2769.dat" + +$annotationHMBC +[1] "None" + +$ppmCommunHMBC +[1] "None" + +$annotationHSQC +[1] "/home/vagrant/galaxy/database/datasets/002/dataset_2770.dat" + +$ppmCommunHSQC +[1] "/home/vagrant/galaxy/database/datasets/002/dataset_2771.dat" + +$annotationTOCSY +[1] "None" + +$ppmCommunTOCSY +[1] "None" + +$annotationCombination +[1] "/home/vagrant/galaxy/database/datasets/002/dataset_2772.dat" + +$AnnotationGraph +[1] "/home/vagrant/galaxy/database/datasets/002/dataset_2773.dat" + +null device + 1 +Time difference of 1.566586 mins + +End of '2D NMR annotation' Galaxy module call: 2019-12-23 10:55:29 \ No newline at end of file diff --git a/tools/nmr_annotation2d/test-data/Template_melange.xlsm b/tools/nmr_annotation2d/test-data/Template_melange.xlsm new file mode 100644 index 0000000000..49b73c35c1 Binary files /dev/null and b/tools/nmr_annotation2d/test-data/Template_melange.xlsm differ diff --git a/tools/nmr_annotation2d/test-data/annotationHsqc.tabular b/tools/nmr_annotation2d/test-data/annotationHsqc.tabular new file mode 100644 index 0000000000..60b03a330c --- /dev/null +++ b/tools/nmr_annotation2d/test-data/annotationHsqc.tabular @@ -0,0 +1,77 @@ +ppm1 ppm2 Metabolite score +1.487 19.022 alanine 1 +3.791 53.343 alanine 1 +2.883 37.372 asparagine 1 +2.964 37.382 asparagine 1 +4.016 54.04 asparagine 1 +2.694 39.367 Aspartic_acid 1 +2.816 39.387 Aspartic_acid 1 +3.905 54.962 Aspartic_acid 1 +3.264 56.272 betaine 1 +3.901 69.074 betaine 1 +2.164 42.369 Butyric acid 0.333333333333333 +3.024 41.961 Cadaverine 0.333333333333333 +2.444 45.792 carnitine 1 +3.232 56.932 carnitine 1 +3.44 72.954 carnitine 1 +4.571 66.903 carnitine 1 +3.208 56.704 CholineChloride 0.666666666666667 +4.072 58.227 CholineChloride 0.666666666666667 +6.526 138.157 Fumaric acid 1 +3.015 42.093 gaba 0.333333333333333 +3.502 74.756 galactose 0.833333333333333 +3.661 75.593 galactose 0.833333333333333 +3.717 78.019 galactose 0.833333333333333 +3.815 71.175 galactose 0.833333333333333 +3.866 71.993 galactose 0.833333333333333 +3.942 71.619 galactose 0.833333333333333 +4 72.162 galactose 0.833333333333333 +4.096 73.292 galactose 0.833333333333333 +4.598 99.277 galactose 0.833333333333333 +5.277 95.132 galactose 0.833333333333333 +3.425 72.307 glucose 0.666666666666667 +3.46 78.647 glucose 0.666666666666667 +3.549 74.169 glucose 0.666666666666667 +3.745 63.514 glucose 0.666666666666667 +3.841 74.223 glucose 0.666666666666667 +3.847 63.4 glucose 0.666666666666667 +4.66 98.737 glucose 0.666666666666667 +5.252 94.768 glucose 0.666666666666667 +3.566 44.267 glycine 1 +3.967 46.611 hippuric_acid 1 +7.556 131.578 hippuric_acid 1 +7.643 135.065 hippuric_acid 1 +7.837 130.019 hippuric_acid 1 +3.209 30.164 Histidine 1 +3.29 30.194 Histidine 1 +4.014 57.269 Histidine 1 +7.155 119.969 Histidine 1 +8.04 138.39 Histidine 1 +0.944 14.001 Isoleucine 1 +1.017 17.526 Isoleucine 1 +1.27 27.262 Isoleucine 1 +1.479 27.34 Isoleucine 1 +1.987 38.709 Isoleucine 1 +3.68 62.433 Isoleucine 1 +1.336 22.913 Lactic acid 1 +4.12 71.318 Lactic acid 1 +2.009 26.543 Proline 1 +2.062 31.789 Proline 1 +2.357 31.817 Proline 1 +3.346 48.831 Proline 1 +3.422 48.867 Proline 1 +4.14 63.947 Proline 1 +1.342 22.349 threonine 1 +3.609 63.354 threonine 1 +4.261 68.825 threonine 1 +3.321 29.248 tryptophan 1 +3.492 29.268 tryptophan 1 +4.066 57.824 tryptophan 1 +7.209 122.251 tryptophan 1 +7.292 124.963 tryptophan 1 +7.337 127.891 tryptophan 1 +7.554 114.838 tryptophan 1 +7.743 121.238 tryptophan 1 +1 19.497 valine 0.75 +1.049 20.77 valine 0.75 +2.281 31.893 valine 0.75 diff --git a/tools/nmr_annotation2d/test-data/annotationJres.tabular b/tools/nmr_annotation2d/test-data/annotationJres.tabular new file mode 100644 index 0000000000..188d411a93 --- /dev/null +++ b/tools/nmr_annotation2d/test-data/annotationJres.tabular @@ -0,0 +1,314 @@ +ppm1 ppm2 Metabolite score +2.452 0 4_hydroxyphenylpropionic_acid 0.5 +2.452 -0.013 4_hydroxyphenylpropionic_acid 0.5 +2.452 0.013 4_hydroxyphenylpropionic_acid 0.5 +2.818 -0.013 4_hydroxyphenylpropionic_acid 0.5 +2.818 0.013 4_hydroxyphenylpropionic_acid 0.5 +1.487 0.006 alanine 1 +1.487 -0.006 alanine 1 +3.791 -0.006 alanine 1 +3.791 -0.018 alanine 1 +3.791 0.006 alanine 1 +3.791 0.018 alanine 1 +3.517 0.002 arabinose 0.348837209302326 +3.655 -0.013 arabinose 0.348837209302326 +3.655 0.013 arabinose 0.348837209302326 +3.671 -0.005 arabinose 0.348837209302326 +3.824 -0.011 arabinose 0.348837209302326 +3.824 0.005 arabinose 0.348837209302326 +3.824 -0.005 arabinose 0.348837209302326 +3.824 0.011 arabinose 0.348837209302326 +3.905 -0.012 arabinose 0.348837209302326 +3.905 -0.009 arabinose 0.348837209302326 +3.905 0.009 arabinose 0.348837209302326 +3.905 0.009 arabinose 0.348837209302326 +3.905 -0.012 arabinose 0.348837209302326 +3.905 -0.009 arabinose 0.348837209302326 +4.013 0.004 arabinose 0.348837209302326 +5.248 -0.002 arabinose 0.348837209302326 +5.248 0.003 arabinose 0.348837209302326 +2.881 -0.008 asparagine 1 +2.881 0.02 asparagine 1 +2.881 0.008 asparagine 1 +2.881 -0.02 asparagine 1 +2.961 0.01 asparagine 1 +2.961 -0.018 asparagine 1 +2.961 -0.011 asparagine 1 +2.961 0.018 asparagine 1 +4.014 -0.01 asparagine 1 +4.014 0.01 asparagine 1 +4.014 -0.002 asparagine 1 +4.014 0.002 asparagine 1 +2.694 0.007 Aspartic_acid 1 +2.694 0.022 Aspartic_acid 1 +2.694 -0.008 Aspartic_acid 1 +2.817 -0.011 Aspartic_acid 1 +2.817 0.011 Aspartic_acid 1 +2.817 0.018 Aspartic_acid 1 +2.817 -0.018 Aspartic_acid 1 +3.906 -0.01 Aspartic_acid 1 +3.906 0.01 Aspartic_acid 1 +3.906 -0.004 Aspartic_acid 1 +3.906 0.004 Aspartic_acid 1 +3.906 0.01 Aspartic_acid 1 +3.906 -0.01 Aspartic_acid 1 +3.273 0 betaine 1 +3.908 0 betaine 1 +0.898 -0.012 Butyric acid 0.916666666666667 +0.902 0 Butyric acid 0.916666666666667 +0.907 0.013 Butyric acid 0.916666666666667 +1.565 0.007 Butyric acid 0.916666666666667 +1.57 0.019 Butyric acid 0.916666666666667 +1.565 -0.03 Butyric acid 0.916666666666667 +1.565 -0.006 Butyric acid 0.916666666666667 +1.57 -0.018 Butyric acid 0.916666666666667 +2.165 0 Butyric acid 0.916666666666667 +2.17 0.013 Butyric acid 0.916666666666667 +2.17 -0.012 Butyric acid 0.916666666666667 +1.726 0.025 Cadaverine 0.615384615384615 +1.73 -0.026 Cadaverine 0.615384615384615 +1.729 0 Cadaverine 0.615384615384615 +1.729 0.013 Cadaverine 0.615384615384615 +1.731 -0.013 Cadaverine 0.615384615384615 +3.022 0.012 Cadaverine 0.615384615384615 +3.022 -0.012 Cadaverine 0.615384615384615 +3.024 0 Cadaverine 0.615384615384615 +2.426 -0.018 carnitine 0.611111111111111 +2.426 0.007 carnitine 0.611111111111111 +2.426 0.018 carnitine 0.611111111111111 +2.446 0.013 carnitine 0.611111111111111 +2.446 -0.013 carnitine 0.611111111111111 +2.445 0.027 carnitine 0.611111111111111 +2.445 0 carnitine 0.611111111111111 +2.445 -0.027 carnitine 0.611111111111111 +2.445 0 carnitine 0.611111111111111 +2.446 -0.038 carnitine 0.611111111111111 +2.445 -0.027 carnitine 0.611111111111111 +2.445 0.027 carnitine 0.611111111111111 +2.446 0.038 carnitine 0.611111111111111 +2.446 -0.013 carnitine 0.611111111111111 +2.446 0.013 carnitine 0.611111111111111 +2.465 -0.007 carnitine 0.611111111111111 +2.465 0.007 carnitine 0.611111111111111 +2.465 0.019 carnitine 0.611111111111111 +2.465 0.019 carnitine 0.611111111111111 +2.465 -0.007 carnitine 0.611111111111111 +2.465 -0.019 carnitine 0.611111111111111 +2.465 0.007 carnitine 0.611111111111111 +3.234 0 carnitine 0.611111111111111 +3.422 0.015 carnitine 0.611111111111111 +3.422 -0.015 carnitine 0.611111111111111 +3.434 0 carnitine 0.611111111111111 +3.422 -0.009 carnitine 0.611111111111111 +3.438 -0.008 carnitine 0.611111111111111 +3.438 0.008 carnitine 0.611111111111111 +3.209 -0.001 CholineChloride 0.714285714285714 +3.529 0.008 CholineChloride 0.714285714285714 +3.529 -0.008 CholineChloride 0.714285714285714 +4.069 0 CholineChloride 0.714285714285714 +4.069 0.009 CholineChloride 0.714285714285714 +3.937 0 creatine 0.5 +2.454 -0.013 Desaminotyrosine 0.4 +2.454 0.013 Desaminotyrosine 0.4 +2.822 -0.013 Desaminotyrosine 0.4 +2.822 0.012 Desaminotyrosine 0.4 +2.729 0 Dimethylamine 1 +3.741 0 Dimethylglycine 0.333333333333333 +6.519 0 Fumaric acid 1 +3.5 -0.002 galactose 0.473684210526316 +3.498 0.015 galactose 0.473684210526316 +3.658 -0.011 galactose 0.473684210526316 +3.658 -0.005 galactose 0.473684210526316 +3.658 0.005 galactose 0.473684210526316 +3.658 0.011 galactose 0.473684210526316 +3.723 -0.016 galactose 0.473684210526316 +3.723 0.016 galactose 0.473684210526316 +3.723 0.016 galactose 0.473684210526316 +3.723 -0.004 galactose 0.473684210526316 +3.723 -0.016 galactose 0.473684210526316 +3.723 0.004 galactose 0.473684210526316 +3.736 0 galactose 0.473684210526316 +3.76 -0.002 galactose 0.473684210526316 +3.762 0.008 galactose 0.473684210526316 +3.763 -0.009 galactose 0.473684210526316 +3.812 -0.012 galactose 0.473684210526316 +3.812 0.005 galactose 0.473684210526316 +3.812 -0.006 galactose 0.473684210526316 +3.812 0.012 galactose 0.473684210526316 +3.863 -0.012 galactose 0.473684210526316 +3.863 -0.006 galactose 0.473684210526316 +3.863 0.006 galactose 0.473684210526316 +3.863 0.012 galactose 0.473684210526316 +4.595 -0.007 galactose 0.473684210526316 +4.595 0.007 galactose 0.473684210526316 +5.274 -0.004 galactose 0.473684210526316 +5.274 0.004 galactose 0.473684210526316 +3.256 -0.014 glucose 0.8125 +3.255 0 glucose 0.8125 +3.422 0.016 glucose 0.8125 +3.411 0.016 glucose 0.8125 +3.422 -0.016 glucose 0.8125 +3.411 -0.016 glucose 0.8125 +3.422 0 glucose 0.8125 +3.475 0 glucose 0.8125 +3.475 -0.011 glucose 0.8125 +3.475 -0.005 glucose 0.8125 +3.475 0.005 glucose 0.8125 +3.475 0.011 glucose 0.8125 +3.475 0.015 glucose 0.8125 +3.502 -0.015 glucose 0.8125 +3.502 0 glucose 0.8125 +3.502 0.015 glucose 0.8125 +3.545 0.011 glucose 0.8125 +3.545 -0.005 glucose 0.8125 +3.545 0.005 glucose 0.8125 +3.545 -0.012 glucose 0.8125 +3.731 -0.015 glucose 0.8125 +3.721 -0.016 glucose 0.8125 +3.732 0.015 glucose 0.8125 +3.721 0.016 glucose 0.8125 +3.732 0.015 glucose 0.8125 +3.732 -0.006 glucose 0.8125 +3.731 -0.015 glucose 0.8125 +3.732 0.005 glucose 0.8125 +3.843 0.009 glucose 0.8125 +3.839 0.011 glucose 0.8125 +3.844 -0.01 glucose 0.8125 +3.839 -0.011 glucose 0.8125 +3.901 -0.012 glucose 0.8125 +3.901 -0.009 glucose 0.8125 +3.901 0.008 glucose 0.8125 +3.902 0.012 glucose 0.8125 +3.901 -0.012 glucose 0.8125 +3.901 -0.009 glucose 0.8125 +4.655 0.007 glucose 0.8125 +4.655 -0.006 glucose 0.8125 +5.243 -0.003 glucose 0.8125 +5.243 0.003 glucose 0.8125 +3.656 -0.013 glycerol 0.666666666666667 +3.656 -0.006 glycerol 0.666666666666667 +3.656 0.006 glycerol 0.666666666666667 +3.791 -0.011 glycerol 0.666666666666667 +3.791 0 glycerol 0.666666666666667 +3.791 0.01 glycerol 0.666666666666667 +3.791 -0.007 glycerol 0.666666666666667 +3.791 -0.018 glycerol 0.666666666666667 +3.791 0.007 glycerol 0.666666666666667 +3.791 0.018 glycerol 0.666666666666667 +3.568 0 glycine 1 +3.969 0 hippuric_acid 1 +7.555 0.013 hippuric_acid 1 +7.555 0 hippuric_acid 1 +7.555 -0.013 hippuric_acid 1 +7.642 0 hippuric_acid 1 +7.642 -0.013 hippuric_acid 1 +7.642 0.012 hippuric_acid 1 +7.836 -0.007 hippuric_acid 1 +7.836 0.007 hippuric_acid 1 +4.015 -0.011 Histidine 0.428571428571429 +4.015 0.01 Histidine 0.428571428571429 +4.015 -0.002 Histidine 0.428571428571429 +4.015 0.002 Histidine 0.428571428571429 +7.156 0 Histidine 0.428571428571429 +8.043 0 Histidine 0.428571428571429 +7.21 0.013 indoxylsulfate 0.545454545454545 +7.21 -0.013 indoxylsulfate 0.545454545454545 +7.21 0 indoxylsulfate 0.545454545454545 +7.283 -0.013 indoxylsulfate 0.545454545454545 +7.283 0.013 indoxylsulfate 0.545454545454545 +7.283 0 indoxylsulfate 0.545454545454545 +0.946 -0.012 Isoleucine 0.379310344827586 +0.948 0.012 Isoleucine 0.379310344827586 +0.949 0 Isoleucine 0.379310344827586 +1.017 0.007 Isoleucine 0.379310344827586 +1.017 -0.006 Isoleucine 0.379310344827586 +1.269 0.025 Isoleucine 0.379310344827586 +1.269 -0.024 Isoleucine 0.379310344827586 +1.269 -0.011 Isoleucine 0.379310344827586 +1.269 0.011 Isoleucine 0.379310344827586 +3.687 -0.004 Isoleucine 0.379310344827586 +3.683 0.003 Isoleucine 0.379310344827586 +1.333 0.006 Lactic acid 1 +1.333 -0.006 Lactic acid 1 +1.333 0.006 Lactic acid 1 +4.117 -0.017 Lactic acid 1 +4.118 0.017 Lactic acid 1 +4.117 -0.006 Lactic acid 1 +4.117 0.006 Lactic acid 1 +3.741 -0.005 mannose 0.3125 +3.741 -0.015 mannose 0.3125 +3.741 0.005 mannose 0.3125 +3.823 0.004 mannose 0.3125 +3.823 -0.004 mannose 0.3125 +3.856 -0.011 mannose 0.3125 +3.856 -0.005 mannose 0.3125 +3.856 0.005 mannose 0.3125 +3.856 0.011 mannose 0.3125 +3.91 -0.012 mannose 0.3125 +3.91 0.009 mannose 0.3125 +3.91 0.009 mannose 0.3125 +3.91 0.012 mannose 0.3125 +3.91 -0.012 mannose 0.3125 +3.943 0 mannose 0.3125 +3.956 0 mannose 0.3125 +3.544 0.011 myo_inositol 0.384615384615385 +3.544 -0.006 myo_inositol 0.384615384615385 +3.544 0.006 myo_inositol 0.384615384615385 +3.544 -0.011 myo_inositol 0.384615384615385 +4.073 0 myo_inositol 0.384615384615385 +2.012 -0.021 Proline 0.409090909090909 +2.011 -0.01 Proline 0.409090909090909 +2.012 0.01 Proline 0.409090909090909 +2.012 0.021 Proline 0.409090909090909 +2.011 0 Proline 0.409090909090909 +2.356 -0.004 Proline 0.409090909090909 +2.356 -0.017 Proline 0.409090909090909 +2.356 0.004 Proline 0.409090909090909 +2.356 0.018 Proline 0.409090909090909 +3.347 -0.009 Proline 0.409090909090909 +3.347 0.01 Proline 0.409090909090909 +3.423 0.001 Proline 0.409090909090909 +3.423 -0.009 Proline 0.409090909090909 +3.423 0.01 Proline 0.409090909090909 +4.141 0.013 Proline 0.409090909090909 +4.141 -0.013 Proline 0.409090909090909 +4.14 -0.002 Proline 0.409090909090909 +4.142 0.002 Proline 0.409090909090909 +3.275 0 taurine 0.333333333333333 +3.43 0 taurine 0.333333333333333 +1.34 0.005 threonine 1 +1.339 -0.006 threonine 1 +1.34 0.005 threonine 1 +3.603 0.004 threonine 1 +3.604 -0.005 threonine 1 +4.26 -0.01 threonine 1 +4.258 -0.02 threonine 1 +4.26 0.01 threonine 1 +4.259 0 threonine 1 +4.259 0.021 threonine 1 +4.063 -0.002 tryptophan 0.521739130434783 +7.204 0.012 tryptophan 0.521739130434783 +7.204 -0.012 tryptophan 0.521739130434783 +7.204 0 tryptophan 0.521739130434783 +7.288 -0.012 tryptophan 0.521739130434783 +7.288 0.013 tryptophan 0.521739130434783 +7.288 0 tryptophan 0.521739130434783 +7.334 0 tryptophan 0.521739130434783 +7.548 -0.006 tryptophan 0.521739130434783 +7.549 0.007 tryptophan 0.521739130434783 +7.738 -0.006 tryptophan 0.521739130434783 +7.738 0.006 tryptophan 0.521739130434783 +7.552 -0.006 Uracil 0.5 +7.552 0.007 Uracil 0.5 +0.998 -0.006 valine 0.75 +0.996 0.006 valine 0.75 +1.047 -0.006 valine 0.75 +1.047 0.006 valine 0.75 +2.279 -0.004 valine 0.75 +2.28 0.003 valine 0.75 +2.28 0.016 valine 0.75 +2.281 -0.016 valine 0.75 +2.28 -0.008 valine 0.75 +2.28 0.008 valine 0.75 +3.62 -0.004 valine 0.75 +3.62 0.004 valine 0.75 diff --git a/tools/nmr_annotation2d/test-data/duplicateHsqc.tabular b/tools/nmr_annotation2d/test-data/duplicateHsqc.tabular new file mode 100644 index 0000000000..e244a0d56a --- /dev/null +++ b/tools/nmr_annotation2d/test-data/duplicateHsqc.tabular @@ -0,0 +1,19 @@ +ppm1 ppm2 commonMetabolitesList +3.024 41.961 Cadaverine 5aminovalericacid gaba Lysine +3.232 56.932 carnitine gpc +4.072 58.227 CholineChloride tryptophan +3.015 42.093 gaba 5aminovalericacid Cadaverine +3.502 74.756 galactose cholic_acid +3.661 75.593 galactose mannose +3.866 71.993 galactose stachyose +3.942 71.619 galactose ribose +4 72.162 galactose stachyose +3.425 72.307 glucose maltose +3.549 74.169 glucose myo_inositol +4.66 98.737 glucose maltose +5.252 94.768 glucose maltose +4.12 71.318 Lactic acid ribose +4.066 57.824 tryptophan CholineChloride +7.209 122.251 tryptophan indoxylsulfate +7.292 124.963 tryptophan indoxylsulfate +1 19.497 valine cholic_acid diff --git a/tools/nmr_annotation2d/test-data/duplicateJres.tabular b/tools/nmr_annotation2d/test-data/duplicateJres.tabular new file mode 100644 index 0000000000..bc67a39dda --- /dev/null +++ b/tools/nmr_annotation2d/test-data/duplicateJres.tabular @@ -0,0 +1,197 @@ +ppm1 ppm2 commonMetabolitesList +2.452 0 4_hydroxyphenylpropionic_acid carnitine Desaminotyrosine glutamine +2.452 -0.013 4_hydroxyphenylpropionic_acid carnitine Desaminotyrosine glutamine +2.452 0.013 4_hydroxyphenylpropionic_acid carnitine Desaminotyrosine +2.818 -0.013 4_hydroxyphenylpropionic_acid Aspartic_acid Desaminotyrosine +2.818 0.013 4_hydroxyphenylpropionic_acid Aspartic_acid Desaminotyrosine +3.791 -0.006 alanine glycerol raffinose stachyose +3.791 -0.018 alanine glycerol maltose raffinose stachyose +3.791 0.006 alanine glycerol raffinose stachyose +3.791 0.018 alanine glycerol raffinose stachyose +3.655 -0.013 arabinose galactose glycerol maltose ribose +3.655 0.013 arabinose galactose glycerol ribose +3.671 -0.005 arabinose mannose ribose +3.824 -0.011 arabinose ribose stachyose +3.824 0.005 arabinose mannose ribose stachyose +3.824 -0.005 arabinose mannose ribose stachyose +3.824 0.011 arabinose Ethanolamine ribose stachyose +3.905 -0.012 arabinose Aspartic_acid glucose mannose raffinose ribose stachyose +3.905 -0.009 arabinose Aspartic_acid glucose mannose raffinose ribose stachyose sucrose +3.905 0.009 arabinose Aspartic_acid glucose mannose raffinose ribose stachyose sucrose +4.013 0.004 arabinose asparagine Histidine ribose +5.248 -0.002 arabinose glucose maltose +5.248 0.003 arabinose glucose maltose +4.014 -0.01 asparagine Histidine +4.014 0.01 asparagine Histidine +4.014 -0.002 asparagine Histidine raffinose ribose +4.014 0.002 asparagine arabinose Histidine raffinose +2.817 -0.011 Aspartic_acid 4_hydroxyphenylpropionic_acid Desaminotyrosine +2.817 0.011 Aspartic_acid 4_hydroxyphenylpropionic_acid Desaminotyrosine +3.906 -0.01 Aspartic_acid arabinose glucose mannose raffinose stachyose +3.906 0.01 Aspartic_acid arabinose glucose mannose raffinose stachyose +3.906 -0.004 Aspartic_acid raffinose stachyose +3.906 0.004 Aspartic_acid raffinose stachyose +3.273 0 betaine taurine +3.908 0 betaine cholic_acid raffinose stachyose +0.898 -0.012 Butyric acid 2_hydroxybutyric_acid 3_methyl-2-oxovaleric acid valeric_acid +0.902 0 Butyric acid 2_hydroxybutyric_acid 3_methyl-2-oxovaleric acid valeric_acid +0.907 0.013 Butyric acid 2_hydroxybutyric_acid 3_methyl-2-oxovaleric acid +1.57 0.019 Butyric acid cholic_acid +1.57 -0.018 Butyric acid cholic_acid +2.17 0.013 Butyric acid octanoic_acid +2.17 -0.012 Butyric acid octanoic_acid +1.73 -0.026 Cadaverine Lysine +1.729 0 Cadaverine Lysine +1.729 0.013 Cadaverine Lysine +1.731 -0.013 Cadaverine Lysine +3.022 0.012 Cadaverine 5aminovalericacid gaba +3.022 -0.012 Cadaverine 5aminovalericacid gaba +3.024 0 Cadaverine 5aminovalericacid gaba Lysine +2.446 0.013 carnitine 4_hydroxyphenylpropionic_acid Desaminotyrosine +2.446 -0.013 carnitine 4_hydroxyphenylpropionic_acid Desaminotyrosine +2.445 0.027 carnitine glutamine +2.445 0 carnitine 4_hydroxyphenylpropionic_acid Desaminotyrosine +3.234 0 carnitine gpc +3.422 0.015 carnitine glucose +3.422 -0.015 carnitine glucose +3.434 0 carnitine maltose rahmnose taurine +3.422 -0.009 carnitine Proline taurine +3.529 0.008 CholineChloride ribose +3.529 -0.008 CholineChloride ribose +4.069 0 CholineChloride cholic_acid myo_inositol raffinose stachyose sucrose tryptophan +4.069 0.009 CholineChloride tryptophan +3.937 0 creatine mannose ribose +2.454 -0.013 Desaminotyrosine 4_hydroxyphenylpropionic_acid carnitine glutamine +2.454 0.013 Desaminotyrosine 4_hydroxyphenylpropionic_acid carnitine +2.822 -0.013 Desaminotyrosine 4_hydroxyphenylpropionic_acid Aspartic_acid +2.822 0.012 Desaminotyrosine 4_hydroxyphenylpropionic_acid Aspartic_acid +3.741 0 Dimethylglycine galactose +3.5 -0.002 galactose cholic_acid glucose +3.498 0.015 galactose glucose +3.658 -0.011 galactose arabinose glycerol +3.658 -0.005 galactose Ethanol glycerol ribose stachyose +3.658 0.005 galactose Ethanol glycerol ribose stachyose +3.658 0.011 galactose arabinose +3.723 -0.016 galactose glucose +3.723 0.016 galactose glucose +3.723 -0.004 galactose glucose +3.723 0.004 galactose glucose +3.736 0 galactose Dimethylglycine +3.76 -0.002 galactose Lysine phenylacetylglycine +3.762 0.008 galactose glucose Lysine maltose raffinose ribose +3.763 -0.009 galactose glutamic acid Lysine raffinose ribose +3.812 -0.012 galactose maltose rahmnose ribose +3.812 0.005 galactose maltose rahmnose sucrose +3.812 -0.006 galactose maltose rahmnose ribose sucrose +3.812 0.012 galactose maltose rahmnose ribose +3.863 -0.012 galactose maltose mannose Methionine rahmnose stachyose +3.863 -0.006 galactose Ethanolamine maltose mannose Serine stachyose +3.863 0.006 galactose maltose mannose ribose Serine stachyose +3.863 0.012 galactose maltose mannose Methionine rahmnose stachyose +3.255 0 glucose arginine +3.422 0.016 glucose carnitine +3.422 -0.016 glucose carnitine +3.422 0 glucose Proline taurine +3.475 0 glucose sucrose +3.475 0.015 glucose sucrose +3.502 -0.015 glucose galactose +3.502 0 glucose cholic_acid galactose +3.502 0.015 glucose galactose +3.545 0.011 glucose myo_inositol +3.545 -0.005 glucose myo_inositol ribose +3.545 0.005 glucose myo_inositol ribose +3.545 -0.012 glucose myo_inositol +3.731 -0.015 glucose galactose stachyose +3.721 -0.016 glucose galactose +3.732 0.015 glucose galactose mannose stachyose +3.721 0.016 glucose galactose +3.732 -0.006 glucose galactose mannose stachyose +3.732 0.005 glucose galactose mannose stachyose +3.843 0.009 glucose inosine raffinose sucrose +3.839 0.011 glucose raffinose ribose +3.844 -0.01 glucose Ethanolamine raffinose sucrose +3.839 -0.011 glucose raffinose ribose +3.901 -0.012 glucose arabinose Aspartic_acid mannose raffinose ribose stachyose +3.901 -0.009 glucose arabinose Aspartic_acid mannose raffinose ribose stachyose sucrose +3.901 0.008 glucose arabinose Aspartic_acid mannose raffinose ribose sucrose +3.902 0.012 glucose arabinose Aspartic_acid mannose raffinose ribose stachyose +5.243 -0.003 glucose arabinose maltose +5.243 0.003 glucose arabinose maltose +3.656 -0.013 glycerol arabinose galactose maltose ribose +3.656 -0.006 glycerol arabinose Ethanol galactose ribose stachyose +3.656 0.006 glycerol Ethanol galactose ribose stachyose +3.791 -0.011 glycerol arginine glutamine ornithine +3.791 0 glycerol arginine glutamine maltose ornithine +3.791 0.01 glycerol arginine glutamic acid glutamine ornithine +3.791 -0.007 glycerol alanine +3.791 0.007 glycerol alanine +3.969 0 hippuric_acid maltose raffinose +4.015 -0.011 Histidine asparagine +4.015 0.01 Histidine asparagine +4.015 -0.002 Histidine asparagine raffinose ribose +4.015 0.002 Histidine arabinose asparagine raffinose +7.21 0.013 indoxylsulfate tryptophan +7.21 -0.013 indoxylsulfate tryptophan +7.21 0 indoxylsulfate indole_3_propionic_acid tryptophan +7.283 -0.013 indoxylsulfate tryptophan +7.283 0.013 indoxylsulfate tryptophan +7.283 0 indoxylsulfate tryptophan +3.687 -0.004 Isoleucine raffinose ribose +3.683 0.003 Isoleucine raffinose sucrose +1.333 0.006 Lactic acid threonine +1.333 -0.006 Lactic acid threonine +4.117 -0.006 Lactic acid ribose +4.117 0.006 Lactic acid ribose +3.741 -0.005 mannose galactose glucose raffinose stachyose +3.741 -0.015 mannose galactose raffinose stachyose +3.741 0.005 mannose galactose glucose raffinose stachyose +3.823 0.004 mannose arabinose maltose ribose stachyose +3.823 -0.004 mannose arabinose maltose ribose stachyose +3.856 -0.011 mannose galactose maltose raffinose ribose stachyose +3.856 -0.005 mannose galactose hydroxyisovaleric inosine ribose stachyose +3.856 0.005 mannose galactose hydroxyisovaleric inosine ribose stachyose +3.856 0.011 mannose galactose maltose raffinose ribose stachyose sucrose +3.91 -0.012 mannose arabinose Aspartic_acid glucose maltose raffinose stachyose +3.91 0.009 mannose arabinose Aspartic_acid glucose maltose raffinose stachyose +3.91 0.012 mannose arabinose Aspartic_acid glucose maltose raffinose stachyose +3.943 0 mannose arabinose creatine ribose +3.956 0 mannose arabinose raffinose +3.544 0.011 myo_inositol glucose +3.544 -0.006 myo_inositol glucose ribose +3.544 0.006 myo_inositol glucose ribose +3.544 -0.011 myo_inositol glucose +4.073 0 myo_inositol cholic_acid CholineChloride raffinose stachyose +2.012 -0.021 Proline hydroxyisovaleric +2.011 -0.01 Proline hydroxyisovaleric +2.012 0.01 Proline hydroxyisovaleric +2.012 0.021 Proline hydroxyisovaleric +3.423 0.001 Proline glucose taurine +3.423 -0.009 Proline carnitine taurine +3.423 0.01 Proline carnitine taurine +4.141 0.013 Proline stachyose +4.141 -0.013 Proline ribose stachyose +4.14 -0.002 Proline ribose +4.142 0.002 Proline ribose stachyose +3.275 0 taurine betaine +3.43 0 taurine carnitine glucose maltose Proline +1.34 0.005 threonine Lactic acid +1.339 -0.006 threonine Lactic acid +3.603 0.004 threonine maltose rahmnose +3.604 -0.005 threonine rahmnose +4.063 -0.002 tryptophan cholic_acid CholineChloride raffinose stachyose sucrose +7.204 0.012 tryptophan indoxylsulfate +7.204 -0.012 tryptophan indoxylsulfate +7.204 0 tryptophan indoxylsulfate +7.288 -0.012 tryptophan indoxylsulfate +7.288 0.013 tryptophan indoxylsulfate +7.288 0 tryptophan indoxylsulfate +7.548 -0.006 tryptophan Uracil +7.549 0.007 tryptophan Uracil +7.552 -0.006 Uracil tryptophan +7.552 0.007 Uracil tryptophan +0.998 -0.006 valine cholic_acid +0.996 0.006 valine cholic_acid +1.047 -0.006 valine 2_methylbutyric_acid +1.047 0.006 valine 2_methylbutyric_acid +3.62 -0.004 valine gpc rahmnose +3.62 0.004 valine gpc rahmnose