Skip to content

Commit

Permalink
fix(analysis): remove unused comments from compute_volcano_data
Browse files Browse the repository at this point in the history
Signed-off-by: Cameron Smith <cameron.ray.smith@gmail.com>
  • Loading branch information
cameronraysmith committed Sep 17, 2024
1 parent 0ac2cdf commit d62db2f
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/pyrovelocity/analysis/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,24 +143,18 @@ def compute_mean_vector_field(

@beartype
def compute_volcano_data(
# posterior_samples: List[Dict[str, ndarray]],
posterior_samples: Dict[str, NDArray[Any] | DataFrame],
# adata: List[AnnData],
adata: AnnData,
time_correlation_with: str = "s",
selected_genes: Optional[List[str]] = None,
negative: bool = False,
) -> Tuple[pd.DataFrame, List[str]]:
# assert isinstance(posterior_samples, (tuple, list))
# assert isinstance(adata, (tuple, list))
assert "s" in posterior_samples
assert "alpha" in posterior_samples

maes_list = []
cors = []
genes = []
# labels = []
# switching = []

for sample in range(posterior_samples["alpha"].shape[0]):
maes_list.append(
Expand All @@ -175,27 +169,10 @@ def compute_volcano_data(
)
cors.append(df_genes_cors[0])
genes.append(adata.var_names.values)
# labels.append([f"Poisson_{label}"] * len(adata.var_names.values))
# for p, ad, label in zip(posterior_samples, adata, ["train", "valid"]):
# for sample in range(p["alpha"].shape[0]):
# maes_list.append(
# mae_per_gene(
# p["s"][sample].squeeze(),
# ensure_numpy_array(ad.layers["raw_spliced"]),
# )
# )
# df_genes_cors = compute_similarity2(
# p[time_correlation_with][sample].squeeze(),
# p["cell_time"][sample].squeeze().reshape(-1, 1),
# )
# cors.append(df_genes_cors[0])
# genes.append(ad.var_names.values)
# labels.append([f"Poisson_{label}"] * len(ad.var_names.values))

volcano_data = pd.DataFrame(
{
"mean_mae": np.hstack(maes_list),
# "label": np.hstack(labels),
"time_correlation": np.hstack(cors),
"genes": np.hstack(genes),
}
Expand Down

0 comments on commit d62db2f

Please sign in to comment.