annotate lcms-interval-scheduling.R @ 19:d4081e4160af draft

planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 14435cfc042911bf1ee409f5a0d5ef908f5feec0-dirty
author tomnl
date Thu, 21 Jun 2018 08:47:44 -0400
parents 55aa2dd24828
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
1 library(XCMSwrapper)
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
2 library(optparse)
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
3
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
4 option_list <- list(
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
5
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
6 make_option(c("-s", "--sample_peaklist"), type="character"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
7 make_option(c("-b", "--blank_peaklist"), type="character"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
8 make_option(c("-t", "--topn"), type="character"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
9 make_option(c("-o", "--out_dir"), type="character", default=getwd(),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
10 help="Output folder for resulting files [default = %default]"
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
11 ),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
12 make_option("--method", type="character"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
13 make_option("--maxms2", type="numeric"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
14 make_option("--widthFactor", type="numeric"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
15 make_option("--minWidth", type="numeric"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
16 make_option("--ilimit", type="numeric"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
17 make_option("--shift", type="numeric"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
18 make_option("--samplelistNm", type="numeric"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
19 make_option("--overlappingP", type="numeric"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
20 make_option("--fullpw", action="store_true"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
21 make_option("--b_widthFactor", type="numeric"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
22 make_option("--b_shift", type="numeric"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
23 make_option("--b_exclu_limit", type="numeric"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
24 make_option("--b_minWidth", type="numeric"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
25 make_option("--polarity", type="character"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
26 make_option("--fillgaps", type="character"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
27 make_option("--dmaNearline", action="store_true"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
28 make_option("--blankClass", type="character"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
29 make_option("--intensityCN", type="character"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
30 make_option("--sortCN", type="character"),
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
31 make_option("--filterS", type="character")
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
32 )
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
33
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
34 # store options
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
35 opt<- parse_args(OptionParser(option_list=option_list))
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
36
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
37 print(sessionInfo())
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
38 print(opt)
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
39
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
40 if(is.null(opt$fullpw)){
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
41 fullpw = FALSE
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
42 }else{
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
43 fullpw = TRUE
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
44 }
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
45
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
46 if(is.null(opt$fillgaps)){
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
47 fillgaps = FALSE
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
48 }else{
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
49 fillgaps = TRUE
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
50 }
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
51
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
52
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
53 # Nearline processing
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
54 # nearline parameters (sample and blank)
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
55 params <- list(
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
56 nl.method = opt$method,
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
57 nl.maxms2 = opt$maxms2, # only used for simple nearline
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
58 nl.widthFactor = opt$widthFactor,
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
59 nl.minWidth = opt$minWidth, # 5 seconds
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
60 nl.ilimit = opt$ilimit, # only used for simple nearline
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
61 nl.shift = opt$shift,
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
62 nl.samplelist_nm = opt$samplelistNm,
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
63 nl.overlappingP = opt$overlappingP,
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
64 nl.fullpw = fullpw,
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
65 nl.fillgaps = fillgaps, # only used for metshot nearline
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
66 #nearline blank parameters
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
67 nl.b_widthFactor = opt$b_widthFactor, # increase the width
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
68 nl.b_minWidth = opt$b_minWidth,
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
69 nl.b.shift = opt$b_shift,
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
70 nl.exclu_limit = opt$b_exclu_limit,
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
71 temp_dir='.',
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
72 intensityCN=opt$intensityCN,
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
73 sortCN=opt$sortCN # column of the sample peaklist to use for
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
74
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
75 )
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
76
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
77
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
78
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
79 # ##################################
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
80 # # Perform Nearline optimisation
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
81 # ##################################
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
82 s_peaklist <- read.table(opt$sample_peaklist, header = TRUE, sep='\t', stringsAsFactors = FALSE)
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
83 b_peaklist <- read.table(opt$blank_peaklist, header = TRUE, sep='\t', stringsAsFactors = FALSE)
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
84
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
85 if(!is.null(opt$dmaNearline)){
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
86 # have to do some additional filtering if part of the dma nearline workflow
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
87 blank_class_name <- gsub('-', '.', opt$blankClass)
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
88 b_peaklist = b_peaklist[which(b_peaklist[,paste(blank_class_name, '_valid', sep='')]==1),]
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
89 s_peaklist = s_peaklist[s_peaklist[,opt$filterS]==0,]
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
90 }
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
91
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
92
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
93
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
94 topn <- read.table(opt$topn, header = TRUE, sep='\t', stringsAsFactors = FALSE, check.names=FALSE)
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
95 topn[is.na(topn)] <- ""
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
96 # colnames(topn) <- c('Mass [m/z]', 'Formula [M]', 'Formula type', 'Species', 'CS [z]', 'Polarity', 'Start [min]', 'End [min]','Comment')
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
97 # colnames(topn) <- gsub('\\.', ' ', colnames(topn))
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
98 print(head(topn))
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
99
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
100 # #Generate inclusions lists for DDA-MS/MS and store in list
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
101 incl.lists = nearline_main(pm = params, peaklist_xcms=s_peaklist, pol=opt$polarity, merge_peaklists=FALSE, peaklist_post=NA)
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
102
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
103 # #Generate exclusion lists for each class being analysed
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
104 nearline_main_blank(pm = params,
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
105 plist = b_peaklist,
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
106 incl_list_pos = incl.lists,
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
107 pol = opt$polarity,
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
108 topn = topn)
55aa2dd24828 planemo upload for repository https://github.com/computational-metabolomics/dma-tools-galaxy commit 6c48bd51987a28401de6cf5e49b1b30e5e73fe16-dirty
tomnl
parents:
diff changeset
109 #