Skip to content

MZ_CAMERA -- Error in FUN(X, Y, ...) : object 'res' not found #7

@etrh

Description

@etrh

Jan, first of all, thank you for the extremely useful package.

I am experiencing problems when using the MZ_CAMERA function. I am not sure whether I am using it in the proper way, but I get this error:

Error in FUN(X, Y, ...) : object 'res' not found

This happens when I do this:

xsaFA <- findAdducts(xsaFI, polarity = "positive", rules = commonMZ::MZ_CAMERA(mode = "positive", warn_clash = T, clash_ppm = 30))

Also when I do this:

rules <- commonMZ::MZ_CAMERA(mode = "positive", warn_clash = T, clash_ppm = 30)

Any idea how to solve this issue?

I am using R 3.5.0 on an Ubuntu 18.04 machine.


My other question is about the usage of commonMZ alongside CAMERA. When is the appropriate time to run CAMERA with the rules provided in commonMZ? Should it be after the common CAMERA::annotate workflow? Does the following approach/order make any sense, for example?

xsa <- xsAnnotate(xset_conv, polarity = "positive", sample = c(1:dim(xset_conv@phenoData)[1]))
xsaF <- groupFWHM(xsa, perfwhm=0.6)
xsaC <- groupCorr(xsaF)
xsaFI <- findIsotopes(xsaC)
xsaFA <- findAdducts(xsaFI, polarity="positive")
xsaPL_default_CAMERA_rules <- getPeaklist(xsaFA)

positive_rule <- system.file('extdata/CAMERA_rules_pos.xlsx', package = "commonMZ")
positive_rule <- as.data.frame(readxl::read_xlsx(positive_rule))

xsaFA_contamin <- findAdducts(xsaFI, polarity = "positive", rules = positive_rule)
xsaPL_commonMZ <- getPeaklist(xsaFA_contamin)

Or is there a better approach to doing this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions