We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
cell_transition
At the moment, we cannot reproduce the multimodality tutorial, as the cell_transition doesn't work any more.
A non-scalable work around is the following code
def aggregate_transport_matrix(adata_source, adata_target, tmat, aggregation_key = "celltype", forward = True): df_source = adata_source.obs[aggregation_key] df_target = adata_target.obs[aggregation_key] annotations_source = adata_source.obs[aggregation_key].cat.categories annotations_target = adata_target.obs[aggregation_key].cat.categories tm = pd.DataFrame( np.zeros((len(annotations_source), len(annotations_target))), index=annotations_source, columns=annotations_target, ) for annotation_src in annotations_source: for annotation_tgt in annotations_target: tm.loc[annotation_src, annotation_tgt] = tmat[ np.ix_((df_source == annotation_src).squeeze(), (df_target == annotation_tgt).squeeze()) ].sum() return tm.div(tm.sum(axis=int(forward)), axis=int(not forward))
tm = aggregate_transport_matrix(adata_atac, adata_rna, ftp["src", "tgt"].solution.transport_matrix, forward=True, aggregation_key="cell_type")
The text was updated successfully, but these errors were encountered:
MUCDK
Successfully merging a pull request may close this issue.
At the moment, we cannot reproduce the multimodality tutorial, as the
cell_transition
doesn't work any more.A non-scalable work around is the following code
tm = aggregate_transport_matrix(adata_atac, adata_rna, ftp["src", "tgt"].solution.transport_matrix, forward=True, aggregation_key="cell_type")
The text was updated successfully, but these errors were encountered: