Skip to main content

Recent Posts

91
XCMS / Re: Error when executing xcmsset
Last post by gooooh -
Thanks for the help.
I'm able to complete the lcms analysis until the diffreports. However, in between there are some problems that i coulldn't figured out.
1. error when i proceed to runtime correction as below. Moreover, when i did not include a command in R does it means it will choose the default setting which is "NULL" for centerSample ?
the help for retcor does shows that "center=NULL" can be included.

Code: [Select]
> #RUN RETENTION TIME CORRECTION
> xset2 <- retcor(
+   xset,
+   method = "obiwarp",
+   profStep = 1,
+   plottype = c("none","deviation"),
+   centerSample = NULL,
+   col = NULL,
+   ty = NULL,
+   response = 1,
+   distFun = "cor_opt",
+   gapInit = NULL,
+   factorDiag = 2,
+   factorGap = 1,
+   localAlignment = 0,
+   initPenalty = 0)
Error in .local(object, ...) : unused argument (centerSample = NULL)

when i use "center" instead of "centerSample" a different error came up.
Code: [Select]
> #RUN RETENTION TIME CORRECTION
> xset2 <- retcor(
+   xset,
+   method = "obiwarp",
+   profStep = 1,
+   plottype = c("none","deviation"),
+   center = NULL,
+   col = NULL,
+   ty = NULL,
+   response = 1,
+   distFun = "cor_opt",
+   gapInit = NULL,
+   factorDiag = 2,
+   factorGap = 1,
+   localAlignment = 0,
+   initPenalty = 0)
center sample:  
Processing: Error in if (!file.exists(object)) stop("xcmsSource: file not found: ",  :
  argument is of length zero

2. when i remove the centerSample, it does runs completely, but no plots was produced under the 'plots' tab in Rstudio. could not find it in my working directory as well.

xset shows that data are inside.
Code: [Select]
> xset
An "xcmsSet" object with 46 samples

Time range: 97.3-756.4 seconds (1.6-12.6 minutes)
Mass range: 105.0697-975.5754 m/z
Peaks: 6117 (about 133 per sample)
Peak Groups: 116
Sample classes: CASE, CONTROL

Feature detection:
 o Peak picking performed on MS1.
Profile settings: method = bin
                  step = 0.1

Memory usage: 2.29 MB

Is the command incorrectly typed ?
92
XCMS / Re: Error when executing xcmsset
Last post by Jan Stanstrup -
family is a parameter for retcor.peakgroups not for retcor.obiwarp (e.g. method="obiwarp"). See the help of the individual methods.
93
XCMS / Re: Error when executing xcmsset
Last post by gooooh -
Thanks for the advice, will create a specific project for it. But it just save the scripts only, doesnt save the files in the "environment tabs".

I figured out my mistake is when specifying the "mzxml" file type. When i changed it to "mzXML" it works.

However, i encounter another error when im trying to use retcor

Code: [Select]
 > xset2 <- retcor(
+   xset,
+   method = "obiwarp",
+   profStep = 1,
+   family = "symmetric",
+   plottype = "mdevden",
+ )
Error in .local(object, ...) : unused argument (family = "symmetric")
>

Code: [Select]
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_Malaysia.1252
[2] LC_CTYPE=English_Malaysia.1252  
[3] LC_MONETARY=English_Malaysia.1252
[4] LC_NUMERIC=C                    
[5] LC_TIME=English_Malaysia.1252   

attached base packages:
[1] parallel  stats     graphics  grDevices utils   
[6] datasets  methods   base    

other attached packages:
 [1] magrittr_1.5        pander_0.6.1      
 [3] RColorBrewer_1.1-2  faahKO_1.20.0     
 [5] xcms_3.2.0          MSnbase_2.6.1     
 [7] ProtGenerics_1.12.0 mzR_2.14.0        
 [9] Rcpp_0.12.17        BiocParallel_1.14.1
[11] Biobase_2.40.0      BiocGenerics_0.26.0

loaded via a namespace (and not attached):
 [1] BiocInstaller_1.30.0   compiler_3.5.1       
 [3] pillar_1.2.3           plyr_1.8.4           
 [5] iterators_1.0.9        zlibbioc_1.26.0      
 [7] tools_3.5.1            MALDIquant_1.17      
 [9] digest_0.6.15          evaluate_0.10.1      
[11] tibble_1.4.2           preprocessCore_1.42.0
[13] gtable_0.2.0           lattice_0.20-35      
[15] rlang_0.2.1            Matrix_1.2-14        
[17] foreach_1.4.4          yaml_2.1.19          
[19] stringr_1.3.1          knitr_1.20           
[21] IRanges_2.14.10        S4Vectors_0.18.3     
[23] multtest_2.36.0        stats4_3.5.1         
[25] rprojroot_1.3-2        grid_3.5.1           
[27] impute_1.54.0          snow_0.4-2           
[29] survival_2.42-3        XML_3.98-1.11        
[31] RANN_2.5.1             rmarkdown_1.10       
[33] limma_3.36.2           ggplot2_3.0.0        
[35] splines_3.5.1          backports_1.1.2      
[37] scales_0.5.0           pcaMethods_1.72.0    
[39] codetools_0.2-15       htmltools_0.3.6      
[41] MASS_7.3-50            MassSpecWavelet_1.46.0
[43] mzID_1.18.0            BiocStyle_2.8.2      
[45] colorspace_1.3-2       affy_1.58.0          
[47] stringi_1.1.7          doParallel_1.0.11    
[49] lazyeval_0.2.1         munsell_0.5.0        
[51] vsn_3.48.1             affyio_1.50.0


I have tried changed the scripts here and there, retype it and the error still the same.
i get the following error when i removed the "family"

Code: [Select]
> xset2 <- retcor(
+   xset,
+   method = "obiwarp",
+   profStep = 1,
+   plottype = "mdevden"
+ )
Error in match.arg(plottype) : 'arg' should be one of "none", "deviation"
>

I think something does'nt installed or loaded ?
94
XCMS / Re: Error when executing xcmsset
Last post by Jan Stanstrup -
It means the "files" variable is empty (or technically that it contains one string of length zero).

There are several possible errors in your code.

The double forward slash might be causing trouble if you are sure the path is otherwise correct. Try this (I think this might be a non-issue though):
Code: [Select]
path <- "G:/mzxml/np/neg"


"system.file" is meant to find files included with some package. Since you are using your own files you should be using "list.files" instead. Also keep in mind that the pattern is case sensitive.
If you write "files" (without quotes) in the console you should see the list of your files.

Variables are kept in memory. They are not written to files. Anything you want written to a file you need to do it explicitly.

An external drive should not be a problem, no.

Btw.: Best practice is to create a project in Rstudio and have a dedicated folder for each project. You then keep your scripts (and smaller support files if you have any) here.
95
XCMS / Re: Error when executing xcmsset
Last post by gooooh -
Hi,
Thanks for the advice.
I have looked the "files" under the environment tab. seems like there is 112B but i couldnt open it nor locate it under my working directory.

I have ran the "files" in my R console and there is nothing there just "" was displayed.
 I have attached a snopshot of the environment tab in rstudio and my global setting.
My working directory is on my cpu but all the data in G drive.
Fyi, the G drive is a external hdd, could this be the cause ?

96
XCMS / Re: Error when executing xcmsset
Last post by Jan Stanstrup -
Check what is in "files". I am guessing something strange got in there or it is empty.
97
XCMS / Error when executing xcmsset
Last post by gooooh -
Hi,

I'm very new in R and using xcms for analysis.
I have LCMS data in mzxml which contains two groups (A and B) in seperate sub directories. for example, inside folder "neg" contains two subfolders "A" and "B".
i have loaded the library and create the path to where my file contains using the command as below.
When i execute the xcmsset i get error.

Code: [Select]
library(BiocStyle)
library(multtest)
library(xcms)
path <- "G://mzxml/np/neg"
files <- system.file(path, full.names=TRUE, pattern="mzxml", recursive = TRUE)
xset <- xcmsSet(files,
                method="centWave",
                ppm = 10,
                peakwidth = c(20, 50),
                snthresh = 6,
                prefilter = c(3, 100),
                integrate = 1,
                mzdiff = 0.01
)

The error is as below.

Code: [Select]
Error in if (any(info$isdir)) { : missing value where TRUE/FALSE needed

May i know is it caused by in-correct filepath or something else ?

Thank you

Regards,
goo
98
Please join us at the upcoming Royal Society of Chemistry Faraday Discussion:

Challenges in the Analysis of Complex Natural Mixtures
Edinburgh, 13-15 May 2019
Oral abstract deadline: 27 July 2018

Most naturally occurring systems can be characterised as complex mixtures, such as biofluids, food or soil.  Determination of their chemical composition is a highly challenging and is a key bottleneck in metabolomics. The techniques best positioned to tackle such mixtures experimentally include mass spectrometry, chromatography, NMR spectroscopy, or new alternative techniques, including combinations of the above methods. For the most part, people who work on the analysis of complex mixtures are driving the progress in exploiting new methodologies and their creative combinations. This Faraday Discussion will focus on four themes:
  • Dealing with Complexity
  • High-resolution Techniques
  • Data Mining and Visualisation
  • Future Challenges and New Approaches

Faraday Discussions have a special format where research papers written by the speakers are distributed to all participants before the meeting, and most of the meeting is devoted to discussing the papers. Please see the website for further information:
http://www.rsc.org/events/detail/29574/challenges-in-analysis-of-complex-natural-mixtures-faraday-discussion
99
METLIN / can not visit Metlin
Last post by liuyu -
Excuse me ,since yesterday  I can not visit Metlin,please check it,thank you!
100
XCMS Online / Re: Parameters for HPLC-Q Exactive
Last post by Jan Stanstrup -
XCMS online faq would suggest yes https://xcmsonline.scripps.edu/docs/fileformats.html.
In XCMS in R you cannot use vendor formats.

I would however be careful with waters files. Whether or not the lockmass correction is applied seems to depends on the version of masslynx and the msconvert version... So since it is unknown how XCMS online converts I would make sure my files are OK converted to mzML and upload that.