However, my nodes are huge for the taxonomic dataset and thus overlap. It is impossible to see most of the edges. How can I either:
A) Decrease the nodes size (and let the label run across) I already have rather short names that I cannot shorten further withour losing important information
B) increase the edge length or
C) change the layout?
For A and B I don’t find any instructions in the network function help. For C, I have tried numerous different layouts but non solved the problem.
Please, advice! I have very interesting correlations in my circos plot but I think a network would make the interactions more comprehensible.
Thank you for your great work and support!
/Stef
The simple (and inelegant) fix to your problem is to set the shape.node parameter to "none". This will remove the presence of any nodes while retaining the names. This may be sufficient for you. However, if you cannot identify the block by the feature name, it compounds your issue rather than solves it.
I’m currently working on an adjustment to the network() which should give you control of the size of each node as well as influence over the distance between them. I’ll update you once this is fully implemented
Thank you @MaxBladen for the suggestion. I tried it, but it does not look very nice. I think I need to be able to both change node size and length on edges. Is the length of the edges a measure of something? Some of my edges are pretty long and others are just as short as a dot almost. If the length does not contain any important information, I would like to be able to set at least a minimum length. That might also help prevent overlapping nodes.
Do you have a rough time estimate for your implementation?
Kind regards,
Stef
The edge lengths are not a measure of anything. Nor can they be influenced with a high degree of control. igraph (the package used to generate the network plots) does not have the greatest degree of user control unfortunately. I’ll see if I can determine a way to set a minimum - otherwise my current implementation just forces them closer or further apart. I should have it ready for you by the end of the day hopefully.
I have just pushed a build to our GitHub repo which should help you! If you’d like an overview of the changes and how to use them, read here. Essentially, you can now control the total scale of the plot, increasing the distance between nodes. Also, you can directly control the size of the nodes themselves.
To install this version, follow these steps:
Load the devtools package (ensure you have it installed):
Thank you so much @MaxBladen ! I was very eager to try it out but ran into some problems:
> install_github("mixOmicsTeam/mixOmics",ref = github_pull("issue-233"))
Error in github_resolve_ref.github_pull(meta$ref %||% ref, meta, host = host, :
Cannot find GitHub pull request mixOmicsTeam/mixOmics#issue-233
HTTP error 404.
Not Found
Did you spell the repo owner (`mixOmicsTeam`) and repo name (`mixOmics`) correctly?
- If spelling is correct, check that you have the required permissions to access the repo.
> install_github("mixOmicsTeam/mixOmics",ref = github_pull("234"))
Downloading GitHub repo mixOmicsTeam/mixOmics@issue-233
So issue 234 seems to work, however, after installing and running the following commad I get the error below:
I’ve encountered your issue before. I am not aware of the root cause - but here is a work around that’s worked for me and plenty others:
Navigate to the R directory on your computer. Ensure the folder is titled like “R-X.X.X” (in my case, R-4.2.1).This can be found using the following command in RStudio:
Thanks a lot @MaxBladen! It works now I just wonder whether it is possible to visualise edges between nodes from the same dataset, just like the showIntraLinks in the circosPlot? I prefer plotting a network as I think the centrality is emphasised better but I hate to lose these associations.
/Stef
I’ve thought about this too. A few other things have become pressing matters, but once I’ve resolved them I’ll look into this functionality of network()
Dear @MaxBladen,
I wonder whether you or anyone else in the team has had time to implement the intralinks for the networks yet, i.e., to visualise edges between nodes from the same dataset, as discussed above.
Best wishes,
Stef
Unfortunately not, I’m essentially the only developer and I’ve had a number of more pressing matter to attend to. I’ll notify you once I’ve had a chance to work on it