aertslab / loomxpy Goto Github PK
View Code? Open in Web Editor NEWPython package (compatible with SCope) to create .loom files and extend them with other data e.g.: SCENIC regulons
License: MIT License
Python package (compatible with SCope) to create .loom files and extend them with other data e.g.: SCENIC regulons
License: MIT License
the link to LoomXpy is wrong. please correct it or users can't find you.
It should be possible to read a SCope-compatible loom and have a LoomX
object created
0.4.0
3.7
CentOS
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
Command:
lx.modes.rna.o.clusterings.leiden_res1 = pd.DataFrame(adata.obs["leiden_0.1"], index=adata.obs.index)
Traceback:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-38-5cf58419bb9c> in <module>
----> 1 lx.modes.rna.o.clusterings.leiden_res1 = pd.DataFrame(adata.obs["leiden_0.1"], index=adata.obs.index)
~/GitHub/LoomXpy/loomxpy/_mode.py in __setattr__(self, name, value)
846 super().__setattr__(name, value)
847 else:
--> 848 self.__setitem__(name=name, value=value)
849
850 def __delattr__(self, name):
~/GitHub/LoomXpy/loomxpy/_mode.py in __setitem__(self, name, value)
1541 def __setitem__(self, name: str, value: Union[pd.DataFrame, pd.Series]):
1542 """"""
-> 1543 self.add(key=name, value=value)
1544
1545 def add(
~/GitHub/LoomXpy/loomxpy/_mode.py in add(self, key, value, name, description, metadata)
1563 description=description,
1564 metadata=self.make_metadata(key=key, value=value, name=name)
-> 1565 if metadata is None
1566 else metadata,
1567 )
~/GitHub/LoomXpy/loomxpy/_mode.py in make_metadata(self, key, value, name)
1575 reverse=False,
1576 ):
-> 1577 _clusters.append(LoomXMetadataCluster(id=cluster_id))
1578 super().__setattr__(
1579 f"cluster_{cluster_id}", LoomXMetadataCluster(id=cluster_id)
TypeError: __init__() got an unexpected keyword argument 'id'
0.3.1
3.7
CentOS
Currently the cluster markers (if any present) in the LoomX object are not exported to Loom file.
N.A.
0.3.0
3.7
CentOS
Reading a Loom file generated by cisTopic
Command,
lx = read_loom(
file_path=file_path,
force_conversion={"annotations": True}
)
Traceback:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
~/lib/python3.7/site-packages/loompy/attribute_manager.py in __getattr__(self, name)
114 try:
--> 115 vals = self.__dict__["storage"][name]
116 if vals is None:
KeyError: 'ClusterMarkers_0'
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
<ipython-input-3-e08145944dba> in <module>
1 lx = read_loom(
2 file_path=file_path,
----> 3 force_conversion={"annotations": True}
4 )
~/lib/python3.7/site-packages/loomxpy/_io/_read.py in read_loom(file_path, mode_type, force_conversion)
252 loom_connection=loom_connection,
253 mode_type=_mode_type,
--> 254 force_conversion=force_conversion,
255 )
256 raise Exception(f"Unable to read the loom at {file_path}")
~/lib/python3.7/site-packages/loomxpy/_io/_read.py in _read_scope_loom(loom_connection, mode_type, force_conversion)
224 if mode_type == ModeType.RNA:
225 return _read_scope_rna_loom(
--> 226 loom_connection=loom_connection, force_conversion=force_conversion
227 )
228 # Should be uncommented on production
~/lib/python3.7/site-packages/loomxpy/_io/_read.py in _read_scope_rna_loom(loom_connection, force_conversion)
206 loom_connection=loom_connection,
207 metadata=_metadata,
--> 208 force_conversion=force_conversion,
209 )
210 else:
~/lib/python3.7/site-packages/loomxpy/_io/_read.py in _read_scope_v1_rna_loom(loom_connection, metadata, force_conversion)
167 [
168 pd.DataFrame(
--> 169 loom_connection.ra.ClusterMarkers_0,
170 index=loom_connection.ra.Gene,
171 )
~/lib/python3.7/site-packages/loompy/attribute_manager.py in __getattr__(self, name)
121 return vals
122 except KeyError:
--> 123 raise AttributeError(f"'{type(self)}' object has no attribute '{name}'")
124
125 def __setitem__(self, name: str, val: np.ndarray) -> None:
AttributeError: '<class 'loompy.attribute_manager.AttributeManager'>' object has no attribute 'ClusterMarkers_0'
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.