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

Indexing into list of genes with a covariance matrix #3

Open
ekernf01 opened this issue May 3, 2024 · 1 comment
Open

Indexing into list of genes with a covariance matrix #3

ekernf01 opened this issue May 3, 2024 · 1 comment

Comments

@ekernf01
Copy link

ekernf01 commented May 3, 2024

Hi! I'm a causal inference and transcriptional data enthusiast, and I'm excited to try out scKINETICS because I think the backronym is really cool and it has a really neat way of getting around the steady state assumption that Dictys and CellOracle make. I ran into an error on this line.

prior_genes[celltype] = np.array([columns.index(gene) for gene in list(celltype_priors[celltype])])

It seems to:

  • make a list containing a single covariance matrix, or a chunk of one.
  • iterate over that list, storing the matrix in a variable gene.
  • index into columns.index looking for the integer position of gene.

Should gene not be a string containing a gene name, or an int? Why is it not the following?

prior_genes[celltype] = np.array([adata.var_names.index(gene) for gene in adata.var_names])

Thank you!

@ekernf01
Copy link
Author

ekernf01 commented May 6, 2024

There's a similar issue in line 310.

prior_pred = prior.dot(data.iloc[cellrand][list(prior)])

It seems like this could be fixed as follows:

prior_pred = prior.dot(data.iloc[cellrand][prior_genes[celltypes[cellrand]]])

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