Metabolomics Society Forum

Software => R => CAMERA => Topic started by: rebecca on January 21, 2013, 04:28:16 AM

Title: Rdisop filter
Post by: rebecca on January 21, 2013, 04:28:16 AM
Hi,
I'm using the Rdisop decomposeIsotopes function in combination with CAMERA to find candidate molecular formulas for each isotope cluster.
To reduce the number of candidates, I would like to apply the filter argument: namely, I would only be interested in formulas with a positive DBE (preferably a multiple of 0.5) and an invalid N rule (because of the deprotonation in negative mode).
From the documentation of the decomposeIsotopes function, it's not clear to me how I can apply this filter directly in the function:

Arguments
...
filter    NYI, will be a selection of DU, DBE and Nitrogen rules

Many thanks for your help,
cheers,
Rebecca
Title: Re: Rdisop filter
Post by: sneumann on January 22, 2013, 08:37:56 AM
Hi,

the filter argument was a start to implement sth. along the lines of what you want,
but not finished. To be honest, Rdisop is basically in maintenance mode.

You can select "valid" formulas with normal R operations:

Code: [Select]
data <- decomposeMass(180.063, ppm=50)

dbeidx <- data$DBE >0
nitrogenidx <- data$valid == "Valid"

data$formula[dbeidx & nitrogenidx]

Yours,
Steffen