Comments (1)
Hi,
Yes, this is a function from the squidpy library which requires the spatial data ('adata_st') to be arranged in some required structure. There are two keys needed in this function: adata_st.obsm['spatial'] and adata_st.uns['spatial']. The adata_st.obsm['spatial'] defines the location of measured spots, which is always required in order to have the features calculated at the right locations of the image.
In the error popped up in your code, it is due to the lacking keys adata_st.uns['spatial']. The function is trying to extract the diameter of the measured spots from this key. Such information is stored at:
adata_st.uns['spatial']['V1_Adult_Mouse_Brain_Coronal_Section_2']['scalefactors']['spot_diameter_fullres']
If you know the diameter of your measured spot, you can either store this information in your spatial data (make the data structure the same as the one used in tutorial, it should be easier to do compare to changing the source code), or you can also hack into the squidpy package you installed and change the source code to directly input the spot diameter. The code requires this key is at .../squidpy/im/_container.py, 'generate_spot_crops' function at line 713~826, replace those lines with 'Key.uns.library_id' or 'Key.uns.spot_diameter' and you should be able to run the image segmentation code.
Best,
Hejin
from tangram.
Related Issues (20)
- Can we have an API as batch size for the integration method? HOT 3
- No attribute 'pp_adatas' in tangram HOT 2
- Possible to use multiple single cell datasets in Tangram? HOT 3
- Cannot find correspondence of the input data HOT 1
- question about training genes HOT 1
- Some questions about best practices HOT 1
- Attribute error : module 'tangram' has no attribute 'map_cells_to_space' HOT 2
- scRNAseq cells < spatial cells, curious about how mapping works HOT 3
- Unexpected behaviour HOT 1
- Question about acceptable AUC, improving AUC HOT 1
- potential overfitting HOT 5
- Interpretation of tangram_ct_pred HOT 2
- Option "enforce gene lowercase" HOT 1
- error when sq.im.segment
- Tangram Deconvolution HOT 1
- Using Integrated single cell data for alignment
- AttributeError: module 'tangram' has no attribute 'pp_adatas'
- Sparsity_sc and sparsity_sp = 0
- Please explain `project_cell_annotations`
- Projecting spatial annotations to single cell HOT 2
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 tangram.