Open cannin opened 3 years ago
Hi, @cannin Thank you for your query.
For creating and installing the app we can use the command mentioned in the Readme. file
https://github.com/cannin/causalpath_cytoscape_app/blob/main/README.md
Then the app will be created in the target folder of the project.
We can link the "app.jar" to this folder "C:\Users\
Such that whenever we reinstall the app and a new app is created it will automatically be copied into that folder.
Windows command for that
mklink /h "C:\Users\
Also, I have found the link to some commands in this link http://manual.cytoscape.org/en/3.5.0/Command_Line_Arguments.html Here are some commands which we can perform using cytoscape.sh for linux or cytoscape.bat for windows are given.
Let's define our nomenclature.
If I say causalpath_app.jar (or say app.jar or similar ) I mean the Cytoscape App
How will you run causalpath.jar from the Cytoscape App?
@cannin Thank you for rephrasing the query.
To run the casupath.jar file we can run the following command java -jar target/causalpath.jar path/to/input/directory
This command can be found at CasualPath Repository in the following link https://github.com/PathwayAndDataAnalysis/causalpath/blob/master/README.md
I run the following command to run the app on my machine.
java -jar "C:\Users\PRITAM PC\Desktop\casualpathnrnb\causalpath\target\causalpath.jar" "C:\Users\PRITAM PC\Desktop\casualpathnrnb\data\TCGA-RPPA\ACC"
And I think it is not a Cytoscape app so we can't run it from the Cytoscape App. Please let me know for any other queries. Thanks, @thepritam
@thepritam please communicate with alex pico by email (CC me) and see if he can give clarity to this. the goal of this project is to simplify the use of causalpath.jar. this strategy is cumbersome for many users we seek to target.
@cannin I have mailed Alex Pico about the issue.
https://github.com/saezlab/cytocopter/blob/38dc70cec94b24840b02088216c7f390aba37f4b/pom.xml#L223
https://github.com/saezlab/cytocopter/tree/master/src/main/java/uk/ac/ebi/cytocopter/internal
https://apps.cytoscape.org/apps/cytocopter
https://saezlab.github.io/CellNOptR/7_CytoCopter/
Code for integrating the casual path with cytoscape
The Cytoscape App needs as input the folder to the input data (not just the output files)
java -jar causalpath.jar ./UVM
@ozgunbabur @cannin I have tried to run the Causalpath. main() function from the repository from the application. But after getting the repository the app is not getting started. There is some issue with the dependency. I have sent a mail describing the issue regarding this.
@cannin I am trying to run the Casual Path Algorithm from the Cytoscape App. The link to my code: https://github.com/cannin/causalpath_cytoscape_app/blob/gh_integrate_test/casualpath-cytoscape-app/src/main/java/org/cytoscape/sample/internal/cellnoptr/tasks/TxtFileImport.java
The Repository to the Casual Path Algorithm: https://github.com/PathwayAndDataAnalysis/causalpath
The function I am calling from My code is the main function and it is given in this link: https://github.com/PathwayAndDataAnalysis/causalpath/blob/master/src/main/java/org/panda/causalpath/run/CausalPath.java
So, After doing this when I added the newly installed app into Cytoscape, the app is not getting started. And It is giving some OSGI error. The error is given below:
org.cytoscape.app.internal.exception.AppStartupException: Bundle start error
at org.cytoscape.app.internal.manager.BundleApp.start(BundleApp.java:84) ~[49:org.cytoscape.app-impl:3.8.2]
at org.cytoscape.app.internal.manager.AppManager$1.onFileCreate(AppManager.java:500) [49:org.cytoscape.app-impl:3.8.2]
at org.cytoscape.app.internal.manager.AppManager$1.onFileChange(AppManager.java:521) [49:org.cytoscape.app-impl:3.8.2]
at org.apache.commons.io.monitor.FileAlterationObserver.doMatch(FileAlterationObserver.java:400) [22:org.apache.commons.io:2.1.0]
at org.apache.commons.io.monitor.FileAlterationObserver.checkAndNotify(FileAlterationObserver.java:334) [22:org.apache.commons.io:2.1.0]
at org.apache.commons.io.monitor.FileAlterationObserver.checkAndNotify(FileAlterationObserver.java:304) [22:org.apache.commons.io:2.1.0]
at org.apache.commons.io.monitor.FileAlterationMonitor.run(FileAlterationMonitor.java:182) [22:org.apache.commons.io:2.1.0]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.osgi.framework.BundleException: Unable to resolve Casual-path-cytoscape-app [212](R 212.0): missing requirement [Casual-path-cytoscape-app [212](R 212.0)] osgi.wiring.package; (osgi.wiring.package=org.panda.causalpath
.run) Unresolved requirements: [[Casual-path-cytoscape-app [212](R 212.0)] osgi.wiring.package; (osgi.wiring.package=org.panda.causalpath.run)]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149) ~[?:?]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2119) ~[?:?]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984) ~[?:?]
at org.cytoscape.app.internal.manager.BundleApp.start(BundleApp.java:82) ~[?:?]
... 7 more
This isn't the right way to go about this at all. The CausalPath jar file provides functionality that you need to call (not run) from your Cytoscape app. Essentially, all of the information you are getting from the command line, you need to get as Tunables and then call a new method that's going to run the algorithm and return a Cytoscape network (without writing anything out).
@scootermorris Thank you for the response. There are a couple of things I need to mention which I have discussed with @cannin and @ozgunbabur.
# Name of the proteomic data file
proteomics-values-file = MCF7-IGF1.txt
id-column = ID symbols-column = Symbols sites-column = Sites effect-column = Effect
value-transformation = significant-change-of-mean-paired
fdr-threshold-for-data-significance = 0.1 protein fdr-threshold-for-data-significance = 0.1 phosphoprotein
pool-proteomics-for-fdr-adjustment = true
color-saturation-value = 10
show-all-genes-with-proteomic-data = true
calculate-network-significance = true permutations-for-significance = 10000 fdr-threshold-for-network-significance = 0.1 use-network-significance-for-causal-reasoning = true
control-value-column = Serum-DMSO-2hr test-value-column = IGF1-DMSO-2hr control-value-column = Serum-DMSO-4hr test-value-column = IGF1-DMSO-4hr control-value-column = Serum-DMSO-48hr test-value-column = IGF1-DMSO-48hr control-value-column = Serum-DMSO-5min test-value-column = IGF1-DMSO-5min control-value-column = Serum-DMSO-24hr test-value-column = IGF1-DMSO-24hr control-value-column = Serum-DMSO-12hr test-value-column = IGF1-DMSO-12hr control-value-column = Serum-DMSO-60min test-value-column = IGF1-DMSO-60min control-value-column = Serum-DMSO-15min test-value-column = IGF1-DMSO-15min control-value-column = Serum-DMSO-30min test-value-column = IGF1-DMSO-30min
2. Secondly @ozgunbabur mentioned for running the algorithm we just need to call the below code and pass only the <filepath> to generate the network files.
org.panda.causalpath.run.CausalPath.main(new String[]{input_directory}),
And I have tried to do the same and also tried another thing which is given in the below link:
[The link to my code:](https://github.com/cannin/causalpath_cytoscape_app/blob/gh_integrate_test/casualpath-cytoscape-app/src/main/java/org/cytoscape/sample/internal/cellnoptr/tasks/TxtFileImport.java)
So, I am confused about the new method which you are describing to run the algorithm and also about calling the function not running it.
Please help me out with the doubts I am having.
Thanks,
@thepritam
I'll take these in turn: 1) Yes, there are a lot of values, but the way it's currently set up, the user will have to edit those values manually anyways, which for many Cytoscape users might be a significant hurdle. Frankly, by the time I edit all of the parameters in parameter.txt, I don't understand what value the Cytoscape app provides. It seems like all it really does is run the algorithm (which, if I'm familiar enough with the command line to do all of the editing, I can probably execute the jar file) and then read in the resulting network. This approach also makes this more difficult to automate. So, I would suggest a different approach. First, I would read the proteomics data into a table -- you now have all of the data in columns. Next, get the names of the control and test columns. At the same time, you can get the names of the other columns. That leaves relatively few parameters: transformation, fdr cutoffs, etc. Now you have all of the data you need to execute the algorithm without any extra directories. All the user needs to worry about is their proteomics results. 2) Now that you have all of the data, you need to get that data into the algorithm. That's where the second constructor would come in. The idea is that the new constructor would allow you to pass the parameters and the data and get back an edge list. Since you have the raw proteomics data, you could also create virtual columns in the result network that would point to the actual abundance numbers, fold changes, etc. This could be used to color nodes, change node borders, etc.
So, the real question here is what is the purpose of writing a Cytoscape app? Clearly, it isn't for folks who are adept at using editors and command line tools, so who is it for? At the end of the day, I think that the goal is to make the CausalPath algorithm more accessible to researchers who aren't computational. To that end, I would suggest thinking hard about your design. If, on the other hand, you think that the users are perfectly fine using emacs, vim, or a reasonable text editor, then I would suggest just writing a very small app that will read in the output files from causal path and not bother with running the algorithm itself -- completely decouple the algorithm from the output and just focus on getting the output into Cytoscape.
@scootermorris I appreciate the feedback. We'll think about the UI that users interact with over the course of the summer (the first point); the goal is to target users who are not computational and not comfortable with the command line.
In the short term, rather than questions of design, I'm more concerned about the feasibility of running our existing Java code (as is) from Cytoscape. It appears that we running into issues with OSGI (or something else) and we're not sure how to proceed.
Apps like Cytocopter seem to use genetic algorithms/CSV reading/plotting from existing projects within Cytoscape:
https://github.com/saezlab/cytocopter/blob/master/pom.xml
so I assume it is possible, but I'm not sure how to guide @thepritam in debugging errors he is facing (the bundle start error; see above).
The easiest way to prototype the work is the 1 parameter function that @thepritam is using and I would prefer to continue to use this until we know there are no major incompatibilities between CausalPath and Cytoscape.
If you have time and it would facilitate this discussion, we could have a video chat.
@scootermorris Can we please discuss over video chat to discuss the issues as @cannin mentioned? It is one of the core-task for the project. And We are very much stuck with it. Please let me know if we can arrange a video chat for it. Thanks @thepritam
How can the casualpath jar be run from Cytoscape? Via a commandline call like "java -jar ..." or by calling a function in the jar? The best would be if it can be run calling Java functions, but I do not know what options are available.