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

undefined columns selected when fromDataFrame() without SME section #28

Closed
sneumann opened this issue Jan 23, 2023 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@sneumann
Copy link
Contributor

For a file exported by MS-Dial 3.98 from TripleQ data without SME section I get for

  mzTabTable <- readMzTab(mzTabfile)
  ## To turn these tables into objects, use the R6 class constructor method `new()`:
  mzTabObject <- MzTab$new()$fromDataFrame(mzTabTable)

The traceback

7: stop("undefined columns selected")
6: `[.data.frame`(df, , colnames(df) != "") at read_mz_tab.R#159
5: df[, colnames(df) != ""] at read_mz_tab.R#159
4: extractTable(mztab.table, "SEH", "SME") at read_mz_tab.R#187
3: extractSmallMoleculeEvidence(MzTabDataFrame) at mz_tab.R#210
2: MzTab$new()$fromDataFrame(mzTabTable) at #6

So

df[, colnames(df) != ""]

should check that there is an actual df to speak of :-) PR coming.
Yours, Steffen

@nilshoffmann nilshoffmann added the bug Something isn't working label Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants