Giter Site home page Giter Site logo

Comments (10)

falexwolf avatar falexwolf commented on May 25, 2024

OK! We will try to add this as soon as possible.

Currently, you can work around this by adding all genes that you find interesting as annotation, for example, following code similar to

    # TC (Nat Im review 2014 Yui)
    tc_surface_receptors = ['Flt3', 'Cd44', 'Il2ra', 'Il7r', 'Cd3e', 'Cd4', 'Cd8a']
    tc_markers = [
        'Gata2', 'Hoxa9', 'Meis1', 'Lmo2', 'Mef2c', 'Gfi1b', 'Lyl1', 'Spi1', 'Bcl11a', 'Hhex', 'Mycn', 'Erg', 'Tcf3',
        'Ikzf1', 'Tcf12', 'Notch1', 'Runx1', 'Gfi1', 'Myb', 'Myc', 'Gata3', 'Tcf7', 'Ets1', 'Hes1', 'Ahr', 'Tcf12',
        'Bcl11b', 'Notch3', 'Spib', 'Ets2', 'Lef1', 'Rorc', 'Id3',
    ]
    # DC, NK (Abcam poster)
    dc_markers = ['Itgax', 'Cd24a', 'Ptprc']
    nk_markers = ['Itgam', 'Il2rb', 'Klrb1', 'Ncr1']
    all_markers = tc_surface_receptors + tc_markers + dc_markers + nk_markers
    adata.smp[all_markers] = adata[:, all_markers].X

from scanpy.

wangjiawen2013 avatar wangjiawen2013 commented on May 25, 2024

Do you plan to publish scanpy on a high impact factor journal later? Some people argue that bioAxiv is not a serious journal and we are a little worried. After all, it will take us much time to follow scanpy.

from scanpy.

falexwolf avatar falexwolf commented on May 25, 2024

Scanpy will very soon be published in a high impact journal (we're currently in the revision). I'll let you know about this.

from scanpy.

falexwolf avatar falexwolf commented on May 25, 2024

We're still hesitant about making AnnData more complex, for these reasons:

  • It is not inefficient to load multiple versions of the full data into AnnData.
  • It is not straightforward to determine the point of the preprocessing at which one would want to save a version of the raw data (probably after filtering out cells and taking the logarithm, but this might change in the future).
    As the second point implies that some manual intervention would be necessary, anyway, we tend to leave it to the user to keep track of one, two or more versions of the data; each with annotations that can easily be exchanged.

Specifically, would you be happy to proceed as in differential expression tests, see e.g., https://github.com/theislab/scanpy_usage/blob/master/170505_seurat/seurat.ipynb? You keep track of two versions of the data, one for doing all the machine learning inference and another one for doing statistics and plotting.

Using the linked example: for plotting, you would simply need to add the visualization basis to the AnnData that stores the raw data. Then you call sc.pl.tsne.

adata_corrected = sc.read('pbmc3k_corrected')
adata_raw = sc.read('pbmc3k_filtered_raw_log')
adata_raw.smpm['X_tsne'] = adata_corrected.smpm['X_tsne']
adata_raw.smpm['X_pca'] = adata_corrected.smpm['X_pca']
sc.pl.tsne(adata_raw, color='NKG7')

from scanpy.

falexwolf avatar falexwolf commented on May 25, 2024

Finally, we could solve this elegantly without sacrificing a scalable design, as shown in the tutorial.

Also, Scanpy is accepted in Genome Biology and will soon be published.

Merry Christmas! :)
Alex

from scanpy.

wangjiawen2013 avatar wangjiawen2013 commented on May 25, 2024

Can you extend scanpy functions so that I can show gene expression level on plot generated by sc.pl.diffmap? just like that monocle2 does.

from scanpy.

wangjiawen2013 avatar wangjiawen2013 commented on May 25, 2024

And, in which step should I execute MNN batch effect correction ? Is it still necessary to regress out some variables ( n_counts, percent_mito et al.,) when I execute MNN ?

from scanpy.

maximilianh avatar maximilianh commented on May 25, 2024

from scanpy.

falexwolf avatar falexwolf commented on May 25, 2024

Is clarified in #168.

from scanpy.

maximilianh avatar maximilianh commented on May 25, 2024

Oh so wangjiawen2013 means to color in genes that were not filtered out? I see that makes sense. I was wondering if monocle can color by multiple genes in the same plot, but apparently I was completely on the wrong track here.

from scanpy.

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.