Comments (10)
I tried defining scplus_genes before the line of code you highlighted. So far it appears to have solved the issue.
from scenicplus.
Thank you! That seemed to work but now I am getting a new error
from scenicplus.
Thank you! That seemed to work but now I am getting a new error
Okay, concatenate error solved for my part. I am just going to assume you processed your RNA-seq data in Seurat.
I did this to fix the issue. It was damn near impossible to find the source of the error, but in the end it turned out to be an issue with how seurat exports h5ad files. For some reason it doesn't save the gene names in the right place, which means that the ACC_GEX.h5mu file you generate won't have the gene names stored correctly either.
import scanpy as sc
adata = sc.read("rna.h5ad")
new_adata = adata.raw.to_adata()
new_adata.var_names = adata.raw.var['_index'] #Or whatever your index is called
new_adata.var_names.name = None
new_adata.raw = new_adata
sc.pp.normalize_total(new_adata, target_sum=1e4)
sc.pp.log1p(new_adata)
new_adata.write("rna_new.h5ad")
And then just use the new file in your config script.
Hope this works for you too. If so, then your next error will probably be this:
If you do get this error, updating dask to 2024.4.1 seems to fix it even though it warns you that it is not compatible with scenicplus
Also side note. If my assumption that you worked with seurat is correct, you may also have to go back into R and make sure to delete scale.data, because:
Add assay data
assay.group <- source[['assays']][[assay]]
if (source$index()[[assay]]$slots[['scale.data']]) {
x.data <- 'scale.data'
raw.data <- 'data'
} else {
x.data <- 'data'
raw.data <- if (source$index()[[assay]]$slots[['counts']]) {
'counts'
} else {
NULL
}
}
The data being called "raw.data" is not actually raw
(Snippet from seurat-disk convert.R
from scenicplus.
Hmmm that sounds strange
I literally just did this:
pip install dask==2024.4.1
And ran it again and then it worked
from scenicplus.
Hi @orian116
This is an issue with your genome annotation file (this should contain a column named "Gene").
Can you show the head of genome_annotation.tsv
All the best,
Seppe
from scenicplus.
Hi @SeppeDeWinter
Here is the head and tail of my genome annotation file. It does have the 'Gene' column:
from scenicplus.
I have this exact same issue and also do have the "Gene" column in my gene_annotation.tsv
from scenicplus.
@SeppeDeWinter I have narrowed down the error a bit. It seems like in the gene_search_space.py function, the column names are present before running pr_gene_annotation = pr.PyRanges(gene_annotation.query("Gene in @scplus_genes").copy()) but not after. I will try converting to a pyranges object without this. What file is "@scplus_genes" referencing? Here's a snippet of the code.
from scenicplus.
Yea same here. No objects to concatenate... Stuck on the same thing.
from scenicplus.
Thank you! That seemed to work but now I am getting a new error
Okay, concatenate error solved for my part. I am just going to assume you processed your RNA-seq data in Seurat. I did this to fix the issue. It was damn near impossible to find the source of the error, but in the end it turned out to be an issue with how seurat exports h5ad files. For some reason it doesn't save the gene names in the right place, which means that the ACC_GEX.h5mu file you generate won't have the gene names stored correctly either.
import scanpy as sc
adata = sc.read("rna.h5ad") new_adata = adata.raw.to_adata() new_adata.var_names = adata.raw.var['_index'] #Or whatever your index is called new_adata.var_names.name = None new_adata.raw = new_adata sc.pp.normalize_total(new_adata, target_sum=1e4) sc.pp.log1p(new_adata) new_adata.write("rna_new.h5ad")
And then just use the new file in your config script.
Hope this works for you too. If so, then your next error will probably be this:
If you do get this error, updating dask to 2024.4.1 seems to fix it even though it warns you that it is not compatible with scenicplus
Also side note. If my assumption that you worked with seurat is correct, you may also have to go back into R and make sure to delete scale.data, because:
Add assay data
assay.group <- source[['assays']][[assay]] if (source$index()[[assay]]$slots[['scale.data']]) { x.data <- 'scale.data' raw.data <- 'data' } else { x.data <- 'data' raw.data <- if (source$index()[[assay]]$slots[['counts']]) { 'counts' } else { NULL } }
The data being called "raw.data" is not actually raw (Snippet from seurat-disk convert.R
How did you get to upgrade dask without upgrading pandas? When I run scenicplus after following your steps, I get an error for is_categorical being deprecated
from scenicplus.
Related Issues (20)
- Parameters of scenicplus
- Issue installing scenicplus HOT 3
- Update docs
- The version of dask may need to be updated to be compatible with python 3.11.9. HOT 1
- The tutorial for starting analysis with counting matrices cannot be opened HOT 1
- pycisTopic.iterative_peak_calling: IndexError: list index out of range HOT 4
- Mouse GRCm38 genome is more helpful HOT 2
- The required file cannot be found HOT 1
- Problem with GRN plot HOT 4
- Direct and extended predicted TF-to-region-to-gene links.
- Passing a set as an indexer is not supported. Use a list instead. HOT 3
- installation instructions fetch outdated lda library for conda 24.4.0 & rocky-linux 8.9
- ctx_results.hdf5 AND dem_results.hdf5, I do not understdand HOT 1
- can't use scenicplus command line and trouble in run_scenicplus
- pycisTopic label transfer failure
- Two problems in download_genome_annotations when using old genome assemblies (with makeshift solutions)
- it would be nice to provide the results with each step of the analysis. this would help with debugging greatly.
- Plots showing projection of perturbation effect in embedding look the same for all regulons
- Perturbation effect issue, One sample has ~0 perturbation scores for all TFs
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 scenicplus.