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

Changes related to sensitivity analysis #15

Closed
wants to merge 8 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions benchmark_utils/latent_signature_utils.py
Original file line number Diff line number Diff line change
@@ -124,9 +124,7 @@ def create_latent_signature(
adata_sampled = create_anndata_pseudobulk(
adata_sampled, pseudobulk
)
result = model.get_latent_representation(
adata_sampled, get_pseudobulk = False
)
result = model.get_latent_representation(adata_sampled)
if SIGNATURE_TYPE == "pre_encoded":
result = result.reshape(-1)
elif SIGNATURE_TYPE == "post_inference":
4 changes: 2 additions & 2 deletions benchmark_utils/sanity_checks_utils.py
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ def run_sanity_check(
# 2. TAPE
if "TAPE" in baselines:
_, deconv_results = \
Deconvolution(signature.T, pseudobulk_test_df,
Deconvolution(signature.loc[intersection].T, pseudobulk_test_df,
sep='\t', scaler='mms',
datatype='counts', genelenfile=None,
mode='overall', adaptive=True, variance_threshold=0.98,
@@ -118,7 +118,7 @@ def run_sanity_check(
df_test_group_correlations.loc[:, "TAPE"] = group_correlations.values
## 3. Scaden
if "Scaden" in baselines:
deconv_results = ScadenDeconvolution(signature.T,
deconv_results = ScadenDeconvolution(signature.loc[intersection].T,
pseudobulk_test_df,
sep='\t',
batch_size=128, epochs=128)
2 changes: 1 addition & 1 deletion scvi/model/_mixupvi.py
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ def get_latent_representation(
self,
adata: Optional[AnnData] = None,
indices: Optional[Sequence[int]] = None,
get_pseudobulk: bool = True,
get_pseudobulk: bool = False,
give_mean: bool = True,
mc_samples: int = 5000,
batch_size: Optional[int] = None,