Browse Source

changed some minor mistakes

master
junikimm717 3 years ago
parent
commit
c37a610f47
  1. 27
      src/script.def.R

27
src/script.def.R

@ -19,7 +19,7 @@ library("parallel")
# Configurations #############################################################
# file to read from
# absolute path of the file that contains data.
input.filename <- ""
# separator to use (\t for tabs, "," for CSV)
input.sep <- ","
@ -27,23 +27,23 @@ input.sep <- ","
# All isotopes to check for in search
check_isos <- c("37Cl", "81Br")
# Minimum size of a cluster (clusters smaller than this size will not
# be accepted)
# Minimum size of a cluster (clusters smaller than this size will be filtered out)
min_cluster_size <- 2
# Number of cores to be used in pattern.search evaluation
# (will be adjusted if it exceeds the true number of cores)
# (this value will be adjusted if it exceeds the true number of cores)
use_cores <- 6
# Table name configuration
# Configuration of column names
# Column name for m/z values
columns.mz <- "mz"
# Column name for time in gc
# Column name for time in gas chromatography
columns.time <- "time"
# Column name for intensities
columns.intensity <- "Intensity"
# Column name for fragment numbers (only numbers accepted)
# Column name for fragment numbers (numerical values)
columns.spectra <- "Spectra_Number"
# output options
@ -51,10 +51,13 @@ columns.spectra <- "Spectra_Number"
# Number of highest intensities to display in output
output.intensities <- 5
# Verbose output (dumping all output into a file)
verbose.enable <- FALSE
# Enable Verbose output (dumping all output into a file)
verbose.enable <- TRUE
# output directory for dumping all files
# output directory must already exist.
verbose.outputdir <- ""
verbose.outputdir <-
"/home/junikim/programming/patternmatch/data/results"
# Variables/Functions ########################################################
@ -167,7 +170,7 @@ derive.intensity <- function(result) {
}
derive.average <- function(result) {
ptrn <- result$Patterns[, 2]
ptrn <- result$Patterns[, 3]
return(mean(ptrn))
}
@ -189,7 +192,7 @@ verbose.dump <- function(result) {
paste(derive.fragment(result), ".txt",
sep = ""))
sink(path)
dput(result)
write.table(result$Patterns, sep = "\t")
sink()
}

Loading…
Cancel
Save