scKINETICS icon indicating copy to clipboard operation
scKINETICS copied to clipboard

Indexing into list of genes with a covariance matrix

Open ekernf01 opened this issue 2 months ago • 1 comments

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 avatar May 03 '24 18:05 ekernf01