GithubHelp home page GithubHelp logo

Annotation format requirement about spectra HOT 3 CLOSED

kvshams avatar kvshams commented on June 27, 2024
Annotation format requirement

from spectra.

Comments (3)

wallet-maker avatar wallet-maker commented on June 27, 2024 1

Hi Shams,

my apologies for the late response. Yes, you can use an entire pathway database like the C2 bundle from MSigDB. The important thing is you format the gene set annotation dictionary correctly.

The dictionary has to include all cell types from your adata cell type annotations as keys. Since most databases will not give you annotations which cell types their gene sets are specific to, you will have to 1) either annotate the cell types yourself or 2) set all gene sets as global (both approaches should be fine you can look empirically what works for you).

gene_set_dictionary = {'celltype_1':{'gene_set_1':['gene_a', 'gene_b', 'gene_c'], 'gene_set_2':['gene_c','gene_a','gene_e','gene_f']},

'celltype_2':{'gene_set_1':['gene_a', 'gene_b', 'gene_c'], 'gene_set_3':['gene_a', 'gene_e','gene_f','gene_d']},

'celltype_3':{},

'global':"{'gene_set_4':['gene_m','gene_n']}

Having said that, we believe that best results can be obtained by limiting the number of gene sets to coherent interpretable genes of similar size and with limited redundancy (please see the manuscript Supplementary Methods for further detail https://doi.org/10.1101/2022.12.20.521311 ). We also offer a package to select gene sets for Spectra which we will update with an extended set of annotations (including cancer cell and stroma cell gene sets) in the near future https://github.com/wallet-maker/cytopus .

Let me know if that helps

from spectra.

kvshams avatar kvshams commented on June 27, 2024

Thanks for the reply. Is there an example code snippet format the jason file from MSiGDB?
Thanks,
Shams

from spectra.

wallet-maker avatar wallet-maker commented on June 27, 2024

Hi Shams,
we do not provide a code snippet, but you will find an explanation in the tutorial how to configure the dictionary. The easiest way would be to run this will use_celltype=False in the est_spectra function. We now provide an example in the tutorial.

https://github.com/dpeerlab/spectra/blob/main/notebooks/example_notebook.ipynb

Thank you,
Thomas

from spectra.

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.