Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - Jan Stanstrup

166
XCMS / Re: XCMS plot error (How to fix it)
What GUI (if any) are you using? I can only reproduce by making the plot windows in RStudio very narrow. That is usually the cause of this error (but in this case it has to be really really narrow it seems).
167
XCMS / Re: select an m/z range in xcmsSet ?
Pretty sure you can not. I think it is fairly easy to remove them afterwards, though, if that would help?
Is the problem time or can't you just cut them in the end?
168
XCMS / Re: Extracting blank samples in a discovery batch
Good and important question.

The answer depends on the settings for the group function (?group.density). The interesting parameters are minfrac and minsamp. Remember that they are set "per group". So it depends how you have grouped your data (sample group, not feature group... Usually you have grouped your samples/files by putting it in different sub-folders if not all in one group/folder.)
169
XCMS / Re: Working with data matrixes
The main task of XCMS is to get you from data raw to a data matrix. So you probably need to explain what you would like to achieve before anyone can answer your question.
170
CAMERA / Re: Do intensity drifting accross samples influence CAMERA
The intensities of ions originating from the same molecule should "drift" in the same way and therefore the answer is no.
If you changed something within your analysis that can affect the ratio of fragments then the answer is yes. I have seem routine maintenance done by the vendor's technician change the fragment ratios (never figured what was changed) so avoid this kind of thing.

I have seen cases where adduct/polymer formation have non-linear behavior and in those cases the correlation can suffer.
I don't recall seeing it but I imagine detector saturation can also cause non-linear behavior.
171
XCMS / Re: xcmsRow mzrange
see
Code: [Select]
?"xcmsSet-class"
-->
Code: [Select]
profinfo:
list containing the values method - profile generation method, and step - profile m/z step size and eventual additional parameters to the profile function.

mzrange is not a valid parameter.

Code: [Select]
profinfo(a)
gives you current parameters.

I don't think there is a way to filter at the time of the file read. The file has to be read scan by scan anyway so I don't think there is much speed to gain compared to a post-read filter. If you only care about the profile matrix isn't what you want a simple row selection of a@env$profile?
175
XCMS / Re: Choose the best parameters to analyse UPLC-qTof data
Which functions to choose depends on the experiment you did. The functions are those listed in masslynx if you open a chromatogram and do: --> display --> tic. If you just did MS1 I think you just want the first one. The second would be the lockmass function.

For  convert.waters2 infiles needs to be the actual .raw file. Not the folder which contains them as for convert.waters. I would guess that is the problem here.
176
XCMS / Re: Choose the best parameters to analyse UPLC-qTof data
I have fixed the link. Thanks. But that material won't tell you how to use the function.
When you have installed the package take a look at the documentation. Hopefully it explains how to use the function itself. Otherwise please complain here and I will improve it.
The raw files can be anywhere. You pass the function a vector of paths to the raw files.

PATH is a list of folders in which the OS will always look for an executable if you try to run it. It is a so called "environmental variable". You can either 1) add the folder where you have masswolf to PATH (http://windowsitpro.com/systems-managem ... ystem-path), 2) simply dump masswolf.exe in "c:WindowsSystem32" (which is in PATH) or 3) put masswolf in your R working directory. That should work too.
177
XCMS / Re: Optimizing centWave settings for HPLC-ESI-MS Orbitrap da
This seem to be a bug with the plotPeaks display and not the actual data. Looks like the ylim on the plot is set wrong or something. Not sure.

Code: [Select]
plotEIC(xraw, mzrange = rawpeaks[1,c("mzmin","mzmax")], rtrange = rawpeaks[1,c("rtmin","rtmax")]   )
Shows a clear peak. And it is also clear if you look at the EIC in mzmine or similar.


As for the width of the mz window you can look at it like this:
Code: [Select]
mz_width <- rawpeaks@.Data[,"mzmax"] - rawpeaks@.Data[,"mzmin"]
plot(density(mz_width,adjust=0.2))

As you can see it goes all the way to 0. This is not the problem with your EIC plot but it can cause issues during fillPeaks as explained here: http://metabolomics-forum.com/viewtopic ... =598#p1853


For the warning I don't think you need to worry. I don't know what triggers it but seems it can be safely ignored:
http://metabolomics-forum.com/viewtopic.php?f=8&t=267
https://groups.google.com/forum/#!topic ... ybDDQTaQiY


Hope this helps you move head.
178
XCMS / Re: Optimizing centWave settings for HPLC-ESI-MS Orbitrap da
It would be easier to hunt down the problem if you could provide a sample file.
First idea I would check: Sometimes the orbitrap is so accurate that you get mzmin and mzmax that are the same. Perhaps that is why some EICs are completely blank if none of the real masses have exactly that value.
179
XCMS / Re: Get fold, p-value for set of EIC m/z values
For post-integration filtering you can do the following. I have used pipes and dplyr syntax since I find that the easiest and cleanest.

Code: [Select]
library(xcms)

# sample data
library(faahKO)
filepath <- system.file("cdf", package = "faahKO")
xsg <- group(faahko)
xsg <- fillPeaks(xsg)
reporttab <- diffreport(xsg)


#target list
targets <- rbind(c(mz = 328.2000, rt= 3632.839),
                c(mz = 466.2000, rt= 3695.437),
                c(mz = 495.2131, rt= 3426.267)
                )
targets <- as.data.frame(targets)


# hit tolerance
mz_tol=0.1
rt_tol=0.5*60


# filtering using pipes and dplyr
library(dplyr)
reporttab_filtered <- reporttab %>%
                      rowwise %>%
                      filter( any(    abs(mzmed-targets$mz)<mz_tol &  abs(rtmed-targets$rt)<rt_tol    ) ) %>%
                      select(name,mzmed,rtmed,fold,pvalue) %>%
                      as.data.frame
180
XCMS / Re: Get fold, p-value for set of EIC m/z values
Are you talking about simply filtering the diffreport or actually only integrating your targets in the first place?
Filtering is trivial if you supply example data. The latter requires changes in xcms. I took a look at the code and I think it should be relatively easy to add an m/z target list to centwave but it would be non-trivial to restrict by retention time prior to integration.