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

Integer Gene Labels with geneExp.py #7

Closed
nmank opened this issue Aug 25, 2022 · 1 comment
Closed

Integer Gene Labels with geneExp.py #7

nmank opened this issue Aug 25, 2022 · 1 comment

Comments

@nmank
Copy link

nmank commented Aug 25, 2022

Suppose we have integer gene labels, eg. Entrez Identifiers.

On line 63 of geneExp.py you say
index=expressionList.values[:, 0]

If the first column of expression list (the gene labels) contains all entries of type int, this forces it to be the same type as the rest of the entries in expressionList. Namely, a float or double. This leads to an error in line 69 where you write

self.geneExpr = ad.AnnData(X=expressionList, obs=sampleInfo, var=geneInfo)

A fix for this is to write np.array(expressionList.iloc[:,0]) instead of expressionList.values[:, 0] on line 63.

@nargesr
Copy link
Member

nargesr commented Aug 26, 2022

I did not think about that and thank you for pointing that out. I pushed a new release. You can reinstall it from pip. It should be fixed.

@nargesr nargesr closed this as completed Aug 26, 2022
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

2 participants