Giter Site home page Giter Site logo

loomxpy's People

Contributors

cflerin avatar dweemx avatar ghuls avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

loomxpy's Issues

[BUG] Unable to add clustering

  • LoomXpy version: 0.4.0
  • Python version: 3.7
  • Operating System: CentOS

Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

What I Did

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'

[FEATURE] Export cluster markers

  • LoomXpy version: 0.3.1
  • Python version: 3.7
  • Operating System: CentOS

Description

Currently the cluster markers (if any present) in the LoomX object are not exported to Loom file.

What I Did

N.A.

[BUG] Cannot read loom if markers are not present along with clustering

  • LoomXpy version: 0.3.0
  • Python version: 3.7
  • Operating System: CentOS

Description

Reading a Loom file generated by cisTopic

What I Did

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'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.