Skip to content

Commit

Permalink
Fixed bugs. Update tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Bernstein authored and Matthew Bernstein committed Jan 14, 2022
1 parent 0a95e18 commit 1e060c2
Show file tree
Hide file tree
Showing 3 changed files with 195 additions and 179 deletions.
16 changes: 8 additions & 8 deletions spatialcorr/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,13 +1052,13 @@ def plot_neighborhood(


def mult_genes_plot_correlation(
plot_genes,
adata,
plot_genes,
cond_key,
estimate='local',
bandwidth=5,
kernel_matrix=None,
contrib_thresh=10,
estimate_type='local',
row_key='row',
col_key='col',
dsize=7,
Expand Down Expand Up @@ -1190,7 +1190,7 @@ def mult_genes_plot_correlation(
)
ax.set_ylabel(gene_1, fontsize=13)
elif col > row:
if estimate_type in ['local', 'regional']:
if estimate in ['local', 'regional']:
corrs, kept_inds, _ = plot_correlation(
adata[keep_inds,:],
gene_1, gene_2,
Expand All @@ -1205,15 +1205,15 @@ def mult_genes_plot_correlation(
ticks=False,
ax=ax,
figure=None,
estimate=estimate_type,
estimate=estimate,
dsize=dsize,
title=title
)
elif estimate_type == 'local_ci':
elif estimate == 'local_ci':
plot_ci_overlap(
adata,
gene_1,
gene_2,
adata,
cond_key,
kernel_matrix=None,
bandwidth=bandwidth,
Expand Down Expand Up @@ -1265,9 +1265,9 @@ def _compute_pairwise_corrs(
return all_corrs


def cluster_pairwise_correlations(
plot_genes,
def cluster_pairwise_correlations(
adata,
plot_genes,
cond_key,
bandwidth=5,
row_key='row',
Expand Down
2 changes: 1 addition & 1 deletion spatialcorr/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ def analysis_pipeline_pair(
else:
ax = axarr[0][3]
plot_ci_overlap(
adata,
gene_1,
gene_2,
adata,
cond_key=cond_key,
kernel_matrix=None,
bandwidth=bandwidth,
Expand Down
356 changes: 186 additions & 170 deletions tutorial/SpatialCorr_tutorial.ipynb

Large diffs are not rendered by default.

0 comments on commit 1e060c2

Please sign in to comment.