Filtervariable

Hello,
I got following error while trying to do analysis in metaboanalsytR.

rawData ← ImportRawMSData(NULL, tar_path, plotSettings = SetPlotParam(Plot=FALSE))
Not a real initialized mSet found, will re-initialize one automatically !

Step 2/6: Start to import the spectrum!
This step will take a short time…
Raw file import begin…
Step 2/6: Successfully imported raw MS data! (2023-06-13 23:28:46.081761)
Going to the next step…
Warning message:
In ImportRawMSData(NULL, tar_path, plotSettings = SetPlotParam(Plot = FALSE)) :
No metadata provided, all files in one sub-folder will be considered a group!

rawData ← ImportRawMSData(NULL, metaboanalyst_input.csv, plotSettings = SetPlotParam(Plot=FALSE))
Not a real initialized mSet found, will re-initialize one automatically !
Error: object ‘metaboanalyst_input.csv’ not found
rawData ← ImportRawMSData(NULL, “metaboanalyst_input.csv”, plotSettings = SetPlotParam(Plot=FALSE))
Not a real initialized mSet found, will re-initialize one automatically !

ERROR: No standard MS file found ! Please check the extension of your data.
Error in ImportRawMSData(NULL, “metaboanalyst_input.csv”, plotSettings = SetPlotParam(Plot = FALSE)) :

In addition: Warning message:
In Path2Files(path = path) :
Wrong file format detected, Only mzML, mzXML, mzData or CDF will be included.

rawData ← ImportRawMSData(NULL,tar_path, plotSettings = SetPlotParam(Plot=FALSE))
Not a real initialized mSet found, will re-initialize one automatically !

Step 1/6: Start to import the spectrum!
This step will take a short time…
Raw file import begin…
Step 1/6: Successfully imported raw MS data! (2023-06-13 23:32:01.835412)
Going to the next step…
Warning message:
In ImportRawMSData(NULL, tar_path, plotSettings = SetPlotParam(Plot = FALSE)) :
No metadata provided, all files in one sub-folder will be considered a group!

mSet ← PerformPeakProfiling(rawData,param_optimized$best_parameters,

  •                          plotSettings = SetPlotParam(Plot = T))
    

6 CPU Threads will be used for peak profiling !

Step 3/6: Started peak picking! This step will take some time…
Warning messages:
1: In PerformPeakProfiling(rawData, param_optimized$best_parameters, :
Param is missing. Will use the default generic/general params,
but optimization with PerformParamsOptimization is strongly recommanded !
2: In doTryCatch(return(expr), name, parentenv, handler) :
display list redraw incomplete
3: In doTryCatch(return(expr), name, parentenv, handler) :
invalid graphics state
4: In doTryCatch(return(expr), name, parentenv, handler) :
invalid graphics state

rawData ← ImportRawMSData(NULL,raw_data, plotSettings = SetPlotParam(Plot=FALSE))
Not a real initialized mSet found, will re-initialize one automatically !
Error in path.expand(path) : invalid ‘path’ argument
rawData ← ImportRawMSData(NULL,“~/raw_data”, plotSettings = SetPlotParam(Plot=FALSE))
Not a real initialized mSet found, will re-initialize one automatically !
Error in Path2Files(path = path) : Invalid path provided, please check!
In addition: Warning messages:
1: In doTryCatch(return(expr), name, parentenv, handler) :
display list redraw incomplete
2: In doTryCatch(return(expr), name, parentenv, handler) :
invalid graphics state
3: In doTryCatch(return(expr), name, parentenv, handler) :
invalid graphics state
4: In doTryCatch(return(expr), name, parentenv, handler) :
display list redraw incomplete
5: In doTryCatch(return(expr), name, parentenv, handler) :
invalid graphics state
6: In doTryCatch(return(expr), name, parentenv, handler) :
invalid graphics state
7: In normalizePath(path) :
path[1]=“/Users/prabinadhiren/raw_data”: No such file or directory
rawData ← ImportRawMSData(NULL,raw_data, plotSettings = SetPlotParam(Plot=FALSE))
Not a real initialized mSet found, will re-initialize one automatically !
Error in path.expand(path) : invalid ‘path’ argument
rawData ← ImportRawMSData(NULL,“raw_data”, plotSettings = SetPlotParam(Plot=FALSE))
Not a real initialized mSet found, will re-initialize one automatically !
Error in Path2Files(path = path) : Invalid path provided, please check!
In addition: Warning message:
In normalizePath(path) : path[1]=“raw_data”: No such file or directory
rawData ← ImportRawMSData(NULL,tar_path, plotSettings = SetPlotParam(Plot=FALSE))
Not a real initialized mSet found, will re-initialize one automatically !

Step 1/6: Start to import the spectrum!
This step will take a short time…
Raw file import begin…
Step 1/6: Successfully imported raw MS data! (2023-06-13 23:36:27.280722)
Going to the next step…
Warning message:
In ImportRawMSData(NULL, tar_path, plotSettings = SetPlotParam(Plot = FALSE)) :
No metadata provided, all files in one sub-folder will be considered a group!

mSet ← PerformPeakProfiling(rawData,param_optimized$best_parameters,

  •                          plotSettings = SetPlotParam(Plot = T))
    

6 CPU Threads will be used for peak profiling !

Step 3/6: Started peak picking! This step will take some time…
ROI searching under 5 ppm … Detecting peaks in 239314 regions of interest of 1a.mzML … OK: 16267 found.

ROI searching under 5 ppm … Detecting peaks in 274940 regions of interest of 3a.mzML … OK: 15289 found.

ROI searching under 5 ppm … Detecting peaks in 313501 regions of interest of 2a.mzML … OK: 17757 found.

Step 3/6: Peak picking finished ! (2023-06-13 23:41:32.997367)

Step 4/6: Started peak alignment! This step is running…
Total of 12795 slices detected for processing… Done !
Going to the next step…
No blank sample included based on grouping info. Skipped!
PeakGroup – loess is used for retention time correction…
Performing retention time correction using 4561 peak groups.
Applying retention time adjustment to the identified chromatographic peaks … Done !
Total of 12795 slices detected for processing… Done !
Going to the next step…
Step 4/6: Peak alignment finished ! (2023-06-13 23:42:00.036178)

Step 5/6: Started peak filling! This step may take some time…
Starting peak filling!
Defining peak areas for filling-in…
No missing peaks present.
Step 5/6: Peak filing finished ! (2023-06-13 23:42:00.995636)
Peak Profiling finished successfully !
Begin to plotting figures…Done !
Warning message:
In PerformPeakProfiling(rawData, param_optimized$best_parameters, :
Param is missing. Will use the default generic/general params,
but optimization with PerformParamsOptimization is strongly recommanded !

annParams ← SetAnnotationParam(polarity = “negative”, mz_abs_add = 0.005)
annotPeaks ← PerformPeakAnnotation(mSet, annParams)

Step 6/6: Starting Peak Annotation…
Start grouping after retention time.
Created 470 pseudospectra.
Generating peak matrix…
Run isotope peak annotation…
Found isotopes:1532
Start grouping after correlation…
Generating EIC’s…
Detecting 1a.mzML … 2972 peaks found!
Detecting 2a.mzML … 2569 peaks found!
Detecting 3a.mzML … 1615 peaks found!
Calculating peak correlations in 470 Groups…
Calculating graph cross linking in 470 Groups…
New number of ps-groups: 3198
mSet has now 3198 groups, instead of 470 !
Generating peak matrix for peak annotation!
Polarity is set in annotaParam: negative
Ruleset could not read from object! Recalculating…
Calculating possible adducts in 3198 Groups…
Step 6/6: Successfully performed peak annotation! (2023-06-13 23:44:32.937348)
Going to the final step…

maPeaks ← FormatPeakList(annotPeaks, annParams, filtIso =F, filtAdducts = FALSE, missPercent = 1)
write.csv(maPeaks@dataSet, file = “metaboanalyst_input.csv”,row.names = F)
mSet<-InitDataObjects(“pktable”, “stat”, FALSE)
mSet<-Read.TextData(mSet, “metaboanalyst_input.csv”, “colu”, “disc”)
Error in Read.TextData(mSet, “metaboanalyst_input.csv”, “colu”, “disc”) :
object ‘“disc”’ not found
mSet<-Read.TextData(mSet, “metaboanalyst_input.csv”, “colu”)
Error in Read.TextData(mSet, “metaboanalyst_input.csv”, “colu”) :
object ‘“colu”’ not found
mSet<-Read.TextData(mSet, “metaboanalyst_input.csv”)
Error in Read.TextData(mSet, “metaboanalyst_input.csv”) :
object ‘“metaboanalyst_input.csv”’ not found

Read the text data into the mSet object

anal.type ← “regression”

Read text data into an mSet object

mSet ← Read.TextData(file = “metaboanalyst_input.csv”)
Error in *tmp*$dataSet : $ operator is invalid for atomic vectors

Access the data within the mSet object

data ← exprs(mSet) # or assay(mSet)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘exprs’ for signature ‘“NULL”’
write.csv(maPeaks@dataSet, file = “metaboanalyst_input.csv”,row.names = F)
mSet<-InitDataObjects(“pktable”, “stat”, FALSE)
mSet<-Read.TextData(mSet, “metaboanalyst_input.csv”)
Error in if (mSetObj$dataSet$paired) { : argument is of length zero
write.csv(maPeaks@dataSet, file = “metaboanalyst_input.csv”,row.names = F)
mSet<-Read.TextData(mSet, “metaboanalyst_input.csv”)
Error in if (mSetObj$dataSet$paired) { : argument is of length zero
mSet<-Read.TextData(mSet1, “metaboanalyst_input.csv”)
Error: object ‘mSet1’ not found
mSet1 ← FormatPeakList(mSet = mSet, annParams, filtIso =F, filtAdducts = FALSE,missPercent = 1)
Error in mSet@WorkingDir :
no applicable method for @ applied to an object of class “NULL”
mSet ← PerformPeakProfiling(rawData,param_optimized$best_parameters,

  •                          plotSettings = SetPlotParam(Plot = T))
    

6 CPU Threads will be used for peak profiling !

Step 3/6: Started peak picking! This step will take some time…
ROI searching under 5 ppm … Detecting peaks in 274940 regions of interest of 3a.mzML … OK: 15289 found.

ROI searching under 5 ppm … Detecting peaks in 239314 regions of interest of 1a.mzML … OK: 16267 found.

ROI searching under 5 ppm … Detecting peaks in 313501 regions of interest of 2a.mzML … OK: 17757 found.

Step 3/6: Peak picking finished ! (2023-06-13 23:52:48.205892)

Step 4/6: Started peak alignment! This step is running…
Total of 12795 slices detected for processing… Done !
Going to the next step…
No blank sample included based on grouping info. Skipped!
PeakGroup – loess is used for retention time correction…
Performing retention time correction using 4561 peak groups.
Applying retention time adjustment to the identified chromatographic peaks … Done !
Total of 12795 slices detected for processing… Done !
Going to the next step…
Step 4/6: Peak alignment finished ! (2023-06-13 23:53:16.086768)

Step 5/6: Started peak filling! This step may take some time…
Starting peak filling!
Defining peak areas for filling-in…
No missing peaks present.
Step 5/6: Peak filing finished ! (2023-06-13 23:53:17.112173)
Peak Profiling finished successfully !
Begin to plotting figures…Done !
Warning message:
In PerformPeakProfiling(rawData, param_optimized$best_parameters, :
Param is missing. Will use the default generic/general params,
but optimization with PerformParamsOptimization is strongly recommanded !

annParams ← SetAnnotationParam(polarity = “negative”, mz_abs_add = 0.005)
annotPeaks ← PerformPeakAnnotation(mSet, annParams)

Step 6/6: Starting Peak Annotation…
Start grouping after retention time.
Created 470 pseudospectra.
Generating peak matrix…
Run isotope peak annotation…
Found isotopes:1532
Start grouping after correlation…
Generating EIC’s…
Detecting 1a.mzML … 2972 peaks found!
Detecting 2a.mzML … 2569 peaks found!
Detecting 3a.mzML … 1615 peaks found!
Calculating peak correlations in 470 Groups…
Calculating graph cross linking in 470 Groups…
New number of ps-groups: 3198
mSet has now 3198 groups, instead of 470 !
Generating peak matrix for peak annotation!
Polarity is set in annotaParam: negative
Ruleset could not read from object! Recalculating…
Calculating possible adducts in 3198 Groups…
Step 6/6: Successfully performed peak annotation! (2023-06-13 23:54:30.215441)
Going to the final step…

maPeaks ← FormatPeakList(annotPeaks, annParams, filtIso =F, filtAdducts = FALSE, missPercent = 1)
mSet<-Read.TextData(mSet, “metaboanalyst_input.csv”)
Error in *tmp*$dataSet : $ operator not defined for this S4 class

Read the text data into the mSet object

anal.type ← “regression”

Read text data into an mSet object

mSet ← Read.TextData(file = “metaboanalyst_input.csv”)
Error in *tmp*$dataSet : $ operator is invalid for atomic vectors

Access the data within the mSet object

data ← exprs(mSet) # or assay(mSet)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘exprs’ for signature ‘“mSet”’

Read text data using read.csv()

data ← read.csv(“metaboanalyst_input.csv”)

Create an mSet object

mSet ← list(dataSet = data)

Further processing with the mSet object…

mSet1 ← SanityCheckData(mSet)
print(mSet1)
[1] 0
mSet<-FilterVariable(mSetObj = mSet, “iqr”, “F”, 25)
Error in qs::qread(“data_proc.qs”) : Failed to open file for reading.

  • Does the file exist?
  • Do you have file permissions?
  • Is the file name long? (usually 255 chars)

What does it mean? There were some warnings which I was ignoring, but I think those warnings were the reason why I was not able to use FilterVariable correctly.

Appreciate the help.
Thank you!