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

Please explain project_cell_annotations #119

Open
atharva-bhagwat opened this issue Apr 17, 2024 · 0 comments
Open

Please explain project_cell_annotations #119

atharva-bhagwat opened this issue Apr 17, 2024 · 0 comments

Comments

@atharva-bhagwat
Copy link

atharva-bhagwat commented Apr 17, 2024

df = one_hot_encoding(adata_map.obs[annotation])
if "F_out" in adata_map.obs.keys():
    df_ct_prob = adata_map[adata_map.obs["F_out"] > threshold]

df_ct_prob = adata_map.X.T @ df
df_ct_prob.index = adata_map.var.index

The output of the function does not change if F_out is present in adata_map.obs.keys() or not.
I am having trouble understanding what is happening here. Thanks!

Edit:
As we filter based on the threshold would this be the correct way to calculate tangram_ct_pred

df = one_hot_encoding(adata_map.obs[annotation])
if "F_out" in adata_map.obs.keys():
    df_ct_prob = adata_map[adata_map.obs["F_out"] > threshold]
    df = one_hot_encoding(adata_map[adata_map.obs["F_out"] > threshold].obs[annotation])
    df_ct_prob = df_ct_prob.X.T @ df
else:
    df_ct_prob = adata_map.X.T @ df

df_ct_prob.index = adata_map.var.index
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

No branches or pull requests

1 participant