annotate NmrNormalization_script.R @ 0:e1b29d705286 draft

planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
author marie-tremblay-metatoul
date Mon, 18 Apr 2016 11:29:30 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
1 #################################################################################################################
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
2 # SPECTRA NORMALIZATION FROM BUCKETED AND INTEGRATED SPECTRA #
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
3 # User : Galaxy #
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
4 # Original data : -- #
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
5 # Starting date : 20-10-2014 #
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
6 # Version 1 : 27-01-2015 #
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
7 # Version 2 : 27-02-2015 #
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
8 # #
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
9 # Input files: #
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
10 # - Data matrix containing bucketed and integrated spectra to normalize #
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
11 # - Sample metadata matrix containing at least biological factor of interest #
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
12 # - Scaling method: Total intensity/Probabilistic Quotient Normalization #
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
13 # - Control group: name of control to compute median reference spectra #
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
14 # - Graph: normalization result representation #
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
15 #################################################################################################################
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
16 NmrNormalization <- function(dataMatrix,scalingMethod=c("None","Total","PQN","BioFactor"),sampleMetadata=NULL,
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
17 bioFactor=NULL,ControlGroup=NULL,graph=c("None","Overlay","One_per_individual"),
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
18 nomFichier=NULL,savLog.txtC=NULL)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
19 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
20
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
21 ## Option
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
22 ##---------------
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
23 strAsFacL <- options()$stringsAsFactors
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
24 options(stingsAsFactors = FALSE)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
25 options(warn = -1)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
26
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
27
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
28 ## Constants
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
29 ##---------------
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
30 topEnvC <- environment()
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
31 flgC <- "\n"
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
32
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
33 ## Log file (in case of integration into Galaxy)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
34 ##----------------------------------------------
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
35 if(!is.null(savLog.txtC))
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
36 sink(savLog.txtC, append = TRUE)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
37
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
38 ## Functions definition
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
39 ##---------------------
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
40 #################################################################################################################
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
41 # Total intensity normalization
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
42 # Input parameters
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
43 # - data : bucketed spectra (rows=buckets; columns=samples)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
44 #################################################################################################################
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
45 NmrBrucker_total <- function(data)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
46 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
47 # Total intensity normalization
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
48 data.total <- apply(data,2,sum)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
49 data.normalized <- data[,1]/data.total[1]
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
50 for (i in 2:ncol(data))
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
51 data.normalized <- cbind(data.normalized,data[,i]/data.total[i])
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
52 colnames(data.normalized) <- colnames(data)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
53 rownames(data.normalized) <- rownames(data)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
54 return(data.normalized)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
55 }
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
56
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
57
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
58 #################################################################################################################
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
59 # Biological factor normalization
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
60 # Input parameters
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
61 # - data : bucketed spectra (rows=buckets; columns=samples)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
62 # - sampleMetadata : dataframe with biological factor of interest measured for each invidual
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
63 # - bioFactor : name of the column cotaining the biological factor of interest
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
64 #################################################################################################################
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
65 NmrBrucker_bioFact <- function(data,sampleMetadata,bioFactor)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
66 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
67 # Total intensity normalization
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
68 data.normalized <- data[,1]/bioFactor[1]
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
69 for (i in 2:ncol(data))
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
70 data.normalized <- cbind(data.normalized,data[,i]/bioFactor[i])
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
71 colnames(data.normalized) <- colnames(data)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
72 rownames(data.normalized) <- rownames(data)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
73 return(data.normalized)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
74 }
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
75
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
76
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
77 #################################################################################################################
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
78 # Probabilistic quotient normalization (PQN)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
79 # Input parameters
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
80 # - data : bucketed spectra (rows=buckets; columns=samples)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
81 # - sampleMetadata : dataframe with treatment group of inviduals
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
82 # - pqnFactor : number of the column cotaining the biological facor of interest
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
83 # - nomControl : name of the treatment group
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
84 #################################################################################################################
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
85 NmrBrucker_pqn <- function(data,sampleMetadata,pqnFactor,nomControl)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
86 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
87 # Total intensity normalization
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
88 data.total <- apply(data,2,sum)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
89 data.normalized <- data[,1]/data.total[1]
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
90 for (i in 2:ncol(data))
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
91 data.normalized <- cbind(data.normalized,data[,i]/data.total[i])
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
92 colnames(data.normalized) <- colnames(data)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
93 rownames(data.normalized) <- rownames(data)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
94
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
95 # Reference spectrum
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
96 # Recuperation spectres individus controle
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
97 control.spectra <- data.normalized[,sampleMetadata[,pqnFactor]==nomControl]
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
98 spectrum.ref <- apply(control.spectra,1,median)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
99
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
100 # Ratio between normalized and reference spectra
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
101 data.normalized.ref <- data.normalized/spectrum.ref
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
102
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
103 # Median ratio
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
104 data.normalized.ref.median <- apply(data.normalized.ref,1,median)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
105
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
106 # Normalization
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
107 data.normalizedPQN <- data.normalized[,1]/data.normalized.ref.median
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
108 for (i in 2:ncol(data))
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
109 data.normalizedPQN <- cbind(data.normalizedPQN,data.normalized[,i]/data.normalized.ref.median)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
110 colnames(data.normalizedPQN) <- colnames(data)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
111 rownames(data.normalizedPQN) <- rownames(data)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
112
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
113 return(data.normalizedPQN)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
114 }
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
115
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
116
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
117 ## Tests
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
118 if (scalingMethod=="QuantitativeVariable")
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
119 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
120 if(mode(sampleMetadata[,bioFactor]) == "character")
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
121 bioFact <- factor(sampleMetadata[,bioFactor])
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
122 else
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
123 bioFact <- sampleMetadata[,bioFactor]
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
124 }
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
125
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
126 ## Spectra scaling depending on the user choice
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
127 if (scalingMethod == "None")
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
128 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
129 NormalizedBucketedSpectra <- dataMatrix
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
130 }
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
131 else if (scalingMethod == "Total")
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
132 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
133 NormalizedBucketedSpectra <- NmrBrucker_total(dataMatrix)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
134 }
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
135 else if (scalingMethod == "PQN")
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
136 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
137 NormalizedBucketedSpectra <- NmrBrucker_pqn(dataMatrix,sampleMetadata,bioFactor,ControlGroup)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
138 }
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
139 else if (scalingMethod == "QuantitativeVariable")
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
140 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
141 NormalizedBucketedSpectra <- NmrBrucker_bioFact(dataMatrix,sampleMetadata,bioFact)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
142 }
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
143
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
144 # Graphic
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
145 if (graph != "None")
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
146 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
147 # Graphic Device opening
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
148 pdf(nomFichier,onefile=TRUE)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
149 if (graph == "Overlay")
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
150 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
151 ymax <- max(NormalizedBucketedSpectra)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
152 plot(1:length(NormalizedBucketedSpectra[,1]),NormalizedBucketedSpectra[,1],ylim=c(0,ymax),
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
153 type='l',col=1,xlab="Chemical shift",ylab="Intensity")
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
154 for (i in 2:ncol(NormalizedBucketedSpectra))
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
155 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
156 spectre <- NormalizedBucketedSpectra[,i]
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
157 lines(spectre,col=i)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
158 }
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
159 }
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
160 else
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
161 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
162 for (i in 1:ncol(NormalizedBucketedSpectra))
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
163 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
164 plot(1:length(NormalizedBucketedSpectra[,i]),NormalizedBucketedSpectra[,i],type='l',col=1,
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
165 xlab="Chemical shift",ylab="Intensity")
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
166 }
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
167 }
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
168 dev.off()
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
169 }
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
170
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
171 # Output datasets creation
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
172 if (scalingMethod == "None" || scalingMethod == "Total")
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
173 {
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
174 sampleMetadata <- data.frame(1:ncol(NormalizedBucketedSpectra))
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
175 rownames(sampleMetadata) <- colnames(NormalizedBucketedSpectra)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
176 colnames(sampleMetadata) <- "SampleOrder"
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
177 }
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
178
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
179 variableMetadata <- data.frame(1:nrow(NormalizedBucketedSpectra))
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
180 rownames(variableMetadata) <- rownames(NormalizedBucketedSpectra)
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
181 colnames(variableMetadata) <- "VariableOrder"
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
182
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
183 return(list(NormalizedBucketedSpectra,sampleMetadata,variableMetadata))
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
184
e1b29d705286 planemo upload for repository https://github.com/workflow4metabolomics/nmr_normalization commit 0a2ec9e30fbf7690a80695c751e6ea432b10a759-dirty
marie-tremblay-metatoul
parents:
diff changeset
185 }