Description Usage Arguments Details Author(s) Examples
View source: R/fct_findIsotopes.R
Extract all annotated isotope cluster. Returns a list with one element per cluster. A element contains the charge of the molecule and a peakmatrix with mz and intensity value.
1 | getIsotopeCluster(object, number=NULL, value="maxo", sampleIndex=NULL)
|
object |
xsAnnotate object |
number |
Set to NULL extract all isotope cluster or to specific chosen ones |
value |
Which intensity values should be extracted. Allowed values are: maxo, into, intb |
sampleIndex |
Selection vector with indexes to select from which sample(s) the intensity values should be retrieved. If set to NULL the sample is selected, which has been chosen for the pseudospectra in the grouping step |
This method extract the isotope annotation from a xsAnnotate object. The order of the resulting list is the same as the one in the peaklist, see getPeaklist
.
Carsten Kuhl <ckuhl@ipb-halle.de>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #single sample
library(CAMERA)
file <- system.file('mzdata/MM14.mzdata', package = "CAMERA")
xs <- xcmsSet(file, method="centWave", ppm=30, peakwidth=c(5,10))
an <- xsAnnotate(xs)
an <- groupFWHM(an)
an <- findIsotopes(an)
isolist <- getIsotopeCluster(an)
isolist[[10]] #get IsotopeCluster 10
#multiple sample
library(faahKO)
xs <- group(faahko)
xs <- fillPeaks(xs)
an <- xsAnnotate(xs)
an <- groupFWHM(an)
an <- findIsotopes(an)
isolist <- getIsotopeCluster(an)
#Select from multiple samples
isolist <- getIsotopeCluster(an, sampleIndex=c(1,2,5))
##Interaction with Rdisop
## Not run:
library(Rdisop)
isotopes.decomposed <- lapply(isolist,function(x) {
decomposeIsotopes(x$peaks[,1],x$peaks[,2],z=x$charge);
}) #decomposed isotope cluster, filter steps are recommended
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.