Skip to content

Adding MAGIC to Scanpy #187

Closed
Closed

Description

@scottgigante

Hi,

We spoke a while ago about adding PHATE and eventually MAGIC to Scanpy. MAGIC has just been submitted to CRAN and is in a stable state.

How should a tool such as MAGIC interact with Scanpy? Do you currently have any imputation methods included in the package that I can use to model the API?

Thanks,
Scott

Activity

  1. falexwolf commented on Jul 3, 2018

    @falexwolf
    Member

    Hi Scott,

    sure, I remember! 😄 For some reason, I forgot to mention you personally in the release notes, is now fixed. Sorry about that!

    You could add MAGIC as a preprocessing similar to DCA in the imputation section: http://scanpy.readthedocs.io/en/latest/api/index.html#preprocessing-pp.

    In terms of code, I would also adapt the conventions of DCA: https://github.com/theislab/scanpy/blob/master/scanpy/preprocessing/dca.py

    We had some discussions on how to do this best: #142 and #186.

    If you think you have better conventions, happy to adopt these. DCA is also not yet released...

    Best,
    Alex

  2. wangjiawen2013 commented on Jul 9, 2018

    @wangjiawen2013

    @falexwolf
    MAGIC uses root square transformation, not the frequently used log transformation, which causes the incompatibility with batch correction methods, such as CCA and MNN. Is DCA compatible with MNN and CCA ?

  3. scottgigante commented on Jul 9, 2018

    @scottgigante
    ContributorAuthor

    @wangjiawen2013 we recommend using square root transform with MAGIC but it's certainly not incompatible. So long as the inputs have been library size normalized and transformed with any of log, sqrt, arcsinh or some other sublinear transformation, MAGIC will work just fine.

  4. scottgigante commented on Jul 9, 2018

    @scottgigante
    ContributorAuthor

    Also I'm surprised to see I never left a note on your message @falexwolf : thanks! I'm working on the API now, will send in a PR when it's done or leave a note here if I think the DCA API could do with some modification.

  5. wangjiawen2013 commented on Jul 12, 2018

    @wangjiawen2013

    I find some negative values in the imputation data, how did them generate ?

  6. scottgigante commented on Jul 12, 2018

    @scottgigante
    ContributorAuthor

    @wangjiawen2013 if you have any questions about MAGIC, I recommend you post them in the MAGIC repo. The negative values are an artifact of the imputation process, but the absolute values of expression are not really important, since normalized scRNAseq data is only really a measure of relative expression anyway.

  7. added a commit that references this issue on Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions