Code Monkey home page Code Monkey logo

cy-community-detection's Introduction

Community Detection App for Cytoscape

Build Status Coverage Status Documentation Status

Community Detection App is a Cytoscape App that leverages third party algorithms (via REST service) to perform hierarchical clustering/community detection on a given network. Leveraging the REST service allows incorporation of algorithms not easily portable/distributable with this App. In addition, this tool offers for biologists Term Mapping/Enrichment (also via service) on the hierarchies generated by this App.

NOTE: This service is experimental. The interface is subject to change.

If you use Community Detection App or REST Service in your research, please cite:

Singhal A, Cao S, Churas C, Pratt D, Fortunato S, Zheng F, et al. (2020) Multiscale community detection in Cytoscape. PLoS Comput Biol 16(10): e1008239. https://doi.org/10.1371/journal.pcbi.1008239

Requirements to use

  • Cytoscape 3.7 or above
  • Internet connection to allow App to connect to remote services

Installation via from Cytoscape

CDAPS is in the Cytoscape App Store and can be installed by following these instructions

Requirements to build (for developers)

To build documentation

  • Make
  • Python 3+
  • Sphinx (install via pip install sphinx)
  • Sphinx rtd theme (install via pip install sphinx_rtd_theme)

Building manually

Commands below assume Git command line tools have been installed

# Can also just download repo and unzip it
git clone https://github.com/cytoscape/cy-community-detection

cd cy-community-detection
mvn clean test install

The above command will create a jar file under target/ named cy-community-detection-<VERSION>.jar that can be installed into Cytoscape

Open Cytoscape and follow instructions here and click on Install from File... button to load the jar created above.

Building documentation

Documentation is stored under docs/ directory and uses Sphinx & Python to generate documentation that is auto uploaded from master branch to Read the Docs

# The clone and directory change can be
# omitted if done above
git clone https://github.com/cytoscape/cy-community-detection

cd cy-community-detection
make docs

Once make docs is run the documentation should automatically be displayed in default browser, but if not open docs/_build/html/index.html in a web browser

To add dropshadow and border to images, Image Magick has been used with the following command:

convert foo.png -shave 1x1 -bordercolor black -border 1 \
        ( +clone -background gray -shadow 80x3+5+5 ) +swap \
        -background none -layers merge +repage foo_fixed.png

COPYRIGHT AND LICENSE

Click here

Acknowledgements

  • TODO denote funding sources

cy-community-detection's People

Contributors

aksinghal5590 avatar coleslaw481 avatar dependabot[bot] avatar dotasek avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cy-community-detection's Issues

Community Graph vs Node Graph

When I use Louvain or Infomap for Community Detection in Cyto I get a Community Graph instead of a "regular" nodes' graph with nodes colored by community association.
It's difficult to analyze the community graph without knowing which nodes are in which communities.
The grid that shows the nodes' ID for each community doesn't contain info about the nodes.
The community graph can be useful only when I understand what's the community about (like after using WordCloud to identify the community traits).
Thank you for your time and for the plugin!

I use Win10, Cyto ver:3.8.2

Order of custom parameters not preserved

It was pointed out that the order of custom parameters set for a given algorithm in communitydetectionalgorithms.json configuration file is not preserved in the GUI. Ideally that order should be kept cause the developer may not certain arguments appearing before others.

Add pValues based on multiple hypothesis testing for the network

gProfiler already reports pValues that are adjusted for multiple hypothesis testing (within each node). It might be nice to be able to set the pValue based on multiple hypothesis testing for the network, i.e. Benjamini-Hochberg, Storey, or Bonferroni based on the number of nodes. Not essential, as we could always calculate a conservative Bonferroni based simply on the number of nodes ourselves, but this is just something to consider.

Any changes to run community detection/functional enrichment are lost when reopening dialog

To reproduce using version 1.10.0

#. Open a network and invoke Apps -> Community Detection -> Run Community Detection
#. Pick "Louvain" and change Cluster Resolution to another value say 11
#. Click either Run or Cancel button.

#. Invoke Apps -> Community Detection -> Run Community Detection
#. Pick "Louvain" and note that Cluster Resolution has changed back to its original value

A failed gprofiler task caused progress dialog to disappear yet processing continued

Using version 1.10.0 Ran into an issue where gprofiler was being run on a large number of nodes and one of the calls failed with this error message:

Screen Shot 2020-04-24 at 11 45 38 AM

The progress dialog then disappeared, but the network kept flickering and other calls to gprofiler continued to be process with no way for user to cancel.

The App should either stop all further processing and close progress bar or somehow denote the failure for given node and continue.

Number of iterations of OSLOM

Hi all, I was exploring your tool in cytoscape and am impressed with its ease of use. One question that I have is how many iterations of OSLOM are run by default? Looking at the OSLOM documentation, the default is 10 (-r flag), but I don't see that mentioned anywhere in your documentation. Thanks for clarifying!

NullPointerException when running term mapping on a hierarchy without CD_MemberList_Size column

If one creates a hierarchy via this tool and then renames the CD_MemberList_Size and then performs term mapping they will get a null pointer exception dialog like this one:

Screen Shot 2022-06-01 at 2 58 23 PM

The code assumes this column exists. At the minimum a more friendly error message telling the user an expected column is missing should be shown instead of the exception.

Raw log:

java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "org.cytoscape.model.CyRow.get(String, java.lang.Class)" is null
	at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:?]
	at java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[?:?]
	at org.cytoscape.app.communitydetection.termmap.TermMappingTask.run(TermMappingTask.java:102) ~[?:?]
	at org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.innerRun(JDialogTaskManager.java:321) ~[!/:?]
	at org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.run(JDialogTaskManager.java:352) [!/:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "org.cytoscape.model.CyRow.get(String, java.lang.Class)" is null
	at org.cytoscape.app.communitydetection.termmap.TermMappingCallable.call(TermMappingCallable.java:149) ~[?:?]
	at org.cytoscape.app.communitydetection.termmap.TermMappingCallable.call(TermMappingCallable.java:20) ~[?:?]
	... 4 more
java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "org.cytoscape.model.CyRow.get(String, java.lang.Class)" is null
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at org.cytoscape.app.communitydetection.termmap.TermMappingTask.run(TermMappingTask.java:102)
	at org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.innerRun(JDialogTaskManager.java:321)
	at org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.run(JDialogTaskManager.java:352)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "org.cytoscape.model.CyRow.get(String, java.lang.Class)" is null
	at org.cytoscape.app.communitydetection.termmap.TermMappingCallable.call(TermMappingCallable.java:149)
	at org.cytoscape.app.communitydetection.termmap.TermMappingCallable.call(TermMappingCallable.java:20)
	... 4 more

Add progress bar to give user status when updating REST Server in Settings menu

When a user updates the REST Server (app.baseurl) in the Settings menu found by clicking on Apps => Community Detection => Settings the App attempts to query that new server to get a list of algorithms. This can take several seconds and during this time Cytoscape appears unresponsive.

It would be nice to provide a progress dialog denoting this operation is taking place (with cancel option)

possible future improvements

These should be discussed and broken into tickets:

  • Column selection for weight can only take positive values where all values are set

  • Better warnings on column weight

  • People need help interpreting result they got, look at gene lookup in hiview (smart pubmed searches)

  • Support multiple organisms (term mapping)

  • Enable export to hiview

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.