gregversteeg / CorEx

CorEx or "Correlation Explanation" discovers a hierarchy of informative latent factors. This reference implementation has been superseded by other versions below.
GNU General Public License v2.0
303 stars 54 forks source link

trianglation library missing #8

Closed paseman closed 3 years ago

paseman commented 3 years ago

Working on a Mac with anaconda. Did not have sfdp. Did conda install graphviz Now get the trianglation library missing below. Suggestions appreciated.

(base) katherinepaseman@Bills-MacBook-Pro-3 bio_corex % python vis_corex.py data/test_data.csv vis_corex.py:719: DeprecationWarning: 'U' mode is deprecated with open(filename, 'rU') as csvfile: Time for first layer: 0.05 TC at layer 0 is: 2.078 TC at layer 1 is: -0.000 Groups in sorted_groups.txt Pairwise plots among high TC variables in "relationships" /opt/anaconda3/lib/python3.7/site-packages/seaborn/distributions.py:306: UserWarning: Dataset has 0 variance; skipping density estimate. warnings.warn(msg, UserWarning) /opt/anaconda3/lib/python3.7/site-packages/seaborn/distributions.py:306: UserWarning: Dataset has 0 variance; skipping density estimate. warnings.warn(msg, UserWarning) /opt/anaconda3/lib/python3.7/site-packages/seaborn/distributions.py:306: UserWarning: Dataset has 0 variance; skipping density estimate. warnings.warn(msg, UserWarning) /opt/anaconda3/lib/python3.7/site-packages/seaborn/distributions.py:306: UserWarning: Dataset has 0 variance; skipping density estimate. warnings.warn(msg, UserWarning) /opt/anaconda3/lib/python3.7/site-packages/seaborn/distributions.py:306: UserWarning: Dataset has 0 variance; skipping density estimate. warnings.warn(msg, UserWarning) /opt/anaconda3/lib/python3.7/site-packages/seaborn/distributions.py:306: UserWarning: Dataset has 0 variance; skipping density estimate. warnings.warn(msg, UserWarning) weight threshold is -0.000000 for graph with max of 12.000000 edges non-isolated nodes,edges 6 4 Error: remove_overlap: Graphviz not built with triangulation library Error: remove_overlap: Graphviz not built with triangulation library non-isolated nodes,edges 6 4 Error: remove_overlap: Graphviz not built with triangulation library Error: remove_overlap: Graphviz not built with triangulation library (base) katherinepaseman@Bills-MacBook-Pro-3 bio_corex %

gregversteeg commented 3 years ago

Sorry, I put some instructions for this on the bio_corex page: https://github.com/gregversteeg/bio_corex

For Mac users:

To get the visualization of the hierarchy looking nice sometimes takes a little effort. To get graphs to compile correctly do the following. Using "brew" to install, you need to do "brew install gts" followed by "brew install --with-gts graphviz". The (hacky) way that the visualizations are produced is the following. The code, vis_corex.py, produces a text file called "graphs/graph.dot". This just encodes the edges between nodes in dot format. Then, the code calls a command line utility called sfdp that is part of graphviz,

sfdp tree.dot -Tpdf -Earrowhead=none -Nfontsize=12 -GK=2 -Gmaxiter=1000 -Goverlap=False -Gpack=True -Gpackmode=clust -Gsep=0.02 -Gratio=0.7 -Gsplines=True -o nice.pdf These dot files can also be opened with OmniGraffle if you would like to be able to manipulate them by hand. If you want, you can try to recompile graphs yourself with different options to make them look nicer. Or you can edit the dot files to get effects like colored nodes, etc.

Also, note that you can color nodes in the graphs by putting prepending a color to column label names in the CSV file. For instance, blue_column_1_label_name will show column_1_label_name in blue in the graphs folder. Any matplotlib colors are allowed. See the BIG5 data file and graphs produced by the command line utility.

paseman commented 3 years ago

Thanks

On Sun, Jan 10, 2021 at 11:28 AM Greg Ver Steeg notifications@github.com wrote:

Sorry, I put some instructions for this on the bio_corex page: https://github.com/gregversteeg/bio_corex

For Mac users:

To get the visualization of the hierarchy looking nice sometimes takes a little effort. To get graphs to compile correctly do the following. Using "brew" to install, you need to do "brew install gts" followed by "brew install --with-gts graphviz". The (hacky) way that the visualizations are produced is the following. The code, vis_corex.py, produces a text file called "graphs/graph.dot". This just encodes the edges between nodes in dot format. Then, the code calls a command line utility called sfdp that is part of graphviz,

sfdp tree.dot -Tpdf -Earrowhead=none -Nfontsize=12 -GK=2 -Gmaxiter=1000 -Goverlap=False -Gpack=True -Gpackmode=clust -Gsep=0.02 -Gratio=0.7 -Gsplines=True -o nice.pdf These dot files can also be opened with OmniGraffle if you would like to be able to manipulate them by hand. If you want, you can try to recompile graphs yourself with different options to make them look nicer. Or you can edit the dot files to get effects like colored nodes, etc.

Also, note that you can color nodes in the graphs by putting prepending a color to column label names in the CSV file. For instance, blue_column_1_label_name will show column_1_label_name in blue in the graphs folder. Any matplotlib colors are allowed. See the BIG5 data file and graphs produced by the command line utility.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gregversteeg/CorEx/issues/8#issuecomment-757530054, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEIR5OCHYD5FTL5I6XLGX3SZH5URANCNFSM4V3MH23A .