Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract isotope pattern for each feature. #54

Open
jorainer opened this issue Mar 8, 2021 · 3 comments
Open

Extract isotope pattern for each feature. #54

jorainer opened this issue Mar 8, 2021 · 3 comments
Assignees

Comments

@jorainer
Copy link
Member

jorainer commented Mar 8, 2021

Define a function that helps identifying/subsetting a Spectra to extract the isotopes.

Have: one spectrum (i.e. a peak matrix with m/z and intensity values).
Want: indices of rows in the matrix that match isotopes (e.g. list(c(4, 5, 6), c(9, 10), c(23, 24, 25)) or c(NA, 1, 1, 1, NA, NA, 2, NA, 2, NA, NA, NA, 3, 3, 3, NA, NA), which would define the grouping of peaks into isotope groups).

Things to consider:

  • single and double charged molecules.
  • intensity of isotope peak must be smaller (at least by factor xxx) than main peak.

Approach:

  • start with smallest m/z peak and iterate over all peaks in a spectrum (skipping the ones included in an isotope group).
@jorainer
Copy link
Member Author

the m/z differences and expected signal proportion should be provided as a list or data.frame (columns mz and intensity). ideally there should be a function isotopes or similar that returns that data.frame and has a parameter to allow defining whether single or double charged ions are expected and other settings (number of isotopes?).

@jorainer
Copy link
Member Author

TODOs:

  • check also the Rdisop package how isotopes are defined there.
  • evaluate other R packages that define isotopes.
  • cross-check these with definitions provided by @vveri

@jorainer
Copy link
Member Author

jorainer commented Mar 12, 2021

.isotope_peaks <- function(x, isotopeDefinition = isotopeDefinition()) {
}

#' @return `data.frame` with columns `mz` and `intensity`
isotopeDefinition <- function(charge = c(1L, 2L)) {
     data.frame(mz = c(1.0033, 0.99...), intensity = ....)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants