This PR adds the ability to run the convergence tool and make a network diagram of the largest convergence cluster using an R function convergence().
TODO:
[x] Add an R function to run the convergence tool.
[x] Use HTML widget to plot a single row of the output of the convergence tool using Cytoscape.
[x] Have the ability to have a verbose output (i.e. write the convergence tool output and Cytoscape XML to local dir).
[x] Include the HMMER and blastn binaries so no external dependencies are required for install.
[x] Include the Windows binaries, also, so things work there. (Need to check what platform user is on and append appropriate binaries to PATH).
[x] Make sure the visualization written to a standalone HTML works (possibly needing YUI) so the visual can be added to http://receptormarker.com.
Had to send XML string to Cytoscape, since you get a cross-scripting request error when trying to AJAX the XML on a local machine.
[ ] Opening the standalone file on a local machine will not work locally unless you change your flash security settings per Cytoscape's recommendation. It should work on a web server, i.e. on http://receptormarker.com, but you need to confirm this (which you can't really do until you merge into dev).
It does work using the browser=TRUE option. The only thing that doesn't work is doing htmlwidgets::saveWidget() and then opening the resulting HTML file in a browser.
[ ] Add unit tests.
Defer to do in dev so you can get this up on frontend.
[x] Plot or do something or do something if there is no largest cluster (i.e. all clusters are equal size).
Removed this item: you're no longer plotting the largest cluster; instead, you return the clusters and have the user choose which to plot using a new function cluster_plot().
[x] Plot or do something if there are no clusters in the convergence output file, or if the file doesn't exist.
Well, if the output file exists there will always be at least one node in every cluster, so no need to worry about that. As far as the output file goes: check if it exists, then return an error if it doesn't.
[ ] Remove blank line at end of deduped sequences before sending to convergence to avoid warning about empty sequence.
Removing: there is no obvious way to do this, and the warning only shows if verbose=TRUE. Even then it doesn't seem to affect anything.
[x] Remove unnecessary dependencies in html widget
[x] Add function options to:
[x] Show node names or not.
[x] Increase/decrease distance between nodes.
[x] Color background (default white), nodes, and edges.
[x] Understand why the largest cluster sometimes changes (from 7 to 4 to 9)
Answer: statistical cutoffs are sampled from distribution...everything is working fine. You might get an updated version later.
[x] Make sure all functions have proper documentation and examples.
[x] Fix all build warnings due to including binaries, large files, etc. (run devtools::check())
[x] Have the image redraw after resizing the browser window.
[x] You should only append the PATH to include HMMER and BLAST if they aren't already in the PATH!
This PR builds on top of PR #55, which contains some of Minglu's and Daniel's work trying to get the convergence tool included in this R package. Significant modification and cleanup is necessary to get things working, hence this new PR.
This PR adds the ability to run the convergence tool and make a network diagram of the largest convergence cluster using an R function
convergence()
.TODO:
PATH
).browser=TRUE
option. The only thing that doesn't work is doinghtmlwidgets::saveWidget()
and then opening the resulting HTML file in a browser.dev
so you can get this up on frontend.Plot or do something or do something if there is no largest cluster (i.e. all clusters are equal size).cluster_plot()
.Remove blank line at end of deduped sequences before sending to convergence to avoid warning about empty sequence.verbose=TRUE
. Even then it doesn't seem to affect anything.devtools::check()
)PATH
to include HMMER and BLAST if they aren't already in thePATH
!This PR builds on top of PR #55, which contains some of Minglu's and Daniel's work trying to get the convergence tool included in this R package. Significant modification and cleanup is necessary to get things working, hence this new PR.