stefanpeidli / mousipy Goto Github PK
View Code? Open in Web Editor NEWTranslates an AnnData object with mouse gene symbols into one with human gene symbols by mapping orthologs from biomart.
License: MIT License
Translates an AnnData object with mouse gene symbols into one with human gene symbols by mapping orthologs from biomart.
License: MIT License
Hi all,
After installing mousipy
with pip
, I ran the recommended code and received this error:
import scvelo as scv
from mousipy import translate
FileNotFoundError: [Errno 2] No such file or directory: 'src/mousipy/biomart/human_to_mouse_biomart_export.csv'
Do I need to download this csv?
Hi!
Are you planning to add a function that can translate from human genes to mouse genes?
Best, Sandra
Could you please help?
import scvelo as scv
from mousipy import translate
humanized_mdata = translate(mdata)
AttributeError Traceback (most recent call last)
Input In [219], in <cell line: 3>()
1 import scvelo as scv
2 from mousipy import translate
----> 3 humanized_mdata = translate(mdata)
File ~/ENTER/lib/python3.9/site-packages/mousipy/mousipy.py:196, in translate(adata, stay_sparse)
193 # for those with an entry but no ortholog we assume that there really is no known ortholog
194 # which means we ignore genes in m2h_no_hit
195 bdata = translate_direct(adata, direct, no_index)
--> 196 bdata = translate_multiple(bdata, adata, multiple, stay_sparse=stay_sparse)
197 bdata = collapse_duplicate_genes(bdata, stay_sparse=stay_sparse)
198 return bdata
File ~/ENTER/lib/python3.9/site-packages/mousipy/mousipy.py:122, in translate_multiple(adata, original_data, multiple, stay_sparse)
106 """Adds the counts of multiple-hit genes to ALL their orthologs.
107 Parameters
108 ----------
(...)
119 Updated original adata.
120 """
121 from scipy.sparse import csr_matrix, hstack
--> 122 X = adata.X.copy() if stay_sparse else adata.X.A.copy()
123 var = adata.var.copy()
124 for mgene, hgenes in tqdm(multiple.items(), leave=False):
AttributeError: 'numpy.ndarray' object has no attribute 'A'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.