Giter Site home page Giter Site logo

Comments (4)

demian1 avatar demian1 commented on June 8, 2024

Hi @Phil-Momoka
This function was added just last week and is therefore only available through GitHub for now.
You can update to the version on GitHub with pip install git+https://github.com/saezlab/decoupler-py.git
Be aware that the association is made with ANOVA using the statsmodels package that you need to install as well.

from decoupler-py.

Phil-Momoka avatar Phil-Momoka commented on June 8, 2024

Hi @demian1
Thank you for your quick response! I will try using the newest version.

from decoupler-py.

ssun1116 avatar ssun1116 commented on June 8, 2024

Hello, I'm also interested in using the get_metadata_associations function. It has been working well for me so far. However, I encountered a TypeError when attempting to use the dc.plot_associations code.
I would greatly appreciate it if you could help me resolve this issue.
Thank you in advance!

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[14], line 2
      1 plt.figure(figsize=(7,10))
----> 2 ax, legend_axes = dc.plot_associations(pp_pdata,
      3                                        uns_key='pca_anova', #summary statistics from the anova tests
      4                                        obsm_key='X_pca', #where the PCs are stored
      5                                        stat_col='p_adj', #which summary statistic to plot
      6                                        obs_annotation_cols = ['condition', 'cluster_original'],
      7                                        titles=['Adjusted p-values from ANOVA', 'Principle component scores']) # which sample annotations to plot
      8 plt.show()

File ~/.conda/envs/BrainAtlas/lib/python3.8/site-packages/decoupler/plotting.py:1590, in plot_associations(data, uns_key, associations, cols, obs_annotation_cols, obsm_key, use_X, layer, stat_col, titles, scores_kwargs, stats_kwargs)
   1587 cm_stats = pch.ClusterMapPlotter(data=stats, plot=False, **stats_defaults)
   1589 #combine clustermaps vertically
-> 1590 ax, legend_axes = pch.composite(cmlist = [cm_stats, cm_scores], main = 1, axis = 0, height_ratios=[1,3], row_gap=7, legend_gap=15)
   1592 #add titles
   1593 if titles is not None:

TypeError: composite() got an unexpected keyword argument 'height_ratios'

from decoupler-py.

demian1 avatar demian1 commented on June 8, 2024

Hi @ssun1116
In order to fix this issue, I would recommend to update to the latest version of PyComplexHeatmap (at least commit ac50aca) from GitHub
pip install git+https://github.com/DingWB/PyComplexHeatmap

from decoupler-py.

Related Issues (20)

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.