Browse Source

began testing

master
junikimm717 3 years ago
parent
commit
a6ea1d117f
  1. 2
      .gitignore
  2. 3
      specification.md
  3. 31
      src/script.def.R

2
.gitignore

@ -1,2 +1,4 @@
.DS_Store
/data
/.RData
/.Rhistory

3
specification.md

@ -48,6 +48,8 @@ isotopes.
- No statistical testing required (check if it is chlorine or bromine)
- Isotopes to check (Carbon, Sulfur, Chlorine, Bromine all have n+2) (check make.isos object)
- Tweak parameters (but also put them into a slideshow/record, see how good the results are).
- **set all rules to false**
## Isotopes
@ -56,3 +58,4 @@ isotopes.
- Part of the reasoning can be attributed to differences.
- Forseeable future, adapt to different isotopes.
- Capture multiple outputs of different isotopes.

31
src/script.def.R

@ -1,32 +1,32 @@
library("nontarget")
library("purrr")
library("funprog")
#library("funprog")
library("enviPat")
library("stringr")
library("parallel")
# Configurations #############################################################
# file : decides which file to read in data from #############################
file <- "/path/to/file"
file <- "path/to/file"
# check cluster 2846
search_isos <- c("13C", "37Cl")
# Minimum size of a cluster
min_cluster_size <- 3
# Number of cores to be used (will be adjusted if not possible)
used_cores <- 3
##############################################################################
use_cores <- 6 ##############################################################################
# Read in the Table ##########################################################
table <- read.table(file, header=TRUE, sep=",")
table <- read.table(file, header=TRUE, sep="\t")
# Organize the tables by number ##############################################
fragments <- max(table[,"Spectra_Number"])
# The algorithm below guarantees linear complexity of looking up data points.#
# set use_cores to safe amount
@ -80,7 +80,20 @@ isos <- make.isos(isotopes,use_isotopes=search_isos,
diagnostics <- function(fragment) {
points <- getdataframe(fragment)
ptrn <- pattern.search(points, isos)
ptrn <- pattern.search(
points,
isos,
cutint=100000,
rttol=c(-0.2,0.2),
mztol=1000,
mzfrac=1.0,
ppm=TRUE,
inttol=0.2,
# Do not modify anything below.
rules=rep(FALSE, 11),
deter=FALSE,
entry=50
);
return(ptrn)
}
@ -88,7 +101,7 @@ use <- Filter(function(x) usable[x], 1:fragments)
results <- mclapply(use, diagnostics, mc.cores=use_cores)
# Incomplete: Make the analysis more resiliant to different sorting.
# Incomplete: How to process results. (is it actually supposed to be all negatives?)
##############################################################################
Loading…
Cancel
Save