MassBank / RMassBank

Playground for experiments on the official http://bioconductor.org/packages/devel/bioc/html/RMassBank.html
Other
12 stars 15 forks source link

Example and Documentation for msmsRead MSP with FileList outdated #309

Closed sneumann closed 2 years ago

sneumann commented 2 years ago

Hi, The FileList since last year has to include a column "mode", to allow for "Processing mode per-entry from mode argument or filetable":

https://github.com/MassBank/RMassBank/blob/a39ac1105b6c87077419ddf7e3f58fb3a609a738/R/msmsRead.R#L87

https://github.com/MassBank/RMassBank/commit/72a735ab844793eb7273c3a1b05b67d3c815babb#diff-3a9229e7875e37ae3d495cff4b018b1cf8dd18bb83bf8710b58eea12101e5315R87

This seems to be not documented, and w <- msmsWorkflow(w, readMethod='msp', filetable='./Filelist.csv', mode='pH', steps=1, archivename='msp_archive') fails with Error in[.data.frame(tab, , "mode") : undefined columns selected for the example file https://github.com/MassBank/RMassBankData/blob/main/inst/msp_examples/Filelist.csv

Works with:

"Files","ID", "mode"
"1,2,4-trimethylbenzene.MSP.msp",1,"pH"

Yours, Steffen

sneumann commented 2 years ago

@meowcat, was the change intended to still work with the "old" FileList ? If so, one could do if ( "mode" %in% colnames(tab) ) ... and if not use the mode argument to the function. Does that make sense ? Yours, Steffen