Hi, Dr. Darren,Thank you so much for developing the pipeline for the analysis of metabolomics data, it is really helpful and I am really enthusiastic to learn more about it.I am a research trainee at CTSA metabolomics core at Mayo clinic, Minnesota. I am trying to analyze a highthroughput metabolomics data from ULPC QTOF. I have converted the.d files to mzXML file using MS convert from proteo wizard. Then used XCMS, mzMatch/ Peak ML viewer for further analysis. Then I tried to import the output text file from mzMatch to IDEOM v 18. I had an error while running the identification macro.I am fresh graduate in MPH (Master of Public health) from India, have good knowledge in R, but I am very new to Metabolomics studies.Could you please advice me a solution to fix this error. I have read your Ideom tutorial Part 1 & 2, also checked the discussion of similar error in Ideom google groups.I have also tried to run the identification macro without changing the parameters, same error comes then. Please find below the commands from VBA, I couldn't understand the highlighted part.Looking forward to hear from you soonThank you,Sincerely,SitharaFor r = 1 To (groupcount)
If (r + 2) <> blankrow And setsheet.Cells(2 + r, 8) <> "Exclude" And setsheet.Cells(2 + r, 8) <> "Standards" Thennum = setsheet.Cells(2 + r, 11)
posi = setsheet.Cells(2 + r, 12)
Set samprange = adsheet.Range(Cells(q, 28), Cells(q, 27 + num)).Offset(0, posi)
dgroupcount = Application.CountIf(samprange, ">0")If (Application.Average(samprange) > intensityfilter) And num > 1 Then 'avoids strict RSD filter applying to small peak groups and to avoid error if average = 0 or only 1 sample
RSD = Application.StDev(samprange) / Application.Average(samprange)If (r + 2) = QCrow Then
adsheet.Cells(q, 19) = Application.Round(RSD, 2)
' If RSD > maxRSD Then ' check for maxRSD
' maxRSD = RSD
End If' Else
If RSD > maxRSD Then ' check for maxRSD
maxRSD = RSD
End IfIf (r + 2) = QCcolrow Then ' check for surrogate QC
adsheet.Cells(q, 19) = Application.Round(RSD, 2)
End If
' add 'Groups' if significant
If (Application.min(samprange) > blankmax) And (RSD < RSDlimit) And dgroupcount = num Then
sigtext = sigtext & "'" & setsheet.Cells(2 + r, 10)
End If
' add #detections and maxintensity
dcount = dgroupcount + dcount
maxintensity = Application.max(samprange, maxintensity)
' calculate control and treatment means
If setsheet.Cells(2 + r, 8) = "Control" Then
contnum = num
Set controlrange = samprange
controlmean = Application.Average(controlrange)
ElseIf setsheet.Cells(2 + r, 8) = "Treatment" Then
treatnum = num
Set treatrange = samprange
treatmean = Application.Average(treatrange)
End If' End If
Else ' to allow for set with single sample or low intensity to be sig
' If (r + 2) <> QCrow Then
If Application.min(samprange) > blankmax Then
sigtext = sigtext & "'" & setsheet.Cells(2 + r, 10)
End If
' End If
' add #detections and maxintensity
dcount = dgroupcount + dcount
maxintensity = Application.max(samprange, maxintensity)
' calculate control and treatment means
If setsheet.Cells(2 + r, 8) = "Control" Then
contnum = num
controlmean = Application.Average(samprange)
Set controlrange = samprange
ElseIf setsheet.Cells(2 + r, 8) = "Treatment" Then
treatnum = num
treatmean = Application.Average(samprange)
Set treatrange = samprange
End If
End If
End If
Next r'Groups'
adsheet.Cells(q, 12) = sigtext
'RSD
adsheet.Cells(q, 20) = Application.Round(maxRSD, 2)
'Detections
adsheet.Cells(q, 27) = dcount
'Maximum Intensity
If maxintensity = 0 Then
adsheet.Cells(q, 21) = 0
ElseIf maxintensity > 10 Then
adsheet.Cells(q, 21) = Application.Round(maxintensity, 0)
Else
adsheet.Cells(q, 21) = maxintensity
End If'Treat vs control
If controlmean = 0 Then
adsheet.Cells(q, 23) = treatmean / Minintensity
Else
adsheet.Cells(q, 23) = treatmean / controlmean
End If'Pvalue 'Welch's 2-tailed t-test (unequal variances assumed). default is unpaired but can be changed to paired on settings sheet
If (contnum > 1) And (treatnum > 1) Then
If (controlmean = 0) And (treatmean = 0) Then
adsheet.Cells(q, 24) = "ND"
Else
adsheet.Cells(q, 24) = Application.TTest(treatrange, controlrange, 2, statspair)
End If
End If'Fisher ratio (at end)
On Error Resume Next
If (contnum > 1) And (treatnum > 1) Then
adsheet.Cells(q, adcolno) = Application.IfError((treatmean - controlmean) ^ 2 / ((Application.StDev(treatrange) ^ 2) + (Application.StDev(controlrange) ^ 2)), 0)
ElseIf (treatnum > 1) And (treatmean > controlmean * 2) Then
adsheet.Cells(q, adcolno) = "high"
ElseIf (contnum > 1) And (controlmean > treatmean * 2) Then
adsheet.Cells(q, adcolno) = "low"
End If
On Error GoTo 0
--With regards,
Sithara Vivek,
Research trainee,Metabolomics core,
Mayo clinic,
Rochester, MN - 55902
Mobile - 704 450 0343
Email - thaara...@gmail.com