Mercurial > repos > mmonsoor > probmetab
comparison lib.r @ 4:52b222a626b0 draft default tip
planemo upload commit 00684d80f032fee5bd1cb86e05a477fcdcb1c3fc
author | lecorguille |
---|---|
date | Fri, 07 Apr 2017 09:11:22 -0400 |
parents | abcfa1648b66 |
children |
comparison
equal
deleted
inserted
replaced
3:abcfa1648b66 | 4:52b222a626b0 |
---|---|
120 y = 1:nrow(wl$wm) | 120 y = 1:nrow(wl$wm) |
121 conn = gibbs.samp(x, y, 5000, w, wl$wm) | 121 conn = gibbs.samp(x, y, 5000, w, wl$wm) |
122 ansConn = export.class.table(conn, reactionM, ionAnnot, DB=DB,html=listArguments[["html"]],filename="AnalysisExample",prob=listArguments[["prob"]]) | 122 ansConn = export.class.table(conn, reactionM, ionAnnot, DB=DB,html=listArguments[["html"]],filename="AnalysisExample",prob=listArguments[["prob"]]) |
123 if(listArguments[["html"]]){ | 123 if(listArguments[["html"]]){ |
124 #Zip the EICS plot | 124 #Zip the EICS plot |
125 system(paste('zip -r "Analysis_Report.zip" "AnalysisExample_fig"')) | 125 system(paste('zip -rq "Analysis_Report.zip" "AnalysisExample_fig"')) |
126 } | 126 } |
127 | 127 |
128 # calculate the correlations and partial correlations and cross reference then with reactions | 128 # calculate the correlations and partial correlations and cross reference then with reactions |
129 mw=which(w==1,arr.ind=TRUE) | 129 mw=which(w==1,arr.ind=TRUE) |
130 #reac2cor function : Use the intensity of putative molecules in repeated samples to calculate correlations and partial | 130 #reac2cor function : Use the intensity of putative molecules in repeated samples to calculate correlations and partial |
146 names(variableMetadata)[names(variableMetadata)=="rtmed"] <- "rt" | 146 names(variableMetadata)[names(variableMetadata)=="rtmed"] <- "rt" |
147 variableM=merge_probmetab(variableMetadata, ansConn) | 147 variableM=merge_probmetab(variableMetadata, ansConn) |
148 write.table(variableM, sep="\t", quote=FALSE, row.names=FALSE, file="variableMetadata.tsv") | 148 write.table(variableM, sep="\t", quote=FALSE, row.names=FALSE, file="variableMetadata.tsv") |
149 } else if (listArguments[["mode_acquisition"]]=="two") { | 149 } else if (listArguments[["mode_acquisition"]]=="two") { |
150 #Retrocompatibility with previous annotateDiffreport variableMetadata dataframe (must replace mzmed column by mz, and rtmed by rt) | 150 #Retrocompatibility with previous annotateDiffreport variableMetadata dataframe (must replace mzmed column by mz, and rtmed by rt) |
151 names(variableMetadataP)[names(variableMetadata)=="mzmed"] <- "mz" | 151 names(variableMetadataP)[names(variableMetadataP)=="mzmed"] <- "mz" |
152 names(variableMetadataP)[names(variableMetadata)=="rtmed"] <- "rt" | 152 names(variableMetadataP)[names(variableMetadataP)=="rtmed"] <- "rt" |
153 names(variableMetadataN)[names(variableMetadata)=="mzmed"] <- "mz" | 153 names(variableMetadataN)[names(variableMetadataN)=="mzmed"] <- "mz" |
154 names(variableMetadataN)[names(variableMetadata)=="rtmed"] <- "rt" | 154 names(variableMetadataN)[names(variableMetadataN)=="rtmed"] <- "rt" |
155 variableMP=merge_probmetab(variableMetadataP, ansConn) | 155 variableMP=merge_probmetab(variableMetadataP, ansConn) |
156 write.table(variableMP, sep="\t", quote=FALSE, row.names=FALSE, file="variableMetadata_Positive.tsv") | 156 write.table(variableMP, sep="\t", quote=FALSE, row.names=FALSE, file="variableMetadata_Positive.tsv") |
157 variableMN=merge_probmetab(variableMetadataN, ansConn) | 157 variableMN=merge_probmetab(variableMetadataN, ansConn) |
158 write.table(variableMN, sep="\t", quote=FALSE, row.names=FALSE, file="variableMetadata_Negative.tsv") | 158 write.table(variableMN, sep="\t", quote=FALSE, row.names=FALSE, file="variableMetadata_Negative.tsv") |
159 } | 159 } |