Skip to content
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

hello,can you help me ? #29

Open
wants to merge 94 commits into
base: master
Choose a base branch
from
Open

hello,can you help me ? #29

wants to merge 94 commits into from

Conversation

1366409175
Copy link

AttributeError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_9316\2717546558.py in
----> 1 svg_full, _ = SpatialDE.test(data, omnibus=True)
2 svg_full["total_counts"] = np.asarray(data.X.sum(axis=0)).squeeze()
3 svg_full.to_pickle("ST8059048_svg_full.pkl")

AttributeError: module 'SpatialDE' has no attribute 'test'

TODO: port AEH, investigate caching distance matrices for fixed inducers
instead use a sum of a spectral mixture kernel (Wilson + Adams 2013)
and a linear kernel, ARD should figure out the rest

This also changes the default settings to fixed inducers and ard=True
- implement sparse GPs according to Titisas (2009)
- use score test with BH correction
- reorganize code
note that the results data frame no longer contains null model results
Previously, a score test was performed for every lengthscale. Now, only
the maximum likelihood model is tested.
The standard workflow now is run() to detect spatially variable genes
followed by fit_patterns, which fits spectral mixture kernels to
the spatially variable genes. Alternatively, one can use run_detailed()
to directly fit spectral mixture kernels
this makes p-values under the null uniformly distributed
this prevents significant hits that have one spot with many reads
and very little reads overall
the previous strategy may have been generating false-positives due to
the score test being performed with the fitted kernel. The current
workflow is to first run the score test on multiple kernels, and then
analyze the detected spatially variable genes in more detail with GPs.
Based on extensive benchmarking, the Cauchy combination seems to perform
best in terms of statistical power, so it is the default. If CPU time is
a bottleneck, the omnibus test can be used instead. It may lose some
power, but its runtime is independent of the number of kernels to be
tested. In the default configuration, it is 10x faster than the Cauchy
combination.

This commit also ports the score test to use Tensorflow, so it can run
on GPUs. This gives a 100x speed-up compared to CPU.
this uses a Hidden Markov Random Field with a Dirichlet process prior to
automatically detect the number of cell types present in the given
sample. It uses a Poisson likelihood with a Gamma prior. If no spatial
information is given, the model reduces to a Dirichlet process Poisson
mixture.
previous implementation relied on TensorFlow's arithmetic optimizer to
remove redundant cholesky factorizations. Visualizing the graph in
TensorBoard showed that this was not the case, one superfluous cholesky
factorization was performed in every iteration
a remnant of ScoreTest.dtype was left after commit d2dd0bf
this plays better with ScanPy's plotting functions
this plays better with ScanPy's plotting
parameter fits for null model are always done in float64, but the test
itself uses default_float
Disabling caching is useful to reduce memory footprint when testing many
data points. It would be nice to do this automatically, but Tensorflow
doesn't provide a way to get the total available memory, so...
this removes all the useless clutter introduced by autosummary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants