Read.TextData function to read peak table for 2.2: Functional Analaysis Global Metabolomics Workflow, Case Study 2

Hi, I’m running the following commands on the example data for Case Study 2 (Functional Analysis of Global Metabolomics):

library(MetaboAnalystR)
download.file('https://raw.githubusercontent.com/Zhiqiang-PANG/MetaboRaw/master/examples/malaria_feature_table.csv',
              #destfile = 'malaria_feature_table.csv', mode = 'auto')

mSet <- InitDataObjects('mass_table', 'mummichog', FALSE)
mSet <- SetPeakFormat(mSet, 'colu')
mSet <- UpdateInstrumentParameters(mSet, 4.3, 'positive', 'yes', 0.02);
mSet <- SetRTincluded(mSet, 'seconds')

# Read Peak table
path <- '/home/aa8417/551_final_proj/MetaboAnalystR/malaria_feature_table.csv'
mSet <- Read.TextData(mSet, filePath=path, format = "rowu", lbl.type = "disc", nmdr = FALSE)
#mSet <- Read.TextData(mSet, path, "mpt", "disc")
mSet <- SanityCheckMummichogData(mSet)

I keep getting the following error:

Error in Read.TextData(mSet, filePath = path, format = "rowu", lbl.type = "disc",  : 
  object '"disc"' not found

Not too sure how to resolve the error – any help would be greatly appreciated. I checked the path of my file and it is correct, I double-checked the spelling of everything – also all correct.

Thanks!

Just by reading your code, I see you switch to using double quote "" instead of single quote '' after setting the path . Maybe you should keep using the same single quote, i.e. ‘disc’, not “disc”.