RECETOX / MFAssignR

The MFAssignR package was designed for multi-element molecular formula (MF) assignment of ultrahigh resolution mass spectrometry measurements. A number of tools for internal mass recalibration, MF assignment, signal-to-noise evaluation, and unambiguous formula selections are provided.
GNU General Public License v3.0
0 stars 3 forks source link

Recal function fails when isopeaks = "none" #45

Closed KristinaGomoryova closed 2 months ago

KristinaGomoryova commented 2 months ago

If isopeaks dataframe ("Iso" from IsoFiltR() ) is not provided and set to "none" - which is a function default, it will fail in lines 204-207:

isopeaks <- ifelse(isopeaks == "none", data.frame(mass = 1, Abundance = 1, Tag = "X"), isopeaks) # Change 12/6/19
isopeaks <- data.frame(isopeaks)
isopeaks <- isopeaks[, c(1:3)]

During the ifelse statement, instead of dataframe a list is created for some reason, which in the next step is converted to dataframe of 1 column and 1 row.

The error message is following:

Error in[.data.frame(isopeaks, , c(1:3)) : undefined columns selected