vanmooylipidomics / LipidomicsToolbox

Scripts for converting & processing HPLC-MS lipid data from an Exactive Orbitrap mass spectrometer
MIT License
4 stars 5 forks source link

Running IPO #1

Closed Titan100 closed 8 years ago

Titan100 commented 8 years ago

Hello, I am trying to run IPO for optimization of my data. I ran using the command from IPO but took a long time to get work done. I also tried your command but gave me error. Can you please suggest me what am I missing? How can I make the optimization faster?

Thank you for your help.

Titan

jamesrco commented 8 years ago

Hi Titan, Happy to help - but I'd recommend you open an issue with the developers of the IPO package: https://github.com/glibiseller/IPO/issues I had moderately good success using IPO for my applications -- but it does take quite a while for the primary IPO function to complete the necessary number of iterations. When you say, "I also tried your command but gave me error," what do you mean? Can you be specific, posting both the exact code you executed and the output, including any error/warning messages? Any questions regarding IPO runtime speed should be directed at the IPO developers. I will say that I wasn't unhappy with the long runtime, considering the complex and processor-intensive task that IPO is designed to accomplish. Optimization routines can take a long time! In your message on the Metabolomics Forum, you mentioned you are using a (single?) data file of ~ 1.5 GB in size? This seems extreme -- not to mention the fact that you should be giving xcms at least a few representative files from the dataset you're working with. Hope this helps! Jamie

Titan100 commented 8 years ago

Sorry, I forgot to copy the command I used. Here it is. I have opened issue with the developers. I have installed snow packages still it say I need it. See below.

working_dir = ("C://Users/Lipidomics/Desktop/Tularemia_untar_pos_mzXML/") setwd(working_dir) library(tools) library(xcms) Loading required package: mzR Loading required package: Rcpp Loading required package: BiocGenerics Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from ‘package:stats’:

IQR, mad, xtabs

The following objects are masked from ‘package:base’:

anyDuplicated, append, as.data.frame, as.vector, cbind, colnames,
do.call, duplicated, eval, evalq, Filter, Find, get, grep, grepl,
intersect, is.unsorted, lapply, lengths, Map, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,
Reduce, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unlist, unsplit

Loading required package: ProtGenerics Loading required package: Biobase Welcome to Bioconductor

Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.

Attaching package: ‘xcms’

The following objects are masked from ‘package:Biobase’:

phenoData, phenoData<-

library(CAMERA) Loading required package: igraph

Attaching package: ‘igraph’

The following object is masked from ‘package:xcms’:

groups

The following objects are masked from ‘package:BiocGenerics’:

normalize, union

The following objects are masked from ‘package:stats’:

decompose, spectrum

The following object is masked from ‘package:base’:

union

library(rsm)

Attaching package: ‘rsm’

The following object is masked from ‘package:igraph’:

star

library(IPO) library(snow)

Attaching package: ‘snow’

The following objects are masked from ‘package:BiocGenerics’:

clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, clusterSplit, parApply, parCapply,
parLapply, parRapply, parSapply

The following objects are masked from ‘package:parallel’:

clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, clusterSplit, makeCluster, parApply,
parCapply, parLapply, parRapply, parSapply, splitIndices,
stopCluster

library(snowfall) working_dir [1] "C://Users/Lipidomics/Desktop/Tularemia_untar_pos_mzXML/" peakpickingParameters <- getDefaultXcmsSetStartingParams('centWave') peakpickingParameters$min_peakwidth <- c(10,20) peakpickingParameters$max_peakwidth <- c(40,80) peakpickingParameters$ppm <- 3 peakpickingParameters$prefilter <- 3 peakpickingParameters$value_of_prefilter <- c(1000,10000) peakpickingParameters$snthresh <- c(10) peakpickingParameters$noise <- c(500) resultPeakpicking <- optimizeXcmsSet(files=working_dir,

  • params=peakpickingParameters, nSlaves=4, subdir='rsmDirectory')

starting new DoE with: min_peakwidth: c(10, 20) max_peakwidth: c(40, 80) ppm: 3 mzdiff: c(-0.001, 0.01) snthresh: 10 noise: 500 prefilter: 3 value_of_prefilter: c(1000, 10000) mzCenterFun: wMean integrate: 1 fitgauss: FALSE verbose.columns: FALSE nSlaves: 1

Error: package ‘snow’ is required by ‘snowfall’ so will not be detached

jamesrco commented 8 years ago

Hi again Titan, Ah, I recognize this issue. It appears to be a problem that is triggered in Windows builds of R when both snow and snowfall are called. Try running your code the same as above, but while commenting out the line (as below):

# library(snowfall)

See if you still get the error. I was able to run the code exactly as you present it above on a Mac version of R (3.3.0) without any issues, but I think the PC version (since parallel support is built into snow to begin with) does not require you to also call snowfall. This may be the issue. If in fact this fixes it, you might want to advise the IPO developers so they can insert some code to catch this -- I am sure you will not be the only one! Jamie

Titan100 commented 8 years ago

Thank Jamie. I will try again and let developer know.