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 - Carsten

31
XCMS / Re: How do I plot the EIC for compounds XCMS has found?
Quote
Is there some documentation that explains some of these things or did you read through the code itself to figure that out?
I simply knew it ;) , because I worked a long time with xcms and use some of its functions in CAMERA. I'm not aware of any additional documentation besides the normal vignette and the man pages.
 
Quote
Another question I have is how to figure out what the groupidx for a given compound is. It doesn't appear to be related to the output of diffreport, so then I thought that it might be the row number for the output of groups(set5.filledpeaks) but it doesn't look like that's it, either.
As I mentioned in my previous post, the diffreport result is per default sorted by p-value. So the easiest way to retrieve the same order would be to call diffreport with:
Code: [Select]
diffreport(object, sortpval=FALSE)
33
XCMS / Re: How do I plot the EIC for compounds XCMS has found?
If you extract only the 4th mass feature with
Code: [Select]
MF4.cor <- getEIC(set5.filledpeaks, rt="corrected", groupidx=4)
then the xcmsEIC object contains only 1! mass feature.

So you can plot it with
Code: [Select]
plot(MF1.cor, set5.filledpeaks, groupidx=1) #not 4

But why don't you extract all with mass features as in my example with
groupidx= 1:nrow(set5.filledpeaks)
and plot afterwards the 4th?

That should work!

Carsten
34
XCMS / Re: How do I plot the EIC for compounds XCMS has found?
Hi Laura,

plotPeaks and plotCrom works only on xcmsRaw objects. So using the retention time corrected peaks within a xcmsSet you have to use the getEIC function.
I created some code snippet with the faahKO data set, which should do what you want.

Code: [Select]
library(xcms)
library(faahKO)

xs.grp  <- group(faahko)
xs.ret  <- retcor(xs.grp)
xs.grp2  <- group(xs.ret)
xs.fill <- fillPeaks(xs.grp2)

xeic.raw <- getEIC(xs.fill, rt = "raw", groupidx= 1:nrow(xs.fill@groups))
xeic.corrected <- getEIC(xs.fill, rt = "corrected", groupidx= 1:nrow(xs.fill@groups))

#plot first feature from diffreport (not sorted after pval!!)
#rt row data
plot(xeic.raw, xs.fill,groupidx=1)
#rt corrected data
plot(xeic.corrected, xs.fill,groupidx=1)
37
CAMERA / Re: How to integrate the reporttab(xcms) and getPeaklist(CAM
Hi Hemi,

I assume with reporttab you mean the outcome of diffreport(xcms) function?

For combining both results, it's very important that the diffreport result is not sorted after p-value.
Because then both tables have the same order and can be easily combined.
I show you an easy adoptable example with the faaKO data set.

Code: [Select]
library(faahKO)
library(CAMERA)

xs.grp  <- group(faahko)
xs.fp  <- fillPeaks(xs.grp)
#do not sort after pval
reporttab <- diffreport(xs.fp, sortpval=FALSE)

xsa        <- xsAnnotate(xs.fp)
xsa.grp  <- groupFWHM(xsa)
peaklist  <- getPeaklist(xsa.grp)

#combine
reporttab.combine <- cbind(reporttab, peaktable[, c("isotopes", "adduct", "pcgroup")])

Carsten
39
XCMS / Re: XCMS and fast polarity switching
With the latest xcms it should be possible to use the polarity parameter in the xcmsSet function to select only the scans from one polarity mode.
For example xcmsSet(...., polarity="positive")

Carsten
40
XCMS / Re: fillPeaks ERROR
Quote from: "Ricca"
Where can I download these old version to try it on my work pc??
If you don't have time to wait for the bugfix or want to reinstall,
you could download an older version (1.26.1) from the BioC 2.8 release (http://bioconductor.org/packages/2.8/bi ... /xcms.html).

If you need the exact 1.30.0 and you have a little experience with R and svn, you could do a direct checkout from the Bioconductor svn tree (see http://www.bioconductor.org/developers/source-control/).

You need Revision 59920, which can be checked out in a linux terminal with:
svn checkout https://hedgehog.fhcrc.org/bioconductor ... xcms@59920

Afterwards a "R CMD install xcms" installs the package, if you have all dependencies.

Carsten
41
XCMS / Re: How to repeat the workflow of XCMS Online by XCMS manual
Quote from: "hsiang"
Besides, while adding attribute of polarity to xcmsSet, the error message I mentioned before - error function (classes, fdef, mtable): unable to find an inherited method for function "findPeaks", for signature "NULL", will be shown. Actually, the polarity is an argument of xcmsSet, not of findPeaks.centWave. Therefore, I reasonably guess that was caused by  inheritance problem of R package.
It's a bug and reproducible with the latest xcms version. Will be fixed in the next release.
42
CAMERA / Re: Variable isotope labeling
Quote from: "Resveratrol99"
I have a large dataset of standard compound mixtures that have been isotope labeled to varying degrees such that the basepeak in many cases is not the monoisotopic peak.  I'd like to characterize the isotope envelope of the average MS spectrum for each compound across all my samples.  Is there way that I can use XCMS alone or together with CAMERA to export this information in batch for each compound as a .csv file? 
I'm not 100 percent positive, if I understand your problem, but I think it's possible with some R scripting. You have a list of (know) compounds and hence also their m/z value
and you want to retrieve the isotope intensities from all aligned samples. Is that so far correct?

Quote from: "Resveratrol99"
My initial attempts using default settings to create the xcmsSet object together with the findIsotopes function is not doing a good job finding isotopes in the test file I'm using.  I noticed there is a C12/C13 ratio slot with 3 possible settings (not sure what they mean) that may prevent analysis of my data.
The isotope detection assumes, as a general screening, unmodified/unlabled compounds, so this moderate performance is not surprising.
The next update for CAMERA includes a possibility to adjusted the allowed m/z differences and the intensity window, so molecules with heteroatoms like Cl should be recognized.
But as I mentioned above, a small script should solve your problem.
43
CAMERA / Re: Compounds containing Cl, Br or S
Compounds with heteroatoms like CL or Br are still difficult to handle, because of there influence on the pattern and the mass difference between the isotopes.
In one of the upcoming updates, it will be possible to adjusted the expected number of the common heteroatoms to achieve a better isotope recognition.

At the moment it could be that the mass differences of the second isotope peak is more then CAMERA expect.
But you should be able to retrieve one cluster, if you compensate that with a relaxation of the allowed error.

Carsten
44
CAMERA / Re: Isotope annotation and grouping: approach question
Hi Corey,

in general we assume that all features originating from one substance share high EIC correlations. Correlation to features from other substances are significant lower or occur by change.
So both algorithms work in two parts, where the first is identical.
As first step we calculate the pairwise EIC correlation matrix between all features of one group (normally predefined from groupFWHM)
Afterwards we build a graph with features as nodes. For the edges we use the correlation value integrated with additional information like recognized isotopes.

The methods differs at the following second step. If the predefined group contains more than one compound (coeluting substances), both algorithms try to separate them on graph level.
The hcs algorithm tries to create high connected subgraphs by cutting low correlation edges. This produces the desired highly connected subgraphs.
The lpc algorithm labels all features with a unique number and then updating the labels by majority voting of the neighboring features under consideration of the edge weight. This produces consensus groups with a unique label.
Both methods return the separated feature groups.

From my experience the hcs produces more singletons due to the edge cutting whether the lpc tends to hold compound ions better together.

Quote from: "cbroeckl"
Would they work as tools to group features without going through the groupFWHM steps first?

In general based on the implementation, it is possible to use groupCorr without groupFWHM. In this case all ions are considered as one big group. I would suggested the use of the lpc, because the hcs runs into runtime and memory problems with large groups, and the lpc is stated as "near linear time". But I would expect a quite larger runtime.
45
CAMERA / Re: neutral losses XCMS online
I'm not directly involved in the development of XCMS online, so I can't say anything on that topic.
Perhaps Ralf can say something on the development schedule.