Comments (3)
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.
Thanks for the reply. Is there an example code snippet format the jason file from MSiGDB?
Thanks,
Shams
from spectra.
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)
- Example notebook is missing HOT 2
- GPU implementation HOT 16
- train() got an unexpected keyword argument 'label_factors' HOT 2
- spc.est_spectra stalls and go to next step after some epochs
- Unexpected spectra factors and some misc questions HOT 6
- Util function improvements HOT 1
- TypeError: SPECTRA_Model.train() got an unexpected keyword argument 'label_factors' HOT 1
- issue with self.rho = nn.ParameterDict(self.rho) HOT 2
- use_cell_types not implemented in Spectra_gpu HOT 2
- unbound local variable is_global HOT 1
- UnboundLocalError: local variable 'is_global' referenced before assignment HOT 2
- Number of cores allocation
- GPU tutorial? HOT 1
- Running Spectra with mouse data? HOT 1
- Does Spectra accept processed expression matrix as the input? HOT 1
- The meaning of gene weight? HOT 1
- Computing factor importance scores
- Specific factors vary based on global. HOT 1
- run adata.uns['SPECTRA_overlap'].index, and there are some factors without name? HOT 1
- factor importance and information scores
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spectra.