Mercurial > repos > pieterlukasse > prims_metabolomics
diff metaMS_cmd_annotate.r @ 53:70574a6381ea
small fixes
author | pieter.lukasse@wur.nl |
---|---|
date | Thu, 11 Dec 2014 14:09:27 +0100 |
parents | f772a5caa86a |
children |
line wrap: on
line diff
--- a/metaMS_cmd_annotate.r Thu Dec 11 10:26:17 2014 +0100 +++ b/metaMS_cmd_annotate.r Thu Dec 11 14:09:27 2014 +0100 @@ -10,13 +10,16 @@ ## output file names, e.g. "E:/Rworkspace/metaMS/data/out.txt" args.outAnnotationTable <- args[4] +args.mass_error_function <- args[5] +if (args.mass_error_function == "0") + args.mass_error_function <- NULL ## report files -args.htmlReportFile <- args[5] -args.htmlReportFile.files_path <- args[6] +args.htmlReportFile <- args[6] +args.htmlReportFile.files_path <- args[7] -if (length(args) == 7) +if (length(args) == 8) { - args.outLogFile <- args[7] + args.outLogFile <- args[8] # suppress messages: # Send all STDERR to STDOUT using sink() see http://mazamascience.com/WorkingWithData/?p=888 msg <- file(args.outLogFile, open="wt") @@ -43,7 +46,7 @@ # Just to highlight: if you want to use more than one # trigger runLC: - LC <- runLC(xset=xsetData, settings = tempEnv[["customMetaMSsettings"]], DB = tempEnv[[testDB[1]]]$DB, nSlaves=20, returnXset = TRUE) + LC <- runLC(xset=xsetData, settings = tempEnv[["customMetaMSsettings"]], DB = tempEnv[[testDB[1]]]$DB, errf=args.mass_error_function, nSlaves=20, returnXset = TRUE) # write out runLC annotation results: write.table(LC$PeakTable, args.outAnnotationTable, sep="\t", row.names=FALSE) @@ -52,7 +55,7 @@ cat("\nConstructed DB info===============:\n") str(tempEnv[[testDB[1]]]$Info) cat("\nConstructed DB table===============:\n") - if (length(args) == 7) + if (length(args) == 8) { write.table(tempEnv[[testDB[1]]]$DB, args.outLogFile, append=TRUE, row.names=FALSE) write.table(tempEnv[[testDB[1]]]$Reftable, args.outLogFile, sep="\t", append=TRUE, row.names=FALSE)