Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - Jan Stanstrup

196
XCMS / Re: unreliable peak intensity in report table
Hi,

I think the easiest would be if you send me one of those files so I can try to understand why it should be so slow (and if the same is true on my machine). It sounds strange. The time-consuming part is simply reading and writing the file. Should not take that long! You are not trying to do it over a network or something like that that might indeed be very slow?


Jan
199
XCMS / Re: unreliable peak intensity in report table
OK I think you have several issues here.


  • The duplicated peaks. I believe that this is due to orbitrap shoulder/satellite peaks. If you look in the mass spectra of large peaks and zoom in heavily you should see small mass peaks on both sides of the real mass peak. This is characteristic of orbitrap and is an artifact of the Fourier transformation as far as I have been able to figure out. This means that these small peaks are picked too.
    To get useful results you just need to filter out these phantom peaks. I have written a function to do that, xcmsRaw.orbifilter. You can find it in my package here: https://github.com/stanstrup/chemhelper.
    Here is an example of how to use it to create a set of "fixed" files in parallel that you can use with xcms.
    Code: [Select]
    library(xcms)
    library(chemhelper)
    library(parallel)


    files <- c(
                list.files("mzXML_POS_FS",pattern=".mzXML",full.names = T),
                list.files("mzXML_NEG_FS",pattern=".mzXML",full.names = T)
    )


    # make files and outdir into a list
    outnames <- sub(".mzXML", ".mzData", files)
    outnames <- sub("_FS", "_FS_fixed", outnames)

    input <- cbind(files,outnames)
    input <- split(input, 1:NROW(input))





    xraw_orbifix <- function(file,outname){
    require(xcms)
    require(chemhelper)
     
    xraw <- xcmsRaw(file,profstep = 0)

    xraw_out <- xcmsRaw.orbifilter(xraw,
                      windows_width=0.2,
                      max_rel_int = 0.2,
                      keep_isotopes=TRUE,
                      max_charge=5,
                      isotope_mz_tol = 0.005)


    write.mzdata(xraw_out,filename=outname)


    }





    #now make a cluster and convert in parallel
    cl <- makeCluster(detectCores())
    clusterExport(cl,c("input","xraw_orbifix")          )
    parLapply(cl,input,function(x) xraw_orbifix(x[1],x[2]))
    stopCluster(cl)

  • If the above doesn't alone fix your problem I see a couple of things that could be the cause. It is probably either the peak picking or the grouping.
    I had some samples the other day where I could not get centwave to give reasonable results. So you might also want to try matchedFilter instead. ppm=2 also seems low, even for orbitrap (remember that it needs to be true even for the ends of your peak).
    It could also be an issue with group. I find my function analyze.xcms.group from the above package useful in understanding such problems (example of the output here).
     


If you need more help you probably need to provide some sample data that shows the issue.
202
XCMS / Re: unreliable peak intensity in report table
Hi. First thing I would check is if the peak is detected in all samples prior to gap-filling. I never use diffreport but I think you can just use it with xset3 and see if some of the samples have zero intensity.
205
CAMERA / Re: Way too many ions being assigned to the same compound
1.
 I am not 100% sure but I think yes. As far as I could figure FWHM is calculated from rtmin and rtmax that changes when you do retcor.

2.
Dunno. I never used annotateDiffreport.

Looking at the code it seems it is using slightly different defaults.
Quote
annotateDiffreport
intval = "into"
Quote
groupFWHM, findIsotopes
intval = "maxo"

Maybe that is it?

3. from the CAMERA docs:
Quote
A annotation group must include at least one ion with quasi set to 1 for this adduct. If a annotation group only includes optional adducts (rule set to 0) then this group is excluded.

So in my list I require it to find either [M-H]- or [M+Cl]- to make an annotation group. If you know compounds that don't necessarily make those you can change that. I would also be interested in such examples.

4. Again not sure about the inner workings of CAMERA but I think it starts from the highest peaks. So there are probably not many groups with a high index that actually have more than one member. And hence no annotation. At least that is what I have observed.

5. Sorry dunno. I don't think there is an automagic function for that. I guess he extracted EICs a bit manually to do that plot.
206
CAMERA / Re: Way too many ions being assigned to the same compound
I am not exactly sure what you are asking but some observations:

Quote
This group is independent of the annotations iso and adduct.
The annotation is done "inside" each group so you cannot say that they are independent. But the annotation is done after the grouping and not used to define the grouping. The exception is if you put calcIso=TRUE then it is trying to annotation isotopes before grouping and using that to figure out if they belong together. That also means that if you do each step separately findIsotopes should be before groupCorr if  calcIso=TRUE. I an not sure how annotateDiffreport handles that.

I don't understand why you would set calcCiS=FALSE. You can use both calcCaS and calcCiS at the same time. In your case that is probably preferable. In your case you only have 15 samples to calculate correlations across samples (calcCaS). That is not that strong (think if linear regression, on very noisy data, with 15 points). I do myself use only calcCaS if I have a large number of samples since calcCiS can cause false positives with perfectly co-eluting peaks (a bigger problem specially on short gradients). But I would not rely only on that with only 15 samples.

In your case CAMERA said that the features in group 1 behave the same way across samples. But they appear to behave differently than the compounds in group 2. You can try to plot the intensities against each other like I did above to get an idea of what is going on.
I am not sure I understand what you mean by "evolution across all the samples". Evolution as in chromatographic profile or in relation to your study design?


You will never get perfect grouping in CAMERA because there is no clear cut-off between "features that correlate quite poorly because of intensity variations" (for example adducts are not always linearly related to the pseudo molecular ion) and "features that correlate slightly because they are strongly biologically related". All it does is give you a raw idea.
Good annotation of fragments/adducts help a lot though. But that is highly dependent on a good list of adducts and fragments. I have combined a list of adduct/fragment rules that is much larger than what comes with CAMERA and you can find that here: https://github.com/stanstrup/chemhelper ... st/extdata.

Please ask if you have more questions.
207
XCMS / Re: xcmsSet to xcmsRaw
No. The xcmsSet object does not contain the raw data. Only picked peaks.
210
XCMS / Re: QQQ MRM data
Hi,

I tried --simAsSpectra and --srmAsSpectra now but I get identical files. So I guess AB-Sciex doesn't support it...
I was exactly thinking/hoping I could read them as MSn data.