Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gap between edges and nodes on plot #133

Open
dheadl opened this issue Dec 20, 2024 · 2 comments
Open

gap between edges and nodes on plot #133

dheadl opened this issue Dec 20, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dheadl
Copy link

dheadl commented Dec 20, 2024

Hello,

Thank you for this great package!

I am trying to plot a network comparison but there is a gap between the nodes and the edges. If I change the netConstruct to include "filtTax = "highestVar",
filtTaxPar = list(highestVar = 50)"
this does not happen. Is there a way to stop this gap from happening apart from reducing the taxa used? Any advice is very appreciated, thank you!

image

I'm using R 4.4.2 and NetCoMi version 1.1.0.

Code used:
net <- netConstruct(data = data1,
data2 = data2,
filtSamp = "highestFreq",
dataType="count",
filtSampPar = list(highestFreq = data1_n),
taxRank = "Genus",
measure = "cclasso",
zeroMethod = "pseudoZO",
zeroPar = list(pseudocount=0.5),
sparsMethod = "threshold",
thresh = 0.3,
alpha=0.001,
adjust="adaptBH",
dissFunc = "signed",
verbose = 2,
seed = 123456)

props <- netAnalyze(net clustMethod = "cluster_fast_greedy", hubPar = "eigenvector", hubQuant = 0.95)

plot (props,
sameLayout = TRUE,
layoutGroup = "union",
featVecCol = phyla,
colorVec = colvec,
nodeColor="feature",
labelScale = FALSE,
shortenLabels = "simple", labelLength = 19,
rmSingles = "inboth",
repulsion = 0.7,
nodeSize = "clr",
cexTitle = 2,
cexNodes =8,
cexHubLabels = 0.7, cexLabels = 0.5,
nodeTransp = 0.05,
mar = c(5, 2, 5, 2.5))

@stefpeschel
Copy link
Owner

Hi!
I'm sorry, but I can't reproduce this problem and I've never seen a network like this before. I really don't know what's going on.
The number of nodes shouldn't be a problem because NetCoMi has been used to build much larger networks. Have you tried changing the graphics parameters like cexNodes, edgeWidth or some of the other parameters you use in your code?

@stefpeschel stefpeschel added the bug Something isn't working label Jan 19, 2025
@dheadl
Copy link
Author

dheadl commented Jan 20, 2025

Hi,

Thanks for checking! It is odd, since it doesn't happen for all my networks but changing nodeTransp to 0 fixed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants