-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature selection by Moran'I score #110
Conversation
preprocessing/feature_selection_MoranI/spatially_variable_genes_scanpy.py
Outdated
Show resolved
Hide resolved
preprocessing/feature_selection_MoranI/spatially_variable_genes_scanpy.py
Outdated
Show resolved
Hide resolved
sc.pp.log1p(adata) | ||
|
||
## Compute the graph based from Delaunay triangulation | ||
sq.gr.spatial_neighbors(adata,coord_type="generic",delaunay= True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if that should be a commandline arg rather than being calculated on the fly. Otherwise we will have situation later where the neighborhood structure used in the method might be different than the one used for feature selection which could be awkward.
@naveedishaque
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Visium we could just use the default?
For others there are parameters like:
n_neighs ([int])
radius ([int])
delaunay ([bool])
Reference: https://squidpy.readthedocs.io/en/stable/api/squidpy.gr.spatial_neighbors.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if that should be a commandline arg rather than being calculated on the fly. Otherwise we will have situation later where the neighborhood structure used in the method might be different than the one used for feature selection which could be awkward.
Oh, this is interesting. We want to make sure that the transformations and neighborhood structure is controlled outside, so technically this would need to import the log1p data and import the neighborhood graph.
Comments:
- branch name change to "preproc_MoranI_scanpy_Qirongmao"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if that should be a commandline arg rather than being calculated on the fly. Otherwise we will have situation later where the neighborhood structure used in the method might be different than the one used for feature selection which could be awkward.
Oh, this is interesting. We want to make sure that the transformations and neighborhood structure is controlled outside, so technically this would need to import the log1p data and import the neighborhood graph.
Comments:
- branch name change to "preproc_MoranI_scanpy_Qirongmao"
Then should we need to make a separate pipeline for generating the neighborhood graph?
Branch name with "Vignette 2.0" is also a good option :)
Do we have an associated Issue for this PR? |
- Moved default gene numbers to Argparser - Removed normalization steps
Not sure if fully associated with #83 |
preprocessing/feature_selection_MoranI/spatially_variable_genes_scanpy.py
Outdated
Show resolved
Hide resolved
Replacing the neibourhood calculation by using the output of squidpy.gr.spatial_neighbors from upstream preprocessing script
Selecting top spatially variable genes based on Moran's I using Squidpy (After Log-normalization)