polyPK

Mengci Li, Shouli Wang, Guoxiang Xie, Tianlu Chen, Wei Jia

2017-10-21

The advent of mass spectrometry based analytical technologies coupled with multivariate statistical methods offers tremendous new opportunities for understanding the pharmacokinetics of multicomponent herbal medicines. In recent years, Jia’s group proposed a polyPK strategy, in a few review papers (Science 2015, Current Drug Metabolism 2010, Evidence-Based Complementary and Alternative Medicine 2013), to characterize the concentration-time profile and the metabolic response profile of multicomponent drugs, using an integrated phytochemical and metabolomics approach. The brand new strategy has been successfully applied in examining the complex pharmacokinetics and pharmacodynamics profiles of tea (Journal of Proteome Research 2012) and Huangqi decoction (Clinical Pharmacology & Therapeutics 2016). This package is the first implementation of the polyPK strategy with 10 easy-to-use functions. The absorbed drug constitutes, the downstream metabolites of the drug constituents and the endogenous metabolites impacted by them can be identified. The association of different types of compounds and their alterations along time can be illustrated by various figures and tables. The representative PK parameters of all compounds can be calculated.

10 functions of the package of polyPK: DataPre,GetDiffData,GetEndo,GetAbso,GetSecdAbso,PKs,Simi,ScatPlot,HeatMap,CorrPlot

DataPre

Preprocess the input data. Variables with a lot of zeros and outliers may be removed. Missing values may be imputed and filled by various methods. Data may be transformed by logarithm transformation.

library(polyPK)
data("postData")
pred_post<-polyPK::DataPre(tes=postData,mv="min",rz=80,sv=TRUE,log=FALSE,filepath=getwd())

An example of preprocessed post-dose dataset:

pred_post[c(1:10),c(1:10)]
##                               Name        ID      m.z    RT.min.     X1.1
## 1                           gender               <NA>       <NA>        1
## 2                            group               <NA>       <NA>        1
## 3                    timepoints(h)               <NA>       <NA>    0.083
## 4            octanoyl-rac-glycerol   inx0001 219.1401  3.5638000 3.72e+03
## 5  1,2,3-propanetricarboxylic acid HMDB31193  73.0000 15.6571820 1.25e+07
## 6                       tryptophan HMDB00929 203.0819  1.3524000 7.24e+04
## 7              n-octadecanoic acid HMDB00827 283.2634  9.9524000 4.40e+06
## 8                    myristic acid HMDB00806 227.2009  6.8607667 3.78e+05
## 9           glycolithocholic acid  HMDB00698 432.3107  3.4209000 3.10e+01
## 10             3-indolelactic acid HMDB00671 203.0000 21.2330824 3.73e+04
##        X1.2     X1.3     X1.4     X1.5     X1.6
## 1         1        1        1        1        2
## 2         1        1        1        1        1
## 3     0.083    0.083    0.083    0.083    0.083
## 4  1.62e+03 2.91e+03 4.73e+03 3.78e+03 1.90e+03
## 5  1.63e+07 9.99e+06 1.54e+07 1.82e+07 1.27e+07
## 6  9.80e+04 1.14e+05 9.10e+04 9.62e+04 6.97e+04
## 7  4.36e+06 4.23e+06 2.24e+06 2.42e+06 2.65e+06
## 8  7.13e+05 7.07e+05 3.12e+05 4.87e+05 4.55e+05
## 9  4.79e+00 2.82e+02 2.82e+02 2.82e+02 2.82e+02
## 10 8.52e+04 4.87e+04 4.87e+04 3.79e+04 4.87e+04

Simi

A function which can get the similar metabolites of two datas.Especially the similar metabolites between drug and pre-dose metabolites.

data("preData")
data("drugData")
Simi(data1<-preData,data2<-drugData,filepath=getwd())
## $`repetitive rates in data1`
## [1] 0.3076923
## 
## $`repetitive rates in data2`
## [1] 0.6666667
## 
## $`similar metabolites`
##      data1[-c(1:3), 2]
## [1,] "HMDB00205"      
## [2,] "HMDB00806"      
## [3,] "HMDB00827"      
## [4,] "inx0001"

GetDiffData

A function to get all the differential compounds between the pre-dose and every post-dose datasets:

data("preData")
data("postData")
data("design")
data("simidata")
dif<-GetDiffData(preData,postData,simidata,mv="min",rz=80,sv=TRUE,log=FALSE,t="Ttest",r.adj="fdr",filepath=getwd(),design=FALSE)
#'

An example of the differential compounds, with preprocessed data:

prepoA<-dif$A
as.data.frame(prepoA)
##                                Name        ID      m.z    RT.min.     X0.1
## 1                            gender               <NA>       <NA>        1
## 2                             group               <NA>       <NA>        0
## 3                     timepoints(h)               <NA>       <NA>        0
## 110          glycolithocholic acid  HMDB00698 432.3107   3.420900      971
## 210                        fructose HMDB00660 103.0000  16.349850   789000
## 32                    myristic acid HMDB00806 227.2009   6.860767   578000
## 4               n-octadecanoic acid HMDB00827 283.2634   9.952400  3250000
## 5                        tryptophan HMDB00929 203.0819   1.352400    76200
## 6                phenylpyruvic acid HMDB00205 165.0545   3.521883    12600
## 7             octanoyl-rac-glycerol   inx0001 219.1401   3.563800     4180
## 8   1,2,3-propanetricarboxylic acid HMDB31193  73.0000  15.657182 11000000
## 9               3-indolelactic acid HMDB00671 203.0000  21.233082    37100
## 10         formononetin glucuronide HMDB41735 445.1206 10.2335500     <NA>
## 11                      gancaonin V HMDB37586 311.1301  2.2231667     <NA>
## 12                    isoquercitrin HMDB37362 463.0988  2.0986452     <NA>
## 13                   ceanothic acid HMDB36851 485.3250  3.4732833     <NA>
## 14                 ganoderic acid H HMDB35987 571.2883  3.5425833     <NA>
## 15                  isoformononetin HMDB33994 269.0809  2.4982167     <NA>
## 16                       liquiritin HMDB29520 417.1239  2.1398795     <NA>
## 17                     formononetin HMDB05808 267.0631  3.1570558     <NA>
## 18                     trigonelline HMDB00875 136.0404  2.5085333     <NA>
## 19                        histamine HMDB00870 112.0763  0.7084167     <NA>
## 20                    phytanic acid HMDB00801 311.2948 10.8229833     <NA>
## 21              cholesterol sulfate HMDB00653 465.3041  6.6551167     <NA>
## 22                         cytosine HMDB00630 110.0349  9.7993333     <NA>
## 23                  erythronic acid HMDB00613 135.0293  0.5236500     <NA>
## 24            chenodeoxycholic acid HMDB00518 391.2845  3.9222000     <NA>
## 25              2-aminobutyric acid HMDB00452 104.0545  0.7084167     <NA>
## 26             2-pyrocatechuic acid HMDB00397 153.0187  2.4666167     <NA>
## 27                             urea HMDB00294 100.0000  7.1697798     <NA>
## 28                   octadecanamide HMDB34146 284.2946   8.871300   119000
## 29               heptadecanoic acid HMDB02259 269.2477   9.555900    89700
## 30                  phosphoric acid HMDB02142  98.9846   4.382100     4440
## 31              hyodeoxycholic acid HMDB00733 391.2842   3.574000    33500
##         X0.2     X0.3     X0.4     X0.5     X0.6     X0.7     X0.8
## 1          1        1        1        1        2        2        2
## 2          0        0        0        0        0        0        0
## 3          0        0        0        0        0        0        0
## 110      971      971      971 5.09e+00      971      971      971
## 210   471000   412000   520000 3.27e+05   603000   432000   558000
## 32    570000   425000   289000 4.08e+05   603000   168000   346000
## 4    2860000  3110000  2160000 2.79e+06  3250000  1610000  2030000
## 5     101000   125000    96100 1.18e+05    87900   101000   115000
## 6      13600    20100    19100 1.93e+04    16300    19500    21000
## 7       5080     4770     4080 2.74e+03     4990     4430     4150
## 8   10100000 10900000 14500000 1.38e+07 13200000 11800000 12300000
## 9      69200   123000    69200 9.88e+04    61100    44700    69200
## 10      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 11      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 12      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 13      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 14      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 15      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 16      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 17      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 18      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 19      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 20      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 21      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 22      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 23      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 24      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 25      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 26      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 27      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 28     99100   159000   264000 9.54e+04   361000   361000   267000
## 29     89700    86800    42800 7.08e+04    68400    28100    34600
## 30      3690     3220     4320 4.07e+03     4440     5010     4290
## 31      9930    22200    13300 2.57e+04     7800    24600    33500
##         X0.9    X0.10     X1.1     X1.2     X1.3     X1.4     X1.5
## 1          2        2        1        1        1        1        1
## 2          0        0        1        1        1        1        1
## 3          0        0    0.083    0.083    0.083    0.083    0.083
## 110      971      971 3.10e+01 4.79e+00 2.82e+02 2.82e+02 2.82e+02
## 210   469000   637000 6.77e+05 5.22e+05 6.87e+05 2.88e+05 9.63e+05
## 32    442000   587000 3.78e+05 7.13e+05 7.07e+05 3.12e+05 4.87e+05
## 4    2970000  2840000 4.40e+06 4.36e+06 4.23e+06 2.24e+06 2.42e+06
## 5     106000   105000 7.24e+04 9.80e+04 1.14e+05 9.10e+04 9.62e+04
## 6      17300    21900 1.04e+04 1.42e+04 1.96e+04 1.79e+04 1.35e+04
## 7       3540     3310 3.72e+03 1.62e+03 2.91e+03 4.73e+03 3.78e+03
## 8   10400000 13400000 1.25e+07 1.63e+07 9.99e+06 1.54e+07 1.82e+07
## 9     100000    19500 3.73e+04 8.52e+04 4.87e+04 4.87e+04 3.79e+04
## 10      <NA>     <NA> 8.55e+02 7.07e+02 8.55e+02 1.76e+02 3.57e+02
## 11      <NA>     <NA> 8.76e+04 8.54e+03 3.52e+04 3.11e+04 2.95e+04
## 12      <NA>     <NA> 2.17e+03 2.68e+03 2.28e+03 2.71e+03 2.25e+03
## 13      <NA>     <NA> 3.12e+00 1.47e+02 1.77e+02 1.77e+02 1.47e+02
## 14      <NA>     <NA> 3.27e+06 4.61e+06 2.24e+06 3.41e+06 2.83e+06
## 15      <NA>     <NA> 3.90e+02 7.76e+02 1.60e+02 1.37e+02 2.29e+02
## 16      <NA>     <NA> 6.15e-01 6.15e-01 6.18e-01 8.72e-01 6.15e-01
## 17      <NA>     <NA> 1.50e+01 2.93e+00 5.09e+00 1.33e+00 1.38e+00
## 18      <NA>     <NA> 9.69e+02 1.03e+03 1.41e+03 1.31e+03 1.76e+03
## 19      <NA>     <NA> 4.82e-01 1.98e+02 1.10e+02 1.88e+01 1.10e+02
## 20      <NA>     <NA> 3.92e+04 3.92e+04 2.50e+04 5.45e+03 2.11e+04
## 21      <NA>     <NA> 1.30e+05 1.75e+05 1.61e+05 1.46e+05 8.07e+04
## 22      <NA>     <NA> 4.63e+04 4.45e+04 4.23e+04 3.75e+04 3.98e+04
## 23      <NA>     <NA> 2.03e+02 7.88e+02 2.11e+03 1.58e+03 1.31e+03
## 24      <NA>     <NA> 9.69e+02 1.03e+03 1.41e+03 1.31e+03 1.76e+03
## 25      <NA>     <NA> 4.82e-01 1.98e+02 1.10e+02 1.88e+01 1.10e+02
## 26      <NA>     <NA> 3.92e+04 3.92e+04 2.50e+04 5.45e+03 2.11e+04
## 27      <NA>     <NA> 8.89e+02 4.24e+02 5.17e+02 8.45e+02 5.30e+02
## 28    282000   161000     <NA>     <NA>     <NA>     <NA>     <NA>
## 29     72100    65200     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      2840     3330     <NA>     <NA>     <NA>     <NA>     <NA>
## 31     20500     8550     <NA>     <NA>     <NA>     <NA>     <NA>
##         X1.6     X1.7     X1.8     X1.9    X1.10     X2.1     X2.2
## 1          2        2        2        2        2        1        1
## 2          1        1        1        1        1        2        2
## 3      0.083    0.083    0.083    0.083    0.083     0.25     0.25
## 110 2.82e+02 1.23e+02 2.82e+02 6.10e+02 6.41e+02 1.68e+01 6.44e+02
## 210 7.76e+05 6.27e+05 6.86e+05 5.23e+05 6.91e+05 1.90e+06 8.99e+05
## 32  4.55e+05 3.13e+05 5.13e+05 4.74e+05 4.23e+05 3.98e+05 7.13e+05
## 4   2.65e+06 1.81e+06 2.30e+06 3.26e+06 2.92e+06 4.40e+06 4.39e+06
## 5   6.97e+04 8.07e+04 8.15e+04 8.88e+04 8.16e+04 9.26e+04 1.05e+05
## 6   1.41e+04 1.49e+04 1.62e+04 1.10e+04 1.64e+04 1.29e+04 1.43e+04
## 7   1.90e+03 2.83e+03 2.99e+03 2.83e+03 4.35e+03 3.03e+03 3.86e+03
## 8   1.27e+07 1.24e+07 1.13e+07 1.30e+07 1.36e+07 1.16e+07 1.95e+07
## 9   4.87e+04 8.76e+04 2.05e+04 2.37e+04 4.87e+04 4.33e+04 1.12e+05
## 10  8.55e+02 8.76e+02 8.55e+02 2.16e+03 8.55e+02 6.99e+02 2.00e+03
## 11  3.76e+03 1.88e+04 4.66e+04 7.72e+04 1.13e+04 8.88e+04 7.52e+03
## 12  2.25e+03 2.03e+03 1.91e+03 1.98e+03 2.13e+03 1.32e+03 2.19e+03
## 13  8.88e+01 1.47e+02 1.47e+02 1.47e+02 7.38e+01 1.34e+02 1.34e+02
## 14  3.59e+06 3.20e+06 1.91e+06 3.86e+06 3.21e+06 8.83e+05 1.04e+06
## 15  5.76e+01 3.28e+02 2.64e+02 3.08e+01 2.64e+02 2.79e+02 5.40e+02
## 16  6.15e-01 6.15e-01 6.15e-01 3.56e-01 6.15e-01 2.15e-01 1.23e+00
## 17  5.77e+00 2.29e+00 3.72e+00 3.68e+00 1.69e+00 4.14e+01 2.35e+01
## 18  1.07e+03 5.85e+02 1.24e+03 1.23e+03 9.00e+02 9.47e+02 1.75e+03
## 19  1.98e+02 2.68e+01 1.10e+02 1.40e+02 1.90e+02 2.07e+02 2.55e+02
## 20  1.27e+04 5.83e+03 1.35e+04 9.84e+03 1.29e+04 3.92e+04 3.92e+04
## 21  5.02e+04 4.89e+04 7.98e+04 7.27e+04 1.16e+05 1.99e+05 2.39e+05
## 22  4.22e+04 3.91e+04 3.72e+04 4.47e+04 4.47e+04 4.41e+04 4.84e+04
## 23  2.50e+03 8.93e+02 1.20e+03 1.40e+03 1.14e+03 2.23e+02 5.55e+02
## 24  1.07e+03 5.85e+02 1.24e+03 1.23e+03 9.00e+02 9.47e+02 1.75e+03
## 25  1.98e+02 2.68e+01 1.10e+02 1.40e+02 1.90e+02 2.06e+03 1.26e+03
## 26  1.27e+04 5.83e+03 1.35e+04 9.84e+03 1.29e+04 3.92e+04 3.92e+04
## 27  7.57e+02 3.74e+02 6.74e+02 5.25e+01 1.04e+02 8.30e+01 6.13e+02
## 28      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 29      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
##         X2.3     X2.4     X2.5     X2.6     X2.7     X2.8     X2.9
## 1          1        1        1        2        2        2        2
## 2          2        2        2        2        2        2        2
## 3       0.25     0.25     0.25     0.25     0.25     0.25     0.25
## 110 9.82e+02 9.82e+02 2.24e+00 9.82e+02 3.38e+02 9.82e+02 1.65e+03
## 210 1.90e+06 1.85e+06 1.13e+06 1.90e+06 1.29e+06 1.54e+06 1.06e+06
## 32  7.13e+05 3.55e+05 5.26e+05 5.70e+05 2.71e+05 5.22e+05 4.02e+05
## 4   3.87e+06 2.46e+06 2.79e+06 3.25e+06 1.79e+06 2.99e+06 3.31e+06
## 5   1.14e+05 8.09e+04 9.45e+04 7.31e+04 8.94e+04 7.80e+04 8.05e+04
## 6   1.96e+04 1.53e+04 1.38e+04 1.34e+04 1.62e+04 1.25e+04 1.34e+04
## 7   3.88e+03 4.29e+03 2.72e+03 4.11e+03 4.40e+03 2.93e+03 4.93e+03
## 8   1.48e+07 1.73e+07 1.63e+07 1.45e+07 1.57e+07 9.90e+06 1.43e+07
## 9   4.33e+04 1.14e+04 2.84e+04 4.33e+04 4.33e+04 4.33e+04 2.19e+04
## 10  6.56e+02 3.11e+03 3.11e+03 2.27e+03 2.27e+03 3.42e+02 4.51e+02
## 11  4.43e+04 3.00e+04 2.25e+04 6.20e+02 1.66e+04 3.93e+04 1.71e+04
## 12  2.43e+03 1.79e+03 1.96e+03 1.87e+03 1.26e+03 1.68e+03 1.57e+03
## 13  1.77e+02 1.51e+02 7.83e+01 1.34e+02 1.25e+02 1.34e+02 4.22e+00
## 14  2.65e+06 1.06e+06 9.35e+05 1.05e+06 1.10e+06 9.60e+05 1.20e+06
## 15  8.10e+02 8.50e+02 3.78e+02 8.50e+02 8.50e+02 4.03e+02 1.98e+02
## 16  5.04e-01 9.23e-01 7.42e-01 9.23e-01 1.29e+00 1.29e+00 7.61e-01
## 17  3.63e+01 2.38e+01 3.35e+01 4.12e+01 1.78e+01 1.99e+01 6.45e+00
## 18  9.51e+02 4.83e+02 1.40e+03 9.44e+02 1.21e+03 1.20e+03 1.04e+03
## 19  2.95e+00 2.07e+02 2.55e+02 1.39e+01 2.07e+02 2.07e+02 2.55e+02
## 20  2.86e+04 8.93e+03 2.26e+04 1.86e+04 1.12e+04 1.33e+04 1.30e+04
## 21  1.71e+05 1.82e+05 1.04e+05 8.03e+04 7.16e+04 9.96e+04 8.52e+04
## 22  4.36e+04 4.83e+04 4.88e+04 4.33e+04 4.51e+04 4.29e+04 4.90e+04
## 23  3.28e+02 1.21e+03 1.55e+02 1.83e+03 9.80e+02 1.29e+03 9.43e+02
## 24  9.51e+02 4.83e+02 1.40e+03 9.44e+02 1.21e+03 1.20e+03 1.04e+03
## 25  2.11e+03 2.21e+03 9.55e+02 1.01e+03 2.06e+03 2.21e+03 1.26e+03
## 26  2.86e+04 8.93e+03 2.26e+04 1.86e+04 1.12e+04 1.33e+04 1.30e+04
## 27  4.09e+02 5.89e+02 8.22e+02 5.74e+02 2.11e+02 7.36e+02 7.08e+01
## 28      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 29      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
##        X2.10     X3.1     X3.2     X3.3     X3.4     X3.5     X3.6
## 1          2        1        1        1        1        1        2
## 2          2        3        3        3        3        3        3
## 3       0.25      0.5      0.5      0.5      0.5      0.5      0.5
## 110 1.65e+03 1.65e+03 1.35e+03 1.65e+03 1.65e+03 1.65e+03 1.65e+03
## 210 1.61e+06 1.90e+06 1.90e+06 1.90e+06 1.63e+06 1.49e+06 1.90e+06
## 32  5.04e+05 2.55e+05 5.46e+05 4.27e+05 2.97e+05 4.33e+05 3.77e+05
## 4   2.81e+06 3.58e+06 3.31e+06 2.97e+06 2.25e+06 2.55e+06 2.70e+06
## 5   8.63e+04 6.84e+04 9.01e+04 9.01e+04 8.44e+04 9.42e+04 6.03e+04
## 6   1.57e+04 9.02e+03 1.06e+04 1.65e+04 1.55e+04 1.35e+04 1.18e+04
## 7   4.61e+03 4.21e+03 2.38e+03 2.34e+03 3.53e+03 3.72e+03 3.87e+03
## 8   1.34e+07 1.21e+07 1.61e+07 1.15e+07 1.40e+07 1.48e+07 1.33e+07
## 9   4.33e+04 2.36e+04 2.36e+04 2.36e+04 2.36e+04 2.36e+04 2.36e+04
## 10  6.14e+02 1.25e+03 6.10e+02 1.25e+03 2.40e+03 5.77e+02 1.25e+03
## 11  2.22e+03 9.09e+04 9.58e+03 1.69e+04 8.23e+03 1.89e+04 2.43e+03
## 12  2.08e+03 1.78e+03 7.96e+02 1.52e+03 1.81e+03 1.60e+03 1.67e+03
## 13  1.34e+02 1.29e+02 1.25e+02 1.58e+02 1.29e+02 6.32e+01 1.77e+02
## 14  9.61e+05 7.42e+05 1.24e+06 1.71e+06 7.56e+05 5.44e+05 7.59e+05
## 15  3.98e+02 8.50e+02 8.50e+02 8.50e+02 8.50e+02 8.47e+02 8.50e+02
## 16  1.35e+00 2.71e+00 1.71e+00 2.71e+00 2.71e+00 2.71e+00 2.71e+00
## 17  1.93e+01 7.15e+01 4.83e+01 4.07e+01 3.35e+01 4.56e+01 6.56e+01
## 18  1.23e+03 1.05e+03 1.16e+03 6.99e+02 8.31e+02 1.65e+03 4.19e+02
## 19  2.55e+02 7.86e+01 1.24e+02 1.85e+02 1.40e+02 2.55e+02 2.24e+02
## 20  1.43e+04 3.92e+04 3.23e+04 2.43e+04 7.69e+03 2.01e+04 1.40e+04
## 21  1.27e+05 1.36e+05 1.51e+05 1.41e+05 1.29e+05 9.40e+04 5.56e+04
## 22  4.12e+04 4.73e+04 4.97e+04 5.04e+04 5.19e+04 5.25e+04 5.23e+04
## 23  8.89e+02 9.24e+02 1.35e+03 2.44e+03 1.77e+03 3.63e+02 2.26e+03
## 24  1.23e+03 7.42e+05 1.24e+06 1.71e+06 7.56e+05 5.44e+05 7.59e+05
## 25  2.16e+03 2.35e+04 2.36e+04 3.02e+04 1.74e+04 4.46e+04 1.87e+04
## 26  1.43e+04 1.36e+05 1.76e+05 2.18e+05 1.97e+05 1.80e+05 1.74e+05
## 27  8.26e+02 2.37e+04 2.26e+04 3.33e+04 3.56e+04 2.79e+04 2.60e+04
## 28      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 29      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
##         X3.7     X3.8     X3.9    X3.10     X4.1     X4.2     X4.3
## 1          2        2        2        2        1        1        1
## 2          3        3        3        3        4        4        4
## 3        0.5      0.5      0.5      0.5        1        1        1
## 110 1.65e+03 1.65e+03 1.22e+03 1.65e+03 5.71e+02 5.71e+02 5.71e+02
## 210 1.66e+06 1.55e+06 7.76e+05 1.90e+06 1.36e+06 1.60e+06 1.34e+06
## 32  3.52e+05 4.96e+05 3.69e+05 4.55e+05 1.73e+05 2.99e+05 3.26e+05
## 4   1.78e+06 2.97e+06 2.89e+06 2.59e+06 2.24e+06 2.16e+06 2.36e+06
## 5   8.85e+04 8.19e+04 8.10e+04 8.98e+04 7.34e+04 9.21e+04 1.09e+05
## 6   1.51e+04 1.56e+04 1.29e+04 1.54e+04 1.11e+04 1.33e+04 1.51e+04
## 7   3.28e+03 2.74e+03 3.39e+03 4.84e+03 2.65e+03 3.45e+03 2.67e+03
## 8   1.36e+07 9.84e+06 1.24e+07 1.38e+07 1.16e+07 1.79e+07 1.20e+07
## 9   2.36e+04 2.36e+04 2.08e+04 2.64e+04 1.50e+04 1.50e+04 1.50e+04
## 10  1.25e+03 1.41e+03 1.00e+03 1.50e+03 1.68e+03 4.62e+02 1.68e+03
## 11  4.50e+03 9.09e+04 1.05e+03 3.03e+03 9.09e+04 3.89e+03 3.10e+04
## 12  1.02e+03 1.42e+03 1.09e+03 2.14e+03 1.42e+03 1.80e+03 1.86e+03
## 13  1.29e+02 5.13e+01 1.29e+02 1.37e+02 1.52e+02 1.42e+02 1.77e+02
## 14  5.60e+05 6.65e+05 1.11e+06 2.41e+06 5.57e+06 4.81e+06 5.57e+06
## 15  5.63e+02 8.50e+02 8.50e+02 8.50e+02 8.50e+02 8.50e+02 6.41e+02
## 16  8.45e-01 2.71e+00 2.71e+00 2.61e+00 2.71e+00 1.68e+00 2.71e+00
## 17  7.15e+01 5.41e+01 5.40e+01 5.01e+01 1.47e+01 1.38e+01 1.37e+01
## 18  1.19e+03 1.48e+03 1.67e+03 1.02e+03 1.10e+03 1.53e+03 1.09e+03
## 19  6.33e+01 1.85e+02 4.30e+00 1.85e+02 1.33e+02 2.55e+02 1.50e+02
## 20  8.20e+03 1.64e+04 1.67e+04 1.06e+04 2.55e+04 2.44e+04 1.66e+04
## 21  6.85e+04 1.04e+05 6.49e+04 9.88e+04 2.20e+05 2.02e+05 1.86e+05
## 22  4.19e+04 4.63e+04 4.95e+04 4.33e+04 4.42e+04 5.08e+04 5.08e+04
## 23  2.60e+03 1.26e+03 1.44e+03 2.16e+03 6.14e+02 2.22e+03 2.91e+03
## 24  5.60e+05 6.65e+05 1.11e+06 2.41e+06 2.41e+06 2.41e+06 2.41e+06
## 25  1.73e+04 2.82e+04 2.30e+04 2.49e+04 2.32e+04 2.28e+04 2.79e+04
## 26  1.99e+05 1.91e+05 1.73e+05 2.05e+05 1.25e+05 2.01e+05 1.94e+05
## 27  3.26e+04 3.49e+04 2.72e+04 3.33e+04 3.19e+04 2.95e+04 3.76e+04
## 28      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 29      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
##         X4.4     X4.5     X4.6     X4.7     X4.8     X4.9    X4.10
## 1          1        1        2        2        2        2        2
## 2          4        4        4        4        4        4        4
## 3          1        1        1        1        1        1        1
## 110 5.71e+02 3.08e+02 5.71e+02 1.31e+02 5.71e+02 2.35e+02 1.61e+03
## 210 8.82e+05 1.10e+06 1.48e+06 1.45e+06 1.48e+06 6.17e+05 1.33e+06
## 32  2.40e+05 2.15e+05 2.25e+05 2.21e+05 4.69e+05 2.79e+05 2.36e+05
## 4   1.84e+06 1.63e+06 1.77e+06 1.55e+06 3.02e+06 2.32e+06 1.76e+06
## 5   8.68e+04 8.13e+04 6.34e+04 6.70e+04 7.90e+04 8.11e+04 7.30e+04
## 6   1.73e+04 1.19e+04 1.24e+04 1.16e+04 1.32e+04 1.35e+04 1.37e+04
## 7   3.28e+03 4.71e+03 3.01e+03 4.09e+03 3.07e+03 3.32e+03 2.67e+03
## 8   1.53e+07 1.77e+07 1.46e+07 1.33e+07 1.09e+07 1.27e+07 1.37e+07
## 9   1.50e+04 1.50e+04 1.50e+04 1.50e+04 1.50e+04 1.50e+04 1.50e+04
## 10  6.14e+02 6.40e+02 7.11e+02 3.11e+03 5.53e+02 1.68e+03 4.50e+02
## 11  1.45e+04 5.12e+04 4.70e+04 1.08e+04 7.74e+04 4.09e+04 3.06e+04
## 12  1.61e+03 1.70e+03 1.89e+03 1.54e+03 9.78e+02 8.86e+02 1.27e+03
## 13  1.08e+02 6.62e+01 1.42e+02 4.03e+01 1.42e+02 1.52e+02 1.42e+02
## 14  4.76e+06 2.11e+06 1.09e+06 1.78e+06 2.18e+06 4.74e+06 1.06e+06
## 15  8.50e+02 7.45e+02 6.70e+02 8.50e+02 8.50e+02 8.50e+02 8.50e+02
## 16  2.71e+00 2.71e+00 2.71e+00 2.71e+00 2.71e+00 2.01e+00 2.71e+00
## 17  1.49e+01 8.77e+00 6.58e+00 3.45e+01 3.24e+01 1.20e+01 1.86e+01
## 18  1.47e+03 8.11e+02 8.69e+02 1.51e+03 1.29e+03 1.28e+03 1.25e+03
## 19  1.50e+02 1.09e+02 2.55e+02 1.40e+02 2.15e+01 8.68e+01 1.82e+02
## 20  8.79e+03 1.13e+04 3.64e+03 1.01e+04 1.77e+04 9.52e+03 1.06e+04
## 21  1.89e+05 9.95e+04 7.83e+04 6.57e+04 1.11e+05 7.89e+04 1.19e+05
## 22  4.80e+04 5.19e+04 4.90e+04 4.39e+04 4.44e+04 5.17e+04 4.72e+04
## 23  2.91e+03 1.58e+02 2.91e+03 1.71e+03 1.43e+03 2.04e+03 8.41e+02
## 24  1.17e+06 1.23e+06 1.01e+06 1.04e+06 2.24e+06 2.41e+06 2.41e+06
## 25  2.21e+04 4.15e+04 1.71e+04 1.54e+04 2.80e+04 2.60e+04 2.16e+04
## 26  1.85e+05 1.77e+05 1.73e+05 1.88e+05 1.78e+05 1.66e+05 1.98e+05
## 27  3.46e+04 2.64e+04 3.16e+04 3.71e+04 3.67e+04 3.63e+04 4.31e+04
## 28      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 29      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
##         X5.1     X5.2     X5.3     X5.4     X5.5     X5.6     X5.7
## 1          1        1        1        1        1        2        2
## 2          5        5        5        5        5        5        5
## 3          2        2        2        2        2        2        2
## 110 1.81e+02 5.87e+02 1.17e+03 1.74e+01 1.17e+03 1.17e+03 1.17e+03
## 210 5.01e+05 4.58e+05 4.13e+05 3.37e+05 3.62e+05 2.88e+05 2.94e+05
## 32  2.36e+05 3.13e+05 5.74e+05 3.02e+05 3.98e+05 2.69e+05 2.42e+05
## 4   2.45e+06 2.03e+06 3.25e+06 2.19e+06 2.43e+06 2.04e+06 1.69e+06
## 5   6.51e+04 7.04e+04 8.74e+04 6.86e+04 7.87e+04 4.52e+04 7.71e+04
## 6   9.34e+03 1.07e+04 1.52e+04 1.59e+04 1.23e+04 9.96e+03 1.38e+04
## 7   3.63e+03 2.50e+03 1.76e+03 2.56e+03 2.81e+03 1.15e+03 2.93e+03
## 8   1.29e+07 1.59e+07 1.27e+07 1.57e+07 1.74e+07 9.80e+06 1.29e+07
## 9   1.11e+05 1.11e+05 1.11e+05 1.11e+05 1.11e+05 1.11e+05 1.11e+05
## 10  3.77e+02 4.21e+02 1.58e+03 3.11e+03 2.48e+03 1.44e+03 2.48e+03
## 11  1.44e+03 1.65e+03 1.85e+03 1.14e+03 1.45e+03 1.22e+03 1.45e+03
## 12  1.13e+02 1.62e+02 1.08e+02 1.69e+02 2.70e+01 2.48e+01 3.22e+01
## 13  7.50e+01 9.20e+01 1.23e+02 7.60e+01 1.77e+02 8.80e+01 1.77e+02
## 14  1.69e+04 1.21e+04 1.54e+04 1.51e+04 2.83e+04 1.10e+04 1.74e+04
## 15  4.09e+02 3.75e+02 9.18e+01 4.09e+02 9.30e+01 1.81e+02 4.09e+02
## 16  2.71e+00 2.21e+00 2.71e+00 2.71e+00 2.71e+00 2.71e+00 2.71e+00
## 17  1.57e+00 1.12e+00 5.93e+00 4.70e-01 2.25e+00 2.42e+00 3.24e+00
## 18  1.09e+03 1.12e+03 1.43e+03 1.61e+03 7.71e+02 8.01e+02 1.47e+03
## 19  1.15e+02 7.61e+00 8.39e-01 1.02e+02 5.27e+01 1.16e+02 9.80e+01
## 20  2.37e+04 1.45e+04 1.72e+04 1.06e+04 1.91e+04 9.62e+03 1.26e+04
## 21  2.02e+05 1.90e+05 1.85e+05 1.94e+05 1.16e+05 5.55e+04 7.96e+04
## 22  4.42e+04 5.17e+04 5.17e+04 5.13e+04 5.24e+04 5.26e+04 4.30e+04
## 23  5.17e+02 1.66e+03 1.59e+03 1.74e+03 3.37e+02 3.03e+02 2.03e+03
## 24  7.07e+04 3.32e+04 2.41e+04 1.45e+04 2.59e+04 1.46e+03 5.03e+04
## 25  1.44e+03 1.65e+03 1.85e+03 1.14e+03 1.45e+03 1.22e+03 1.45e+03
## 26  1.13e+02 1.62e+02 1.08e+02 1.69e+02 2.70e+01 2.48e+01 3.22e+01
## 27  4.31e+04 4.31e+04 4.31e+04 4.31e+04 4.31e+04 4.31e+04 4.31e+04
## 28      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 29      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
##         X5.8     X5.9    X5.10
## 1          2        2        2
## 2          5        5        5
## 3          2        2        2
## 110 1.17e+03 1.17e+03 1.65e+03
## 210 6.43e+05 3.77e+05 3.37e+05
## 32  5.11e+05 2.14e+05 3.20e+05
## 4   2.94e+06 1.96e+06 1.88e+06
## 5   7.77e+04 7.38e+04 7.11e+04
## 6   1.13e+04 1.19e+04 1.34e+04
## 7   2.84e+03 2.27e+03 2.13e+03
## 8   1.35e+07 1.16e+07 1.54e+07
## 9   1.22e+05 1.11e+05 9.97e+04
## 10  1.47e+03 5.91e+02 2.48e+03
## 11  9.35e+02 9.08e+02 1.19e+03
## 12  2.38e+02 1.36e+02 1.13e+02
## 13  9.70e+01 9.90e+01 1.02e+02
## 14  4.33e+04 1.58e+04 1.58e+04
## 15  8.50e+02 1.88e+02 8.50e+02
## 16  9.90e-01 2.71e+00 2.71e+00
## 17  5.81e+00 4.47e+00 3.27e+00
## 18  1.18e+03 9.28e+02 1.02e+03
## 19  7.31e+01 7.31e+01 9.24e+01
## 20  1.66e+04 8.01e+03 8.55e+03
## 21  1.10e+05 7.94e+04 1.13e+05
## 22  4.83e+04 5.08e+04 4.68e+04
## 23  1.44e+03 1.62e+03 8.24e+02
## 24  1.03e+05 6.59e+03 2.69e+04
## 25  9.35e+02 9.08e+02 1.19e+03
## 26  2.38e+02 1.36e+02 1.13e+02
## 27  4.31e+04 4.31e+04 4.31e+04
## 28      <NA>     <NA>     <NA>
## 29      <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>
## 31      <NA>     <NA>     <NA>

An example of the differential compounds, with original data:

orgA<-dif$A_pre
as.data.frame(orgA)
##                                Name        ID       m.z    RT.min.    X0.1
## 1                            gender                <NA>       <NA>       1
## 2                             group                <NA>       <NA>       0
## 3                     timepoints(h)                <NA>       <NA>       0
## 110          glycolithocholic acid  HMDB00698  432.3107     3.4209     971
## 210                        fructose HMDB00660       103 16.3498505  789000
## 32                    myristic acid HMDB00806  227.2009  6.8607667  578000
## 4               n-octadecanoic acid HMDB00827  283.2634     9.9524 3250000
## 5                        tryptophan HMDB00929  203.0819     1.3524   76200
## 6                phenylpyruvic acid HMDB00205  165.0545  3.5218833   12600
## 7             octanoyl-rac-glycerol   inx0001  219.1401     3.5638    4180
## 8   1,2,3-propanetricarboxylic acid HMDB31193        73  15.657182 1.1e+07
## 9               3-indolelactic acid HMDB00671       203 21.2330824   37100
## 10         formononetin glucuronide HMDB41735 445.12059   10.23355    <NA>
## 11                      gancaonin V HMDB37586 311.13009  2.2231667    <NA>
## 12                    isoquercitrin HMDB37362  463.0988  2.0986452    <NA>
## 13                   ceanothic acid HMDB36851 485.32502  3.4732833    <NA>
## 14                 ganoderic acid H HMDB35987 571.28834  3.5425833    <NA>
## 15                  isoformononetin HMDB33994 269.08095  2.4982167    <NA>
## 16                       liquiritin HMDB29520  417.1239  2.1398795    <NA>
## 17                     formononetin HMDB05808  267.0631  3.1570558    <NA>
## 18                     trigonelline HMDB00875 136.04045  2.5085333    <NA>
## 19                        histamine HMDB00870 112.07626  0.7084167    <NA>
## 20                    phytanic acid HMDB00801 311.29478 10.8229833    <NA>
## 21              cholesterol sulfate HMDB00653 465.30412  6.6551167    <NA>
## 22                         cytosine HMDB00630 110.03495  9.7993333    <NA>
## 23                  erythronic acid HMDB00613 135.02929    0.52365    <NA>
## 24            chenodeoxycholic acid HMDB00518 391.28446     3.9222    <NA>
## 25              2-aminobutyric acid HMDB00452 104.05447  0.7084167    <NA>
## 26             2-pyrocatechuic acid HMDB00397 153.01865  2.4666167    <NA>
## 27                             urea HMDB00294       100  7.1697798    <NA>
## 28                   octadecanamide HMDB34146  284.2946     8.8713  119000
## 29               heptadecanoic acid HMDB02259  269.2477     9.5559   89700
## 30                  phosphoric acid HMDB02142   98.9846     4.3821    4440
## 31              hyodeoxycholic acid HMDB00733  391.2842      3.574   33500
##         X0.2     X0.3     X0.4     X0.5     X0.6     X0.7     X0.8
## 1          1        1        1        1        2        2        2
## 2          0        0        0        0        0        0        0
## 3          0        0        0        0        0        0        0
## 110      971      971      971     5.09      971      971      971
## 210   471000   412000   520000   327000   603000   432000   558000
## 32    570000   425000   289000   408000   603000   168000   346000
## 4    2860000  3110000  2160000  2790000  3250000  1610000  2030000
## 5     101000   125000    96100   118000    87900   101000   115000
## 6      13600    20100    19100    19300    16300    19500    21000
## 7       5080     4770     4080     2740     4990     4430     4150
## 8   10100000 10900000 14500000 13800000 13200000 11800000 12300000
## 9      69200   123000    69200    98800    61100    44700    69200
## 10      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 11      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 12      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 13      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 14      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 15      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 16      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 17      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 18      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 19      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 20      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 21      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 22      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 23      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 24      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 25      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 26      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 27      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 28     99100   159000   264000    95400   361000   361000   267000
## 29     89700    86800    42800    70800    68400    28100    34600
## 30      3690     3220     4320     4070     4440     5010     4290
## 31      9930    22200    13300    25700     7800    24600    33500
##         X0.9    X0.10     X1.1     X1.2    X1.3     X1.4     X1.5     X1.6
## 1          2        2        1        1       1        1        1        2
## 2          0        0        1        1       1        1        1        1
## 3          0        0    0.083    0.083   0.083    0.083    0.083    0.083
## 110      971      971       31     4.79     282      282      282      282
## 210   469000   637000   677000   522000  687000        0   963000   776000
## 32    442000   587000   378000   713000  707000   312000   487000   455000
## 4    2970000  2840000  4400000  4360000 4230000  2240000  2420000  2650000
## 5     106000   105000    72400    98000  132000    91000    96200    69700
## 6      17300    21900    10400    14200   22400    17900    13500    14100
## 7       3540     3310     3720     1620    2910     4730     3780     1900
## 8   10400000 13400000 12500000 16300000 9990000 15400000 18200000 12700000
## 9      1e+05    19500    37300    85200   48700    48700    37900    48700
## 10      <NA>     <NA>      855      707     855      176      357      855
## 11      <NA>     <NA>    87600     8540   35200    31100    29500     3760
## 12      <NA>     <NA>     2170     2680    2280     2710     2250     2250
## 13      <NA>     <NA>     3.12      147     238      238      147     88.8
## 14      <NA>     <NA>  3270000  4610000 2240000  3410000  2830000  3590000
## 15      <NA>     <NA>      390      776     160      137      229     57.6
## 16      <NA>     <NA>    0.615    0.615   0.618    0.872    0.615    0.615
## 17      <NA>     <NA>       15     2.93    5.09     1.33     1.38     5.77
## 18      <NA>     <NA>      969     1030    1410     1310     1760     1070
## 19      <NA>     <NA>    0.482      198     110     18.8      110      198
## 20      <NA>     <NA>    39200    39200   25000     5450    21100    12700
## 21      <NA>     <NA>   130000   175000  161000   146000    80700    50200
## 22      <NA>     <NA>    46300    44500   42300    37500    39800    42200
## 23      <NA>     <NA>      203      788    2110     1580     1310     2500
## 24      <NA>     <NA>      969     1030    1410     1310     1760     1070
## 25      <NA>     <NA>    0.482      198     110     18.8      110      198
## 26      <NA>     <NA>    39200    39200   25000     5450    21100    12700
## 27      <NA>     <NA>      889      424     517      845      530      757
## 28    282000   161000     <NA>     <NA>    <NA>     <NA>     <NA>     <NA>
## 29     72100    65200     <NA>     <NA>    <NA>     <NA>     <NA>     <NA>
## 30      2840     3330     <NA>     <NA>    <NA>     <NA>     <NA>     <NA>
## 31     20500     8550     <NA>     <NA>    <NA>     <NA>     <NA>     <NA>
##         X1.7     X1.8    X1.9    X1.10     X2.1     X2.2     X2.3     X2.4
## 1          2        2       2        2        1        1        1        1
## 2          1        1       1        1        2        2        2        2
## 3      0.083    0.083   0.083    0.083     0.25     0.25     0.25     0.25
## 110      123      282     610      641     16.8      644      982      982
## 210   627000   686000  523000   691000  1900000   899000  1900000  1850000
## 32    313000   513000  474000   423000   398000   713000   713000   355000
## 4    1810000  2300000 3260000  2920000  4620000  4390000  3870000  2460000
## 5      80700    81500   88800    81600    92600   105000   114000    80900
## 6      14900    16200   11000    16400    12900    14300    19600    15300
## 7       2830     2990    2830     4350     3030     3860     3880     4290
## 8   12400000 11300000 1.3e+07 13600000 11600000 19500000 14800000 17300000
## 9      87600    20500   23700    48700    43300   112000    43300    11400
## 10       876      855    2160      855      699     2000      656     3110
## 11     18800    46600   77200    11300    88800     7520    44300    30000
## 12      2030     1910    1980     2130     1320     2190     2430     1790
## 13       147      147     147     73.8      134      134      238      151
## 14   3200000  1910000 3860000  3210000   883000  1040000  2650000  1060000
## 15       328      264    30.8      264      279      540      810      850
## 16     0.615    0.615   0.356    0.615    0.215     1.23    0.504    0.923
## 17      2.29     3.72    3.68     1.69     41.4     23.5     36.3     23.8
## 18       585     1240    1230      900      947     1750      951      483
## 19      26.8      110     140      190      207      255     2.95      207
## 20      5830    13500    9840    12900    39200    39200    28600     8930
## 21     48900    79800   72700   116000   199000   239000   171000   182000
## 22     39100    37200   44700    44700    44100    48400    43600    48300
## 23       893     1200    1400     1140      223      555      328     1210
## 24       585     1240    1230      900      947     1750      951      483
## 25      26.8      110     140      190     2060     1260     2110     2210
## 26      5830    13500    9840    12900    39200    39200    28600     8930
## 27       374      674    52.5      104       83      613      409      589
## 28      <NA>     <NA>    <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 29      <NA>     <NA>    <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>    <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 31      <NA>     <NA>    <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
##         X2.5     X2.6     X2.7    X2.8     X2.9    X2.10     X3.1     X3.2
## 1          1        2        2       2        2        2        1        1
## 2          2        2        2       2        2        2        3        3
## 3       0.25     0.25     0.25    0.25     0.25     0.25      0.5      0.5
## 110     2.24      982      338     982     1650     3240     3940     1350
## 210  1130000  1900000  1290000 1540000  1060000  1610000  1900000  1900000
## 32    526000   570000   271000  522000   402000   504000   255000   546000
## 4    2790000  3250000  1790000 2990000  3310000  2810000  3580000  3310000
## 5      94500    73100    89400   78000    80500    86300    68400    90100
## 6      13800    13400    16200   12500    13400    15700     9020    10600
## 7       2720     4110     4400    2930     4930     4610     4210     2380
## 8   16300000 14500000 15700000 9900000 14300000 13400000 12100000 16100000
## 9      28400    43300    43300   43300    21900    43300    23600    23600
## 10      3110     2270     2270     342      451      614     1250      610
## 11     22500      620    16600   39300    17100     2220    90900     9580
## 12      1960     1870     1260    1680     1570     2080     1780      796
## 13      78.3      134      125     134     4.22      134      129      125
## 14    935000  1050000  1100000  960000  1200000   961000   742000  1240000
## 15       378      850      850     403      198      398      850      850
## 16     0.742    0.923     1.29    1.29    0.761     1.35     2.71     1.71
## 17      33.5     41.2     17.8    19.9     6.45     19.3       87     48.3
## 18      1400      944     1210    1200     1040     1230     1050     1160
## 19       255     13.9      207     207      255      255     78.6      124
## 20     22600    18600    11200   13300    13000    14300    39200    32300
## 21    104000    80300    71600   99600    85200   127000   136000   151000
## 22     48800    43300    45100   42900    49000    41200    47300    49700
## 23       155     1830      980    1290      943      889      924     1350
## 24      1400      944     1210    1200     1040     1230   742000  1240000
## 25       955     1010     2060    2210     1260     2160    23500    23600
## 26     22600    18600    11200   13300    13000    14300   136000   176000
## 27       822      574      211     736     70.8      826    23700    22600
## 28      <NA>     <NA>     <NA>    <NA>     <NA>     <NA>     <NA>     <NA>
## 29      <NA>     <NA>     <NA>    <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>    <NA>     <NA>     <NA>     <NA>     <NA>
## 31      <NA>     <NA>     <NA>    <NA>     <NA>     <NA>     <NA>     <NA>
##         X3.3    X3.4     X3.5     X3.6     X3.7    X3.8     X3.9    X3.10
## 1          1       1        1        2        2       2        2        2
## 2          3       3        3        3        3       3        3        3
## 3        0.5     0.5      0.5      0.5      0.5     0.5      0.5      0.5
## 110     3940    3940     3940     3940     3940    3940     1220     5320
## 210  1900000 1630000  1490000  1900000  1660000 1550000   776000  1900000
## 32    427000  297000   433000   377000   352000  496000   369000   455000
## 4    2970000 2250000  2550000  2700000  1780000 2970000  2890000  2590000
## 5      90100   84400    94200    60300    88500   81900    81000    89800
## 6      16500   15500    13500    11800    15100   15600    12900    15400
## 7       2340    3530     3720     3870     3280    2740     3390     4840
## 8   11500000 1.4e+07 14800000 13300000 13600000 9840000 12400000 13800000
## 9      23600   23600    23600    23600    23600   23600    20800    26400
## 10      1250    2400      577     1250     1250    1410     1000     1500
## 11     16900    8230    18900     2430     4500  103000     1050     3030
## 12      1520    1810     1600     1670     1020    1420     1090     2140
## 13       158     129     63.2      238      129    51.3      129      137
## 14   1710000  756000   544000   759000   560000  665000  1110000  2410000
## 15       850     850      847      850      563     850      850      850
## 16      2.71    2.71     2.71     2.71    0.845    2.71     2.71     2.61
## 17      40.7    33.5     45.6     65.6     71.5    54.1       54     50.1
## 18       699     831     1650      419     1190    1480     1670     1020
## 19       185     140      255      224     63.3     185      4.3      185
## 20     24300    7690    20100    14000     8200   16400    16700    10600
## 21    141000  129000    94000    55600    68500  104000    64900    98800
## 22     50400   51900    52500    52300    41900   46300    49500    43300
## 23      2440    1770      363     2260     2600    1260     1440     2160
## 24   1710000  756000   544000   759000   560000  665000  1110000  2410000
## 25     30200   17400    44600    18700    17300   28200    23000    24900
## 26    218000  197000   180000   174000   199000  191000   173000   205000
## 27     33300   35600    27900    26000    32600   34900    27200    33300
## 28      <NA>    <NA>     <NA>     <NA>     <NA>    <NA>     <NA>     <NA>
## 29      <NA>    <NA>     <NA>     <NA>     <NA>    <NA>     <NA>     <NA>
## 30      <NA>    <NA>     <NA>     <NA>     <NA>    <NA>     <NA>     <NA>
## 31      <NA>    <NA>     <NA>     <NA>     <NA>    <NA>     <NA>     <NA>
##         X4.1     X4.2    X4.3     X4.4     X4.5     X4.6     X4.7     X4.8
## 1          1        1       1        1        1        2        2        2
## 2          4        4       4        4        4        4        4        4
## 3          1        1       1        1        1        1        1        1
## 110      571      571     571      571      308      571      131      571
## 210  1360000  1600000 1340000   882000  1100000  1480000  1450000  1480000
## 32    173000   299000  326000   240000   215000   225000   221000   469000
## 4    2240000  2160000 2360000  1840000  1630000  1770000  1550000  3020000
## 5      73400    92100  109000    86800    81300    63400    67000    79000
## 6      11100    13300   15100    17300    11900    12400    11600    13200
## 7       2650     3450    2670     3280     4710     3010     4090     3070
## 8   11600000 17900000 1.2e+07 15300000 17700000 14600000 13300000 10900000
## 9      15000    15000   15000    15000    15000    15000    15000    15000
## 10      1680      462    1680      614      640      711     3110      553
## 11    103000     3890   31000    14500    51200    47000    10800    77400
## 12      1420     1800    1860     1610     1700     1890     1540      978
## 13       152      142     238      108     66.2      142     40.3      142
## 14   5570000  4810000 5570000  4760000  2110000  1090000  1780000  2180000
## 15       850      850     641      850      745      670      850      850
## 16      2.71     1.68    2.71     2.71     2.71     2.71     2.71     2.71
## 17      14.7     13.8    13.7     14.9     8.77     6.58     34.5     32.4
## 18      1100     1530    1090     1470      811      869     1510     1290
## 19       133      255     150      150      109      255      140     21.5
## 20     25500    24400   16600     8790    11300     3640    10100    17700
## 21    220000   202000  186000   189000    99500    78300    65700   111000
## 22     44200    50800   50800    48000    51900    49000    43900    44400
## 23       614     2220    2910     2910      158     2910     1710     1430
## 24   2930000  2980000 2780000  1170000  1230000  1010000  1040000  2240000
## 25     23200    22800   27900    22100    41500    17100    15400    28000
## 26    125000   201000  194000   185000   177000   173000   188000   178000
## 27     31900    29500   37600    34600    26400    31600    37100    36700
## 28      <NA>     <NA>    <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 29      <NA>     <NA>    <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>    <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 31      <NA>     <NA>    <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
##         X4.9    X4.10     X5.1     X5.2     X5.3     X5.4     X5.5    X5.6
## 1          2        2        1        1        1        1        1       2
## 2          4        4        5        5        5        5        5       5
## 3          1        1        2        2        2        2        2       2
## 110      235     1610      181      587     1170     17.4     1170    1170
## 210   617000  1330000   501000   458000   413000   337000   362000  288000
## 32    279000   236000   236000   313000   574000   302000   398000  269000
## 4    2320000  1760000  2450000  2030000  3250000  2190000  2430000 2040000
## 5      81100    73000    65100    70400    87400    68600    78700   45200
## 6      13500    13700     9340    10700    15200    15900    12300    9960
## 7       3320     2670     3630     2500     1760     2560     2810    1150
## 8   12700000 13700000 12900000 15900000 12700000 15700000 17400000 9800000
## 9      15000    15000   111000   111000   111000   111000   111000  111000
## 10      1680      450      377      421     1580     3110     2480    1440
## 11     40900    30600     1440     1650     1850     1140     1450    1220
## 12       886     1270      113      162      108      169       27    24.8
## 13       152      142       75       92      123       76  1150000      88
## 14   4740000  1060000    16900    12100    15400    15100    28300   11000
## 15       850      850      409      375     91.8      409       93     181
## 16      2.01     2.71     2.71     2.21     2.71     2.71     2.71    2.71
## 17        12     18.6     1.57     1.12     5.93     0.47     2.25    2.42
## 18      1280     1250     1090     1120     1430     1610      771     801
## 19      86.8      182      115     7.61    0.839      102     52.7     116
## 20      9520    10600    23700    14500    17200    10600    19100    9620
## 21     78900   119000   202000   190000   185000   194000   116000   55500
## 22     51700    47200    44200    51700    51700    51300    52400   52600
## 23      2040      841      517     1660     1590     1740      337     303
## 24   3090000  4280000    70700    33200    24100    14500    25900    1460
## 25     26000    21600     1440     1650     1850     1140     1450    1220
## 26    166000   198000      113      162      108      169       27    24.8
## 27     36300    43100  1780000  2930000  2930000   769000  1150000 3500000
## 28      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>    <NA>
## 29      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>    <NA>
## 30      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>    <NA>
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>    <NA>
##         X5.7     X5.8     X5.9    X5.10
## 1          2        2        2        2
## 2          5        5        5        5
## 3          2        2        2        2
## 110     1170     1170     1170     3900
## 210   294000   643000   377000   337000
## 32    242000   511000   214000   320000
## 4    1690000  2940000  1960000  1880000
## 5      77100    77700    73800    71100
## 6      13800    11300    11900    13400
## 7       2930     2840     2270     2130
## 8   12900000 13500000 11600000 15400000
## 9     111000   122000   111000    99700
## 10      2480     1470      591     2480
## 11      1450      935      908     1190
## 12      32.2      238      136      113
## 13       177       97       99      102
## 14     17400    43300    15800    15800
## 15       409      850      188      850
## 16      2.71     0.99     2.71     2.71
## 17      3.24     5.81     4.47     3.27
## 18      1470     1180      928     1020
## 19        98     73.1     73.1     92.4
## 20     12600    16600     8010     8550
## 21     79600   110000    79400   113000
## 22     43000    48300    50800    46800
## 23      2030     1440     1620      824
## 24     50300   103000     6590    26900
## 25      1450      935      908     1190
## 26      32.2      238      136      113
## 27   1770000  1520000   998000  2260000
## 28      <NA>     <NA>     <NA>     <NA>
## 29      <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>     <NA>
## 31      <NA>     <NA>     <NA>     <NA>

The p values:

p<-dif$p
p
##                                         [,1]         [,2]         [,3]
## glycolithocholic acid           0.0001194918 8.082684e-01 1.790408e-05
## fructose                        0.0984948479 1.007318e-05 7.965273e-07
## myristic acid                   0.5815884996 4.024950e-01 4.600790e-01
## n-octadecanoic acid             0.3074598184 1.213953e-01 7.680574e-01
## tryptophan                      0.0202897340 3.684567e-02 2.457435e-03
## phenylpyruvic acid              0.0251127544 1.178979e-02 2.273702e-03
## octanoyl-rac-glycerol           0.0260244164 4.654868e-01 5.919837e-02
## 1,2,3-propanetricarboxylic acid 0.1460157496 2.074242e-02 1.922077e-01
## 3-indolelactic acid             0.1123450519 6.350310e-02 1.309725e-03
##                                         [,4]         [,5]
## glycolithocholic acid           7.473468e-02 7.119534e-01
## fructose                        1.293703e-05 3.866770e-02
## myristic acid                   5.494115e-03 1.007495e-01
## n-octadecanoic acid             1.369011e-02 1.061509e-01
## tryptophan                      1.884732e-03 4.076133e-05
## phenylpyruvic acid              8.147760e-04 2.044026e-04
## octanoyl-rac-glycerol           1.721622e-02 6.383351e-05
## 1,2,3-propanetricarboxylic acid 6.119316e-02 7.879574e-02
## 3-indolelactic acid             4.042092e-04 2.215191e-03

The adjusted p values:

padj<-dif$p_adj
padj
##                                         [,1]         [,2]         [,3]
## glycolithocholic acid           0.0007681614 0.8082683735 2.014209e-04
## fructose                        0.1416789827 0.0001940554 3.584373e-05
## myristic acid                   0.6231305353 0.4644173386 5.109002e-01
## n-octadecanoic acid             0.3640971533 0.1560796964 7.855133e-01
## tryptophan                      0.0444480340 0.0690856278 7.372306e-03
## phenylpyruvic acid              0.0509173364 0.0312082673 7.308328e-03
## octanoyl-rac-glycerol           0.0509173364 0.5109001872 1.019886e-01
## 1,2,3-propanetricarboxylic acid 0.1825196870 0.0444480340 2.337661e-01
## 3-indolelactic acid             0.1486919805 0.1020585555 5.357964e-03
##                                         [,4]         [,5]
## glycolithocholic acid           0.1159676132 0.7450674653
## fructose                        0.0001940554 0.0696018547
## myristic acid                   0.0154521974 0.1416789827
## n-octadecanoic acid             0.0342252873 0.1447511932
## tryptophan                      0.0070677432 0.0003668520
## phenylpyruvic acid              0.0036664920 0.0011497647
## octanoyl-rac-glycerol           0.0407752660 0.0004787513
## 1,2,3-propanetricarboxylic acid 0.1019886063 0.1181936146
## 3-indolelactic acid             0.0020210459 0.0073083285

GetEndo

A function to get the altered endogenous metabolites by similarity analysis on the list of differential compounds and the list of pre-dose compounds:

 data("preData")
 data("A")
 data("design")
 data("simidata")
GetEndo(preData,A,simidata,sim=80,filepath=getwd(),design=FALSE)
##                                Name        ID      m.z   RT.min.     X0.1
## 1                            gender               <NA>      <NA>        1
## 2                             group               <NA>      <NA>        0
## 3                     timepoints(h)               <NA>      <NA>        0
## 7             octanoyl-rac-glycerol   inx0001 219.1401  3.563800     4180
## 28                   octadecanamide HMDB34146 284.2946  8.871300   119000
## 8   1,2,3-propanetricarboxylic acid HMDB31193  73.0000 15.657182 11000000
## 29               heptadecanoic acid HMDB02259 269.2477  9.555900    89700
## 30                  phosphoric acid HMDB02142  98.9846  4.382100     4440
## 5                        tryptophan HMDB00929 203.0819  1.352400    76200
## 4               n-octadecanoic acid HMDB00827 283.2634  9.952400  3250000
## 32                    myristic acid HMDB00806 227.2009  6.860767   578000
## 31              hyodeoxycholic acid HMDB00733 391.2842  3.574000    33500
## 110          glycolithocholic acid  HMDB00698 432.3107  3.420900      971
## 9               3-indolelactic acid HMDB00671 203.0000 21.233082    37100
## 210                        fructose HMDB00660 103.0000 16.349850   789000
## 6                phenylpyruvic acid HMDB00205 165.0545  3.521883    12600
##         X0.2     X0.3     X0.4     X0.5     X0.6     X0.7     X0.8
## 1          1        1        1        1        2        2        2
## 2          0        0        0        0        0        0        0
## 3          0        0        0        0        0        0        0
## 7       5080     4770     4080 2.74e+03     4990     4430     4150
## 28     99100   159000   264000 9.54e+04   361000   361000   267000
## 8   10100000 10900000 14500000 1.38e+07 13200000 11800000 12300000
## 29     89700    86800    42800 7.08e+04    68400    28100    34600
## 30      3690     3220     4320 4.07e+03     4440     5010     4290
## 5     101000   125000    96100 1.18e+05    87900   101000   115000
## 4    2860000  3110000  2160000 2.79e+06  3250000  1610000  2030000
## 32    570000   425000   289000 4.08e+05   603000   168000   346000
## 31      9930    22200    13300 2.57e+04     7800    24600    33500
## 110      971      971      971 5.09e+00      971      971      971
## 9      69200   123000    69200 9.88e+04    61100    44700    69200
## 210   471000   412000   520000 3.27e+05   603000   432000   558000
## 6      13600    20100    19100 1.93e+04    16300    19500    21000
##         X0.9    X0.10     X1.1     X1.2     X1.3     X1.4     X1.5
## 1          2        2        1        1        1        1        1
## 2          0        0        1        1        1        1        1
## 3          0        0    0.083    0.083    0.083    0.083    0.083
## 7       3540     3310 3.72e+03 1.62e+03 2.91e+03 4.73e+03 3.78e+03
## 28    282000   161000     <NA>     <NA>     <NA>     <NA>     <NA>
## 8   10400000 13400000 1.25e+07 1.63e+07 9.99e+06 1.54e+07 1.82e+07
## 29     72100    65200     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      2840     3330     <NA>     <NA>     <NA>     <NA>     <NA>
## 5     106000   105000 7.24e+04 9.80e+04 1.14e+05 9.10e+04 9.62e+04
## 4    2970000  2840000 4.40e+06 4.36e+06 4.23e+06 2.24e+06 2.42e+06
## 32    442000   587000 3.78e+05 7.13e+05 7.07e+05 3.12e+05 4.87e+05
## 31     20500     8550     <NA>     <NA>     <NA>     <NA>     <NA>
## 110      971      971 3.10e+01 4.79e+00 2.82e+02 2.82e+02 2.82e+02
## 9     100000    19500 3.73e+04 8.52e+04 4.87e+04 4.87e+04 3.79e+04
## 210   469000   637000 6.77e+05 5.22e+05 6.87e+05 2.88e+05 9.63e+05
## 6      17300    21900 1.04e+04 1.42e+04 1.96e+04 1.79e+04 1.35e+04
##         X1.6     X1.7     X1.8     X1.9    X1.10     X2.1     X2.2
## 1          2        2        2        2        2        1        1
## 2          1        1        1        1        1        2        2
## 3      0.083    0.083    0.083    0.083    0.083     0.25     0.25
## 7   1.90e+03 2.83e+03 2.99e+03 2.83e+03 4.35e+03 3.03e+03 3.86e+03
## 28      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 8   1.27e+07 1.24e+07 1.13e+07 1.30e+07 1.36e+07 1.16e+07 1.95e+07
## 29      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 5   6.97e+04 8.07e+04 8.15e+04 8.88e+04 8.16e+04 9.26e+04 1.05e+05
## 4   2.65e+06 1.81e+06 2.30e+06 3.26e+06 2.92e+06 4.40e+06 4.39e+06
## 32  4.55e+05 3.13e+05 5.13e+05 4.74e+05 4.23e+05 3.98e+05 7.13e+05
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 110 2.82e+02 1.23e+02 2.82e+02 6.10e+02 6.41e+02 1.68e+01 6.44e+02
## 9   4.87e+04 8.76e+04 2.05e+04 2.37e+04 4.87e+04 4.33e+04 1.12e+05
## 210 7.76e+05 6.27e+05 6.86e+05 5.23e+05 6.91e+05 1.90e+06 8.99e+05
## 6   1.41e+04 1.49e+04 1.62e+04 1.10e+04 1.64e+04 1.29e+04 1.43e+04
##         X2.3     X2.4     X2.5     X2.6     X2.7     X2.8     X2.9
## 1          1        1        1        2        2        2        2
## 2          2        2        2        2        2        2        2
## 3       0.25     0.25     0.25     0.25     0.25     0.25     0.25
## 7   3.88e+03 4.29e+03 2.72e+03 4.11e+03 4.40e+03 2.93e+03 4.93e+03
## 28      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 8   1.48e+07 1.73e+07 1.63e+07 1.45e+07 1.57e+07 9.90e+06 1.43e+07
## 29      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 5   1.14e+05 8.09e+04 9.45e+04 7.31e+04 8.94e+04 7.80e+04 8.05e+04
## 4   3.87e+06 2.46e+06 2.79e+06 3.25e+06 1.79e+06 2.99e+06 3.31e+06
## 32  7.13e+05 3.55e+05 5.26e+05 5.70e+05 2.71e+05 5.22e+05 4.02e+05
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 110 9.82e+02 9.82e+02 2.24e+00 9.82e+02 3.38e+02 9.82e+02 1.65e+03
## 9   4.33e+04 1.14e+04 2.84e+04 4.33e+04 4.33e+04 4.33e+04 2.19e+04
## 210 1.90e+06 1.85e+06 1.13e+06 1.90e+06 1.29e+06 1.54e+06 1.06e+06
## 6   1.96e+04 1.53e+04 1.38e+04 1.34e+04 1.62e+04 1.25e+04 1.34e+04
##        X2.10     X3.1     X3.2     X3.3     X3.4     X3.5     X3.6
## 1          2        1        1        1        1        1        2
## 2          2        3        3        3        3        3        3
## 3       0.25      0.5      0.5      0.5      0.5      0.5      0.5
## 7   4.61e+03 4.21e+03 2.38e+03 2.34e+03 3.53e+03 3.72e+03 3.87e+03
## 28      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 8   1.34e+07 1.21e+07 1.61e+07 1.15e+07 1.40e+07 1.48e+07 1.33e+07
## 29      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 5   8.63e+04 6.84e+04 9.01e+04 9.01e+04 8.44e+04 9.42e+04 6.03e+04
## 4   2.81e+06 3.58e+06 3.31e+06 2.97e+06 2.25e+06 2.55e+06 2.70e+06
## 32  5.04e+05 2.55e+05 5.46e+05 4.27e+05 2.97e+05 4.33e+05 3.77e+05
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 110 1.65e+03 1.65e+03 1.35e+03 1.65e+03 1.65e+03 1.65e+03 1.65e+03
## 9   4.33e+04 2.36e+04 2.36e+04 2.36e+04 2.36e+04 2.36e+04 2.36e+04
## 210 1.61e+06 1.90e+06 1.90e+06 1.90e+06 1.63e+06 1.49e+06 1.90e+06
## 6   1.57e+04 9.02e+03 1.06e+04 1.65e+04 1.55e+04 1.35e+04 1.18e+04
##         X3.7     X3.8     X3.9    X3.10     X4.1     X4.2     X4.3
## 1          2        2        2        2        1        1        1
## 2          3        3        3        3        4        4        4
## 3        0.5      0.5      0.5      0.5        1        1        1
## 7   3.28e+03 2.74e+03 3.39e+03 4.84e+03 2.65e+03 3.45e+03 2.67e+03
## 28      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 8   1.36e+07 9.84e+06 1.24e+07 1.38e+07 1.16e+07 1.79e+07 1.20e+07
## 29      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 5   8.85e+04 8.19e+04 8.10e+04 8.98e+04 7.34e+04 9.21e+04 1.09e+05
## 4   1.78e+06 2.97e+06 2.89e+06 2.59e+06 2.24e+06 2.16e+06 2.36e+06
## 32  3.52e+05 4.96e+05 3.69e+05 4.55e+05 1.73e+05 2.99e+05 3.26e+05
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 110 1.65e+03 1.65e+03 1.22e+03 1.65e+03 5.71e+02 5.71e+02 5.71e+02
## 9   2.36e+04 2.36e+04 2.08e+04 2.64e+04 1.50e+04 1.50e+04 1.50e+04
## 210 1.66e+06 1.55e+06 7.76e+05 1.90e+06 1.36e+06 1.60e+06 1.34e+06
## 6   1.51e+04 1.56e+04 1.29e+04 1.54e+04 1.11e+04 1.33e+04 1.51e+04
##         X4.4     X4.5     X4.6     X4.7     X4.8     X4.9    X4.10
## 1          1        1        2        2        2        2        2
## 2          4        4        4        4        4        4        4
## 3          1        1        1        1        1        1        1
## 7   3.28e+03 4.71e+03 3.01e+03 4.09e+03 3.07e+03 3.32e+03 2.67e+03
## 28      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 8   1.53e+07 1.77e+07 1.46e+07 1.33e+07 1.09e+07 1.27e+07 1.37e+07
## 29      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 5   8.68e+04 8.13e+04 6.34e+04 6.70e+04 7.90e+04 8.11e+04 7.30e+04
## 4   1.84e+06 1.63e+06 1.77e+06 1.55e+06 3.02e+06 2.32e+06 1.76e+06
## 32  2.40e+05 2.15e+05 2.25e+05 2.21e+05 4.69e+05 2.79e+05 2.36e+05
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 110 5.71e+02 3.08e+02 5.71e+02 1.31e+02 5.71e+02 2.35e+02 1.61e+03
## 9   1.50e+04 1.50e+04 1.50e+04 1.50e+04 1.50e+04 1.50e+04 1.50e+04
## 210 8.82e+05 1.10e+06 1.48e+06 1.45e+06 1.48e+06 6.17e+05 1.33e+06
## 6   1.73e+04 1.19e+04 1.24e+04 1.16e+04 1.32e+04 1.35e+04 1.37e+04
##         X5.1     X5.2     X5.3     X5.4     X5.5     X5.6     X5.7
## 1          1        1        1        1        1        2        2
## 2          5        5        5        5        5        5        5
## 3          2        2        2        2        2        2        2
## 7   3.63e+03 2.50e+03 1.76e+03 2.56e+03 2.81e+03 1.15e+03 2.93e+03
## 28      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 8   1.29e+07 1.59e+07 1.27e+07 1.57e+07 1.74e+07 9.80e+06 1.29e+07
## 29      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 5   6.51e+04 7.04e+04 8.74e+04 6.86e+04 7.87e+04 4.52e+04 7.71e+04
## 4   2.45e+06 2.03e+06 3.25e+06 2.19e+06 2.43e+06 2.04e+06 1.69e+06
## 32  2.36e+05 3.13e+05 5.74e+05 3.02e+05 3.98e+05 2.69e+05 2.42e+05
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 110 1.81e+02 5.87e+02 1.17e+03 1.74e+01 1.17e+03 1.17e+03 1.17e+03
## 9   1.11e+05 1.11e+05 1.11e+05 1.11e+05 1.11e+05 1.11e+05 1.11e+05
## 210 5.01e+05 4.58e+05 4.13e+05 3.37e+05 3.62e+05 2.88e+05 2.94e+05
## 6   9.34e+03 1.07e+04 1.52e+04 1.59e+04 1.23e+04 9.96e+03 1.38e+04
##         X5.8     X5.9    X5.10
## 1          2        2        2
## 2          5        5        5
## 3          2        2        2
## 7   2.84e+03 2.27e+03 2.13e+03
## 28      <NA>     <NA>     <NA>
## 8   1.35e+07 1.16e+07 1.54e+07
## 29      <NA>     <NA>     <NA>
## 30      <NA>     <NA>     <NA>
## 5   7.77e+04 7.38e+04 7.11e+04
## 4   2.94e+06 1.96e+06 1.88e+06
## 32  5.11e+05 2.14e+05 3.20e+05
## 31      <NA>     <NA>     <NA>
## 110 1.17e+03 1.17e+03 1.65e+03
## 9   1.22e+05 1.11e+05 9.97e+04
## 210 6.43e+05 3.77e+05 3.37e+05
## 6   1.13e+04 1.19e+04 1.34e+04

GetAbso

A function to get the absorbed drug constitutes by similarity analysis on the list of differential compounds and the list of drug constitutes:

GetAbso(drugData, A, simidata,sim = 80, filepath=getwd(),design = FALSE)
##                     Name        ID      m.z    RT.min.     X0.1     X0.2
## 1                 gender               <NA>       <NA>        1        1
## 2                  group               <NA>       <NA>        0        0
## 3          timepoints(h)               <NA>       <NA>        0        0
## 7  octanoyl-rac-glycerol   inx0001 219.1401   3.563800     4180     5080
## 16            liquiritin HMDB29520 417.1239  2.1398795     <NA>     <NA>
## 17          formononetin HMDB05808 267.0631  3.1570558     <NA>     <NA>
## 4    n-octadecanoic acid HMDB00827 283.2634   9.952400  3250000  2860000
## 32         myristic acid HMDB00806 227.2009   6.860767   578000   570000
## 6     phenylpyruvic acid HMDB00205 165.0545   3.521883    12600    13600
##        X0.3     X0.4     X0.5     X0.6     X0.7     X0.8     X0.9    X0.10
## 1         1        1        1        2        2        2        2        2
## 2         0        0        0        0        0        0        0        0
## 3         0        0        0        0        0        0        0        0
## 7      4770     4080 2.74e+03     4990     4430     4150     3540     3310
## 16     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 17     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 4   3110000  2160000 2.79e+06  3250000  1610000  2030000  2970000  2840000
## 32   425000   289000 4.08e+05   603000   168000   346000   442000   587000
## 6     20100    19100 1.93e+04    16300    19500    21000    17300    21900
##        X1.1     X1.2     X1.3     X1.4     X1.5     X1.6     X1.7     X1.8
## 1         1        1        1        1        1        2        2        2
## 2         1        1        1        1        1        1        1        1
## 3     0.083    0.083    0.083    0.083    0.083    0.083    0.083    0.083
## 7  3.72e+03 1.62e+03 2.91e+03 4.73e+03 3.78e+03 1.90e+03 2.83e+03 2.99e+03
## 16 6.15e-01 6.15e-01 6.18e-01 8.72e-01 6.15e-01 6.15e-01 6.15e-01 6.15e-01
## 17 1.50e+01 2.93e+00 5.09e+00 1.33e+00 1.38e+00 5.77e+00 2.29e+00 3.72e+00
## 4  4.40e+06 4.36e+06 4.23e+06 2.24e+06 2.42e+06 2.65e+06 1.81e+06 2.30e+06
## 32 3.78e+05 7.13e+05 7.07e+05 3.12e+05 4.87e+05 4.55e+05 3.13e+05 5.13e+05
## 6  1.04e+04 1.42e+04 1.96e+04 1.79e+04 1.35e+04 1.41e+04 1.49e+04 1.62e+04
##        X1.9    X1.10     X2.1     X2.2     X2.3     X2.4     X2.5     X2.6
## 1         2        2        1        1        1        1        1        2
## 2         1        1        2        2        2        2        2        2
## 3     0.083    0.083     0.25     0.25     0.25     0.25     0.25     0.25
## 7  2.83e+03 4.35e+03 3.03e+03 3.86e+03 3.88e+03 4.29e+03 2.72e+03 4.11e+03
## 16 3.56e-01 6.15e-01 2.15e-01 1.23e+00 5.04e-01 9.23e-01 7.42e-01 9.23e-01
## 17 3.68e+00 1.69e+00 4.14e+01 2.35e+01 3.63e+01 2.38e+01 3.35e+01 4.12e+01
## 4  3.26e+06 2.92e+06 4.40e+06 4.39e+06 3.87e+06 2.46e+06 2.79e+06 3.25e+06
## 32 4.74e+05 4.23e+05 3.98e+05 7.13e+05 7.13e+05 3.55e+05 5.26e+05 5.70e+05
## 6  1.10e+04 1.64e+04 1.29e+04 1.43e+04 1.96e+04 1.53e+04 1.38e+04 1.34e+04
##        X2.7     X2.8     X2.9    X2.10     X3.1     X3.2     X3.3     X3.4
## 1         2        2        2        2        1        1        1        1
## 2         2        2        2        2        3        3        3        3
## 3      0.25     0.25     0.25     0.25      0.5      0.5      0.5      0.5
## 7  4.40e+03 2.93e+03 4.93e+03 4.61e+03 4.21e+03 2.38e+03 2.34e+03 3.53e+03
## 16 1.29e+00 1.29e+00 7.61e-01 1.35e+00 2.71e+00 1.71e+00 2.71e+00 2.71e+00
## 17 1.78e+01 1.99e+01 6.45e+00 1.93e+01 7.15e+01 4.83e+01 4.07e+01 3.35e+01
## 4  1.79e+06 2.99e+06 3.31e+06 2.81e+06 3.58e+06 3.31e+06 2.97e+06 2.25e+06
## 32 2.71e+05 5.22e+05 4.02e+05 5.04e+05 2.55e+05 5.46e+05 4.27e+05 2.97e+05
## 6  1.62e+04 1.25e+04 1.34e+04 1.57e+04 9.02e+03 1.06e+04 1.65e+04 1.55e+04
##        X3.5     X3.6     X3.7     X3.8     X3.9    X3.10     X4.1     X4.2
## 1         1        2        2        2        2        2        1        1
## 2         3        3        3        3        3        3        4        4
## 3       0.5      0.5      0.5      0.5      0.5      0.5        1        1
## 7  3.72e+03 3.87e+03 3.28e+03 2.74e+03 3.39e+03 4.84e+03 2.65e+03 3.45e+03
## 16 2.71e+00 2.71e+00 8.45e-01 2.71e+00 2.71e+00 2.61e+00 2.71e+00 1.68e+00
## 17 4.56e+01 6.56e+01 7.15e+01 5.41e+01 5.40e+01 5.01e+01 1.47e+01 1.38e+01
## 4  2.55e+06 2.70e+06 1.78e+06 2.97e+06 2.89e+06 2.59e+06 2.24e+06 2.16e+06
## 32 4.33e+05 3.77e+05 3.52e+05 4.96e+05 3.69e+05 4.55e+05 1.73e+05 2.99e+05
## 6  1.35e+04 1.18e+04 1.51e+04 1.56e+04 1.29e+04 1.54e+04 1.11e+04 1.33e+04
##        X4.3     X4.4     X4.5     X4.6     X4.7     X4.8     X4.9    X4.10
## 1         1        1        1        2        2        2        2        2
## 2         4        4        4        4        4        4        4        4
## 3         1        1        1        1        1        1        1        1
## 7  2.67e+03 3.28e+03 4.71e+03 3.01e+03 4.09e+03 3.07e+03 3.32e+03 2.67e+03
## 16 2.71e+00 2.71e+00 2.71e+00 2.71e+00 2.71e+00 2.71e+00 2.01e+00 2.71e+00
## 17 1.37e+01 1.49e+01 8.77e+00 6.58e+00 3.45e+01 3.24e+01 1.20e+01 1.86e+01
## 4  2.36e+06 1.84e+06 1.63e+06 1.77e+06 1.55e+06 3.02e+06 2.32e+06 1.76e+06
## 32 3.26e+05 2.40e+05 2.15e+05 2.25e+05 2.21e+05 4.69e+05 2.79e+05 2.36e+05
## 6  1.51e+04 1.73e+04 1.19e+04 1.24e+04 1.16e+04 1.32e+04 1.35e+04 1.37e+04
##        X5.1     X5.2     X5.3     X5.4     X5.5     X5.6     X5.7     X5.8
## 1         1        1        1        1        1        2        2        2
## 2         5        5        5        5        5        5        5        5
## 3         2        2        2        2        2        2        2        2
## 7  3.63e+03 2.50e+03 1.76e+03 2.56e+03 2.81e+03 1.15e+03 2.93e+03 2.84e+03
## 16 2.71e+00 2.21e+00 2.71e+00 2.71e+00 2.71e+00 2.71e+00 2.71e+00 9.90e-01
## 17 1.57e+00 1.12e+00 5.93e+00 4.70e-01 2.25e+00 2.42e+00 3.24e+00 5.81e+00
## 4  2.45e+06 2.03e+06 3.25e+06 2.19e+06 2.43e+06 2.04e+06 1.69e+06 2.94e+06
## 32 2.36e+05 3.13e+05 5.74e+05 3.02e+05 3.98e+05 2.69e+05 2.42e+05 5.11e+05
## 6  9.34e+03 1.07e+04 1.52e+04 1.59e+04 1.23e+04 9.96e+03 1.38e+04 1.13e+04
##        X5.9    X5.10
## 1         2        2
## 2         5        5
## 3         2        2
## 7  2.27e+03 2.13e+03
## 16 2.71e+00 2.71e+00
## 17 4.47e+00 3.27e+00
## 4  1.96e+06 1.88e+06
## 32 2.14e+05 3.20e+05
## 6  1.19e+04 1.34e+04

GetSecdAbso

A function to get secondary metabolites of the absorbed drug constitutes:

GetSecdAbso(A,B,C,simidata,sim=80,filepath=getwd(),design=FALSE)
##                                Name        ID      m.z    RT.min.     X0.1
## 1                            gender               <NA>       <NA>        1
## 2                             group               <NA>       <NA>        0
## 3                     timepoints(h)               <NA>       <NA>        0
## 10         formononetin glucuronide HMDB41735 445.1206 10.2335500     <NA>
## 11                      gancaonin V HMDB37586 311.1301  2.2231667     <NA>
## 12                    isoquercitrin HMDB37362 463.0988  2.0986452     <NA>
## 13                   ceanothic acid HMDB36851 485.3250  3.4732833     <NA>
## 14                 ganoderic acid H HMDB35987 571.2883  3.5425833     <NA>
## 15                  isoformononetin HMDB33994 269.0809  2.4982167     <NA>
## 8   1,2,3-propanetricarboxylic acid HMDB31193  73.0000  15.657182 11000000
## 5                        tryptophan HMDB00929 203.0819   1.352400    76200
## 18                     trigonelline HMDB00875 136.0404  2.5085333     <NA>
## 19                        histamine HMDB00870 112.0763  0.7084167     <NA>
## 20                    phytanic acid HMDB00801 311.2948 10.8229833     <NA>
## 31              hyodeoxycholic acid HMDB00733 391.2842   3.574000    33500
## 110          glycolithocholic acid  HMDB00698 432.3107   3.420900      971
## 21              cholesterol sulfate HMDB00653 465.3041  6.6551167     <NA>
## 22                         cytosine HMDB00630 110.0349  9.7993333     <NA>
## 23                  erythronic acid HMDB00613 135.0293  0.5236500     <NA>
## 24            chenodeoxycholic acid HMDB00518 391.2845  3.9222000     <NA>
## 25              2-aminobutyric acid HMDB00452 104.0545  0.7084167     <NA>
## 26             2-pyrocatechuic acid HMDB00397 153.0187  2.4666167     <NA>
## 27                             urea HMDB00294 100.0000  7.1697798     <NA>
##         X0.2     X0.3     X0.4     X0.5     X0.6     X0.7     X0.8
## 1          1        1        1        1        2        2        2
## 2          0        0        0        0        0        0        0
## 3          0        0        0        0        0        0        0
## 10      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 11      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 12      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 13      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 14      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 15      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 8   10100000 10900000 14500000 1.38e+07 13200000 11800000 12300000
## 5     101000   125000    96100 1.18e+05    87900   101000   115000
## 18      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 19      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 20      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 31      9930    22200    13300 2.57e+04     7800    24600    33500
## 110      971      971      971 5.09e+00      971      971      971
## 21      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 22      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 23      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 24      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 25      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 26      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 27      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
##         X0.9    X0.10     X1.1     X1.2     X1.3     X1.4     X1.5
## 1          2        2        1        1        1        1        1
## 2          0        0        1        1        1        1        1
## 3          0        0    0.083    0.083    0.083    0.083    0.083
## 10      <NA>     <NA> 8.55e+02 7.07e+02 8.55e+02 1.76e+02 3.57e+02
## 11      <NA>     <NA> 8.76e+04 8.54e+03 3.52e+04 3.11e+04 2.95e+04
## 12      <NA>     <NA> 2.17e+03 2.68e+03 2.28e+03 2.71e+03 2.25e+03
## 13      <NA>     <NA> 3.12e+00 1.47e+02 1.77e+02 1.77e+02 1.47e+02
## 14      <NA>     <NA> 3.27e+06 4.61e+06 2.24e+06 3.41e+06 2.83e+06
## 15      <NA>     <NA> 3.90e+02 7.76e+02 1.60e+02 1.37e+02 2.29e+02
## 8   10400000 13400000 1.25e+07 1.63e+07 9.99e+06 1.54e+07 1.82e+07
## 5     106000   105000 7.24e+04 9.80e+04 1.14e+05 9.10e+04 9.62e+04
## 18      <NA>     <NA> 9.69e+02 1.03e+03 1.41e+03 1.31e+03 1.76e+03
## 19      <NA>     <NA> 4.82e-01 1.98e+02 1.10e+02 1.88e+01 1.10e+02
## 20      <NA>     <NA> 3.92e+04 3.92e+04 2.50e+04 5.45e+03 2.11e+04
## 31     20500     8550     <NA>     <NA>     <NA>     <NA>     <NA>
## 110      971      971 3.10e+01 4.79e+00 2.82e+02 2.82e+02 2.82e+02
## 21      <NA>     <NA> 1.30e+05 1.75e+05 1.61e+05 1.46e+05 8.07e+04
## 22      <NA>     <NA> 4.63e+04 4.45e+04 4.23e+04 3.75e+04 3.98e+04
## 23      <NA>     <NA> 2.03e+02 7.88e+02 2.11e+03 1.58e+03 1.31e+03
## 24      <NA>     <NA> 9.69e+02 1.03e+03 1.41e+03 1.31e+03 1.76e+03
## 25      <NA>     <NA> 4.82e-01 1.98e+02 1.10e+02 1.88e+01 1.10e+02
## 26      <NA>     <NA> 3.92e+04 3.92e+04 2.50e+04 5.45e+03 2.11e+04
## 27      <NA>     <NA> 8.89e+02 4.24e+02 5.17e+02 8.45e+02 5.30e+02
##         X1.6     X1.7     X1.8     X1.9    X1.10     X2.1     X2.2
## 1          2        2        2        2        2        1        1
## 2          1        1        1        1        1        2        2
## 3      0.083    0.083    0.083    0.083    0.083     0.25     0.25
## 10  8.55e+02 8.76e+02 8.55e+02 2.16e+03 8.55e+02 6.99e+02 2.00e+03
## 11  3.76e+03 1.88e+04 4.66e+04 7.72e+04 1.13e+04 8.88e+04 7.52e+03
## 12  2.25e+03 2.03e+03 1.91e+03 1.98e+03 2.13e+03 1.32e+03 2.19e+03
## 13  8.88e+01 1.47e+02 1.47e+02 1.47e+02 7.38e+01 1.34e+02 1.34e+02
## 14  3.59e+06 3.20e+06 1.91e+06 3.86e+06 3.21e+06 8.83e+05 1.04e+06
## 15  5.76e+01 3.28e+02 2.64e+02 3.08e+01 2.64e+02 2.79e+02 5.40e+02
## 8   1.27e+07 1.24e+07 1.13e+07 1.30e+07 1.36e+07 1.16e+07 1.95e+07
## 5   6.97e+04 8.07e+04 8.15e+04 8.88e+04 8.16e+04 9.26e+04 1.05e+05
## 18  1.07e+03 5.85e+02 1.24e+03 1.23e+03 9.00e+02 9.47e+02 1.75e+03
## 19  1.98e+02 2.68e+01 1.10e+02 1.40e+02 1.90e+02 2.07e+02 2.55e+02
## 20  1.27e+04 5.83e+03 1.35e+04 9.84e+03 1.29e+04 3.92e+04 3.92e+04
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 110 2.82e+02 1.23e+02 2.82e+02 6.10e+02 6.41e+02 1.68e+01 6.44e+02
## 21  5.02e+04 4.89e+04 7.98e+04 7.27e+04 1.16e+05 1.99e+05 2.39e+05
## 22  4.22e+04 3.91e+04 3.72e+04 4.47e+04 4.47e+04 4.41e+04 4.84e+04
## 23  2.50e+03 8.93e+02 1.20e+03 1.40e+03 1.14e+03 2.23e+02 5.55e+02
## 24  1.07e+03 5.85e+02 1.24e+03 1.23e+03 9.00e+02 9.47e+02 1.75e+03
## 25  1.98e+02 2.68e+01 1.10e+02 1.40e+02 1.90e+02 2.06e+03 1.26e+03
## 26  1.27e+04 5.83e+03 1.35e+04 9.84e+03 1.29e+04 3.92e+04 3.92e+04
## 27  7.57e+02 3.74e+02 6.74e+02 5.25e+01 1.04e+02 8.30e+01 6.13e+02
##         X2.3     X2.4     X2.5     X2.6     X2.7     X2.8     X2.9
## 1          1        1        1        2        2        2        2
## 2          2        2        2        2        2        2        2
## 3       0.25     0.25     0.25     0.25     0.25     0.25     0.25
## 10  6.56e+02 3.11e+03 3.11e+03 2.27e+03 2.27e+03 3.42e+02 4.51e+02
## 11  4.43e+04 3.00e+04 2.25e+04 6.20e+02 1.66e+04 3.93e+04 1.71e+04
## 12  2.43e+03 1.79e+03 1.96e+03 1.87e+03 1.26e+03 1.68e+03 1.57e+03
## 13  1.77e+02 1.51e+02 7.83e+01 1.34e+02 1.25e+02 1.34e+02 4.22e+00
## 14  2.65e+06 1.06e+06 9.35e+05 1.05e+06 1.10e+06 9.60e+05 1.20e+06
## 15  8.10e+02 8.50e+02 3.78e+02 8.50e+02 8.50e+02 4.03e+02 1.98e+02
## 8   1.48e+07 1.73e+07 1.63e+07 1.45e+07 1.57e+07 9.90e+06 1.43e+07
## 5   1.14e+05 8.09e+04 9.45e+04 7.31e+04 8.94e+04 7.80e+04 8.05e+04
## 18  9.51e+02 4.83e+02 1.40e+03 9.44e+02 1.21e+03 1.20e+03 1.04e+03
## 19  2.95e+00 2.07e+02 2.55e+02 1.39e+01 2.07e+02 2.07e+02 2.55e+02
## 20  2.86e+04 8.93e+03 2.26e+04 1.86e+04 1.12e+04 1.33e+04 1.30e+04
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 110 9.82e+02 9.82e+02 2.24e+00 9.82e+02 3.38e+02 9.82e+02 1.65e+03
## 21  1.71e+05 1.82e+05 1.04e+05 8.03e+04 7.16e+04 9.96e+04 8.52e+04
## 22  4.36e+04 4.83e+04 4.88e+04 4.33e+04 4.51e+04 4.29e+04 4.90e+04
## 23  3.28e+02 1.21e+03 1.55e+02 1.83e+03 9.80e+02 1.29e+03 9.43e+02
## 24  9.51e+02 4.83e+02 1.40e+03 9.44e+02 1.21e+03 1.20e+03 1.04e+03
## 25  2.11e+03 2.21e+03 9.55e+02 1.01e+03 2.06e+03 2.21e+03 1.26e+03
## 26  2.86e+04 8.93e+03 2.26e+04 1.86e+04 1.12e+04 1.33e+04 1.30e+04
## 27  4.09e+02 5.89e+02 8.22e+02 5.74e+02 2.11e+02 7.36e+02 7.08e+01
##        X2.10     X3.1     X3.2     X3.3     X3.4     X3.5     X3.6
## 1          2        1        1        1        1        1        2
## 2          2        3        3        3        3        3        3
## 3       0.25      0.5      0.5      0.5      0.5      0.5      0.5
## 10  6.14e+02 1.25e+03 6.10e+02 1.25e+03 2.40e+03 5.77e+02 1.25e+03
## 11  2.22e+03 9.09e+04 9.58e+03 1.69e+04 8.23e+03 1.89e+04 2.43e+03
## 12  2.08e+03 1.78e+03 7.96e+02 1.52e+03 1.81e+03 1.60e+03 1.67e+03
## 13  1.34e+02 1.29e+02 1.25e+02 1.58e+02 1.29e+02 6.32e+01 1.77e+02
## 14  9.61e+05 7.42e+05 1.24e+06 1.71e+06 7.56e+05 5.44e+05 7.59e+05
## 15  3.98e+02 8.50e+02 8.50e+02 8.50e+02 8.50e+02 8.47e+02 8.50e+02
## 8   1.34e+07 1.21e+07 1.61e+07 1.15e+07 1.40e+07 1.48e+07 1.33e+07
## 5   8.63e+04 6.84e+04 9.01e+04 9.01e+04 8.44e+04 9.42e+04 6.03e+04
## 18  1.23e+03 1.05e+03 1.16e+03 6.99e+02 8.31e+02 1.65e+03 4.19e+02
## 19  2.55e+02 7.86e+01 1.24e+02 1.85e+02 1.40e+02 2.55e+02 2.24e+02
## 20  1.43e+04 3.92e+04 3.23e+04 2.43e+04 7.69e+03 2.01e+04 1.40e+04
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 110 1.65e+03 1.65e+03 1.35e+03 1.65e+03 1.65e+03 1.65e+03 1.65e+03
## 21  1.27e+05 1.36e+05 1.51e+05 1.41e+05 1.29e+05 9.40e+04 5.56e+04
## 22  4.12e+04 4.73e+04 4.97e+04 5.04e+04 5.19e+04 5.25e+04 5.23e+04
## 23  8.89e+02 9.24e+02 1.35e+03 2.44e+03 1.77e+03 3.63e+02 2.26e+03
## 24  1.23e+03 7.42e+05 1.24e+06 1.71e+06 7.56e+05 5.44e+05 7.59e+05
## 25  2.16e+03 2.35e+04 2.36e+04 3.02e+04 1.74e+04 4.46e+04 1.87e+04
## 26  1.43e+04 1.36e+05 1.76e+05 2.18e+05 1.97e+05 1.80e+05 1.74e+05
## 27  8.26e+02 2.37e+04 2.26e+04 3.33e+04 3.56e+04 2.79e+04 2.60e+04
##         X3.7     X3.8     X3.9    X3.10     X4.1     X4.2     X4.3
## 1          2        2        2        2        1        1        1
## 2          3        3        3        3        4        4        4
## 3        0.5      0.5      0.5      0.5        1        1        1
## 10  1.25e+03 1.41e+03 1.00e+03 1.50e+03 1.68e+03 4.62e+02 1.68e+03
## 11  4.50e+03 9.09e+04 1.05e+03 3.03e+03 9.09e+04 3.89e+03 3.10e+04
## 12  1.02e+03 1.42e+03 1.09e+03 2.14e+03 1.42e+03 1.80e+03 1.86e+03
## 13  1.29e+02 5.13e+01 1.29e+02 1.37e+02 1.52e+02 1.42e+02 1.77e+02
## 14  5.60e+05 6.65e+05 1.11e+06 2.41e+06 5.57e+06 4.81e+06 5.57e+06
## 15  5.63e+02 8.50e+02 8.50e+02 8.50e+02 8.50e+02 8.50e+02 6.41e+02
## 8   1.36e+07 9.84e+06 1.24e+07 1.38e+07 1.16e+07 1.79e+07 1.20e+07
## 5   8.85e+04 8.19e+04 8.10e+04 8.98e+04 7.34e+04 9.21e+04 1.09e+05
## 18  1.19e+03 1.48e+03 1.67e+03 1.02e+03 1.10e+03 1.53e+03 1.09e+03
## 19  6.33e+01 1.85e+02 4.30e+00 1.85e+02 1.33e+02 2.55e+02 1.50e+02
## 20  8.20e+03 1.64e+04 1.67e+04 1.06e+04 2.55e+04 2.44e+04 1.66e+04
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 110 1.65e+03 1.65e+03 1.22e+03 1.65e+03 5.71e+02 5.71e+02 5.71e+02
## 21  6.85e+04 1.04e+05 6.49e+04 9.88e+04 2.20e+05 2.02e+05 1.86e+05
## 22  4.19e+04 4.63e+04 4.95e+04 4.33e+04 4.42e+04 5.08e+04 5.08e+04
## 23  2.60e+03 1.26e+03 1.44e+03 2.16e+03 6.14e+02 2.22e+03 2.91e+03
## 24  5.60e+05 6.65e+05 1.11e+06 2.41e+06 2.41e+06 2.41e+06 2.41e+06
## 25  1.73e+04 2.82e+04 2.30e+04 2.49e+04 2.32e+04 2.28e+04 2.79e+04
## 26  1.99e+05 1.91e+05 1.73e+05 2.05e+05 1.25e+05 2.01e+05 1.94e+05
## 27  3.26e+04 3.49e+04 2.72e+04 3.33e+04 3.19e+04 2.95e+04 3.76e+04
##         X4.4     X4.5     X4.6     X4.7     X4.8     X4.9    X4.10
## 1          1        1        2        2        2        2        2
## 2          4        4        4        4        4        4        4
## 3          1        1        1        1        1        1        1
## 10  6.14e+02 6.40e+02 7.11e+02 3.11e+03 5.53e+02 1.68e+03 4.50e+02
## 11  1.45e+04 5.12e+04 4.70e+04 1.08e+04 7.74e+04 4.09e+04 3.06e+04
## 12  1.61e+03 1.70e+03 1.89e+03 1.54e+03 9.78e+02 8.86e+02 1.27e+03
## 13  1.08e+02 6.62e+01 1.42e+02 4.03e+01 1.42e+02 1.52e+02 1.42e+02
## 14  4.76e+06 2.11e+06 1.09e+06 1.78e+06 2.18e+06 4.74e+06 1.06e+06
## 15  8.50e+02 7.45e+02 6.70e+02 8.50e+02 8.50e+02 8.50e+02 8.50e+02
## 8   1.53e+07 1.77e+07 1.46e+07 1.33e+07 1.09e+07 1.27e+07 1.37e+07
## 5   8.68e+04 8.13e+04 6.34e+04 6.70e+04 7.90e+04 8.11e+04 7.30e+04
## 18  1.47e+03 8.11e+02 8.69e+02 1.51e+03 1.29e+03 1.28e+03 1.25e+03
## 19  1.50e+02 1.09e+02 2.55e+02 1.40e+02 2.15e+01 8.68e+01 1.82e+02
## 20  8.79e+03 1.13e+04 3.64e+03 1.01e+04 1.77e+04 9.52e+03 1.06e+04
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 110 5.71e+02 3.08e+02 5.71e+02 1.31e+02 5.71e+02 2.35e+02 1.61e+03
## 21  1.89e+05 9.95e+04 7.83e+04 6.57e+04 1.11e+05 7.89e+04 1.19e+05
## 22  4.80e+04 5.19e+04 4.90e+04 4.39e+04 4.44e+04 5.17e+04 4.72e+04
## 23  2.91e+03 1.58e+02 2.91e+03 1.71e+03 1.43e+03 2.04e+03 8.41e+02
## 24  1.17e+06 1.23e+06 1.01e+06 1.04e+06 2.24e+06 2.41e+06 2.41e+06
## 25  2.21e+04 4.15e+04 1.71e+04 1.54e+04 2.80e+04 2.60e+04 2.16e+04
## 26  1.85e+05 1.77e+05 1.73e+05 1.88e+05 1.78e+05 1.66e+05 1.98e+05
## 27  3.46e+04 2.64e+04 3.16e+04 3.71e+04 3.67e+04 3.63e+04 4.31e+04
##         X5.1     X5.2     X5.3     X5.4     X5.5     X5.6     X5.7
## 1          1        1        1        1        1        2        2
## 2          5        5        5        5        5        5        5
## 3          2        2        2        2        2        2        2
## 10  3.77e+02 4.21e+02 1.58e+03 3.11e+03 2.48e+03 1.44e+03 2.48e+03
## 11  1.44e+03 1.65e+03 1.85e+03 1.14e+03 1.45e+03 1.22e+03 1.45e+03
## 12  1.13e+02 1.62e+02 1.08e+02 1.69e+02 2.70e+01 2.48e+01 3.22e+01
## 13  7.50e+01 9.20e+01 1.23e+02 7.60e+01 1.77e+02 8.80e+01 1.77e+02
## 14  1.69e+04 1.21e+04 1.54e+04 1.51e+04 2.83e+04 1.10e+04 1.74e+04
## 15  4.09e+02 3.75e+02 9.18e+01 4.09e+02 9.30e+01 1.81e+02 4.09e+02
## 8   1.29e+07 1.59e+07 1.27e+07 1.57e+07 1.74e+07 9.80e+06 1.29e+07
## 5   6.51e+04 7.04e+04 8.74e+04 6.86e+04 7.87e+04 4.52e+04 7.71e+04
## 18  1.09e+03 1.12e+03 1.43e+03 1.61e+03 7.71e+02 8.01e+02 1.47e+03
## 19  1.15e+02 7.61e+00 8.39e-01 1.02e+02 5.27e+01 1.16e+02 9.80e+01
## 20  2.37e+04 1.45e+04 1.72e+04 1.06e+04 1.91e+04 9.62e+03 1.26e+04
## 31      <NA>     <NA>     <NA>     <NA>     <NA>     <NA>     <NA>
## 110 1.81e+02 5.87e+02 1.17e+03 1.74e+01 1.17e+03 1.17e+03 1.17e+03
## 21  2.02e+05 1.90e+05 1.85e+05 1.94e+05 1.16e+05 5.55e+04 7.96e+04
## 22  4.42e+04 5.17e+04 5.17e+04 5.13e+04 5.24e+04 5.26e+04 4.30e+04
## 23  5.17e+02 1.66e+03 1.59e+03 1.74e+03 3.37e+02 3.03e+02 2.03e+03
## 24  7.07e+04 3.32e+04 2.41e+04 1.45e+04 2.59e+04 1.46e+03 5.03e+04
## 25  1.44e+03 1.65e+03 1.85e+03 1.14e+03 1.45e+03 1.22e+03 1.45e+03
## 26  1.13e+02 1.62e+02 1.08e+02 1.69e+02 2.70e+01 2.48e+01 3.22e+01
## 27  4.31e+04 4.31e+04 4.31e+04 4.31e+04 4.31e+04 4.31e+04 4.31e+04
##         X5.8     X5.9    X5.10
## 1          2        2        2
## 2          5        5        5
## 3          2        2        2
## 10  1.47e+03 5.91e+02 2.48e+03
## 11  9.35e+02 9.08e+02 1.19e+03
## 12  2.38e+02 1.36e+02 1.13e+02
## 13  9.70e+01 9.90e+01 1.02e+02
## 14  4.33e+04 1.58e+04 1.58e+04
## 15  8.50e+02 1.88e+02 8.50e+02
## 8   1.35e+07 1.16e+07 1.54e+07
## 5   7.77e+04 7.38e+04 7.11e+04
## 18  1.18e+03 9.28e+02 1.02e+03
## 19  7.31e+01 7.31e+01 9.24e+01
## 20  1.66e+04 8.01e+03 8.55e+03
## 31      <NA>     <NA>     <NA>
## 110 1.17e+03 1.17e+03 1.65e+03
## 21  1.10e+05 7.94e+04 1.13e+05
## 22  4.83e+04 5.08e+04 4.68e+04
## 23  1.44e+03 1.62e+03 8.24e+02
## 24  1.03e+05 6.59e+03 2.69e+04
## 25  9.35e+02 9.08e+02 1.19e+03
## 26  2.38e+02 1.36e+02 1.13e+02
## 27  4.31e+04 4.31e+04 4.31e+04

PKs

A function to calculate the 7 pharmacokinetics parameters (Tmax, Cmax, AUC, CL, Tlast, Tfirst, Cmin) and plot the time-intensity curves for specified compounds.

A list of metabolites and 7 pharmacokinetics parameters (Tmax,Cmax,AUC,CL,Tlast,Tfirst,Cmin) of specified compound:

data("C")
data("design")
pks<-PKs(C,d.point="mean",d.ebar="SE",filepath=getwd(),design=FALSE)
knitr::kable(pks[c(1:10),],align = 'c')
Name ID m.z R.T.min. Tmax Tlast Tfirst Cmax Cmin AUC CL
7 octanoyl-rac-glycerol inx0001 219.1401 3.563800 0.00 2 0 4.127e+03 2458 6.359417e+03 0
16 liquiritin HMDB29520 417.1239 2.1398795 1.00 2 0 2.537e+00 0 4.321104e+00 NA
17 formononetin HMDB05808 267.0631 3.1570558 0.50 2 0 5.349e+01 0 4.035518e+01 NA
4 n-octadecanoic acid HMDB00827 283.2634 9.952400 0.25 2 0 3.206e+06 2065000 4.888712e+06 0
6 phenylpyruvic acid HMDB00205 165.0545 3.521883 0.00 2 0 1.807e+04 12380 2.693894e+04 0
NA NA NA NA NA NA NA NA NA NA NA NA
NA.1 NA NA NA NA NA NA NA NA NA NA NA
NA.2 NA NA NA NA NA NA NA NA NA NA NA
NA.3 NA NA NA NA NA NA NA NA NA NA NA
NA.4 NA NA NA NA NA NA NA NA NA NA NA

The time-intensity curves for specified compounds are in the folder named “PKs” which is created automatically.

CorrPlot

A function to calculate the correlation coefficients and plot the correlation diagram (8 types) of two input datasets.

data("B")
data("C")
CorrPlot(dataset1=B,dataset2=C,cor.method="pearson",filepath=getwd(),fig.form="heatmap",design = FALSE)

ScatPlot

A function to plot the PCA or PLSDA score figures and trajectories on input data:

data("A")
ScatPlot(scat.data=A,scform="PCA",num.of.cp=2,filepath=getwd(),design=FALSE)

HeatMap

A function to plot the heatmap and clusters of input data:

data("A")
HeatMap(data=A,cluster="both",scale="row",filepath=getwd(),design=FALSE)
help(package = 'polyPK', help_type = 'html')
# or see a standalone list of vignettes
browseVignettes('polyPK')