You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for the great package!
I'm trying to test it to generate possible molecules based on isotopic score.
min <- c("C3","H0","N0", "S0", "Cl0", "O0", "Br")
I have two questions:
1- It doesn't seem like that the function decomposesiotope is applying the minimum number of 3 carbon, when it generates formulas? There are few formulas with no carbon at all!
cbind(getFormula(molecules), getScore(molecules), getValid(molecules))
2- what is the order of the generated formulas, and how are they generated? Is it based on matching isotopic pattern?
I try to use isotopScore function to calculate isotopic score for my formulas that are generated using above:
molecule <- c("C8F17SO3")
masses <- c(498.9328, 500.9350, 499.9372)
intensities <- c(102, 10, 5)
isotopeScore(molecule, masses, intensities, elements = NULL, filter = NULL, z = -1)
This gives me error "$ operator is invalid for atomic vectors"
Thank you in advance for your time!
The text was updated successfully, but these errors were encountered:
Hi @Rennepink,
I am currently trying to solve issues which did arise over the last years. Si, in case you are still using Rdisop:
Regarding the first part of your issue, the functions decomposeMass and decomposeIsotopes do respect minimum and maximum allowed values for elements when specified as a moledular formula. For the next release of Rdisop I updated the help section with appropriate examples:
> # use m/z=48 as an example
> getMolecule("CHOF")$exact
[1] 48.00114
> ele <- initializeElements(c("C","H","N","O","P","S","F"))
> getFormula(decomposeMass(48, mzabs = 0.003, elements = ele))
[1] "C4" "H3NP" "CHOF"
> # works
> getFormula(decomposeMass(48, mzabs = 0.003, elements = ele, minElements = "H"))
[1] "H3NP" "CHOF"
> getFormula(decomposeMass(48, mzabs = 0.003, elements = ele, maxElements = "H2"))
[1] "C4" "CHOF"
> getFormula(decomposeMass(48, mzabs = 0.003, elements = ele, maxElements = "H2", minElements = "CHF"))
[1] "CHOF"
Regarding the second part of your issue, the function isotopeScore does allow to calculate what you intended. However, you need to provide it with a molecule as a parameter and not a formula. Also, the masses parameter should be ordered. So, to write your example corretly:
Hi,
Thank you for the great package!
I'm trying to test it to generate possible molecules based on isotopic score.
min <- c("C3","H0","N0", "S0", "Cl0", "O0", "Br")
I have two questions:
1- It doesn't seem like that the function decomposesiotope is applying the minimum number of 3 carbon, when it generates formulas? There are few formulas with no carbon at all!
cbind(getFormula(molecules), getScore(molecules), getValid(molecules))
2- what is the order of the generated formulas, and how are they generated? Is it based on matching isotopic pattern?
I try to use isotopScore function to calculate isotopic score for my formulas that are generated using above:
molecule <- c("C8F17SO3")
masses <- c(498.9328, 500.9350, 499.9372)
intensities <- c(102, 10, 5)
isotopeScore(molecule, masses, intensities, elements = NULL, filter = NULL, z = -1)
This gives me error "$ operator is invalid for atomic vectors"
Thank you in advance for your time!
The text was updated successfully, but these errors were encountered: