GithubHelp home page GithubHelp logo

Comments (8)

rickhelmus avatar rickhelmus commented on August 12, 2024

Hi Leon,

Doesn't ring any bells here, perhaps some data is missing via the import, but that's just guessing. Would it be possible to share some of the objects (fGroupsPO, fGroupsXCMS, comp or just the whole session), so I can debug the problem myself?

Thanks,
Rick

from patroon.

LeonSaal avatar LeonSaal commented on August 12, 2024

Hi Rick,

thanks for the quick reply!
I have a small update: I was playing around with the consensus-function and the same error occured, when the uniqueFrom-keyword was set to a single value:

> comp = comparison(fGroupsPO, fGroupsXCMS, groupAlgo="xcms3")
> uniquePO = consensus(comp, uniqueFrom=1, uniqueOuter=TRUE)
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'i' in selecting a method for function '[': error in evaluating the argument 'x' in selecting a method for function '%in%': attempt to set an attribute on NULL

With all or multiple values there is no problem:

> outer = consensus(comp, uniqueFrom=TRUE, uniqueOuter=TRUE)
Generating consensus features...Done!
Generating consensus feature groups...
  |==================================================================================================================| 100%

For further investigation, here are the fGroups: fGroups.zip

Kind regards,

Leon

from patroon.

LeonSaal avatar LeonSaal commented on August 12, 2024

Further digging showed, the error is happening inside unique():

> outerFrom = 1
> which = names(comp)[outerFrom]
> patRoon::unique(comp@comparedFGroups, which = which)
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'i' in selecting a method for function '[': error in evaluating the argument 'x' in selecting a method for function '%in%': attempt to set an attribute on NULL

Snippet was based on:

if (!is.null(uniqueFrom))
{
if (!is.character(uniqueFrom))
uniqueFrom <- names(obj)[uniqueFrom]
comparedFGroups <- unique(comparedFGroups, which = uniqueFrom,
outer = uniqueOuter)

from patroon.

rickhelmus avatar rickhelmus commented on August 12, 2024

Hi Leon,

Thanks for the files and further investigation.

In the end it seems that the XCMS structure is incomplete, and the error happens somewhere in the XCMS code. Under some circumstances, patRoon tries to 'emulate' an XCMS object in case insufficient data is available. The comparison() function is an example of this: it sort-of creates pseudofeatures from the input fGroups objects, meaning that these have no information such as actual raw data with spectra. Where it goes wrong now is that when unique() is called, the analyses of the object are subset, triggering an synchronization of the internal XCMS object (xdata slot), which then gives the error. I will see if this is fixable, or otherwise perhaps simply disable the object synchronization for these edge cases.

Perhaps in the meanwhile you could switch to another algorithm where you call comparison()?

Thanks,
Rick

from patroon.

rickhelmus avatar rickhelmus commented on August 12, 2024

Hi @LeonSaal ,

I just pushed some small changes that should initialize some missing data. Could you please test it? I also hope it doesn't break anything else, so feedback for that is welcome too ;-)

Thanks,
Rick

from patroon.

LeonSaal avatar LeonSaal commented on August 12, 2024

Hi @rickhelmus,

thanks for the update!
I tested my script with the new docker image (sha256:cb3ebbd12561c2e7e11850f9e900ab464a85ca718de43932759a30786a0709e6), but unfortunately, the error still persists with comparison(..., groupAlgo="xcms3"). However, as you suggested, with groupAlgo="openms", it works!

Kind regards,
Leon

from patroon.

rickhelmus avatar rickhelmus commented on August 12, 2024

Hi Leon,

Sorry for my late reply again...

But great things are working now for you. I totally forgot to mention, but even with the fix I pushed for xcms3 you would still need to clearout some of the cached data to avoid running in the problem. If it's not too much trouble, maybe you could re-try without cached data to see if it works? Then we can close this issue. Instead of wiping the whole cache, I think it would be sufficient to run clearCache("XCMS").

Thanks,
Rick

from patroon.

LeonSaal avatar LeonSaal commented on August 12, 2024

Hi Rick,

thanks for the tip with the cache! Indeed, it works now with the groupAlgo = "xcms3".

Kind regards,
Leon

from patroon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.