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

the function of 'buildMultilayerNetworkFromMuxvizFiles' lack of definition of layerEdges #25

Open
wyc618 opened this issue Jan 4, 2022 · 3 comments

Comments

@wyc618
Copy link

wyc618 commented Jan 4, 2022

No description provided.

@ymedi96
Copy link

ymedi96 commented Apr 26, 2022

I met the same error

@ymedi96
Copy link

ymedi96 commented Apr 27, 2022

I add a line in the package, and then it works:

find the function in the package:
buildMultilayerNetworkFromMuxvizFiles <-
function(config.file,
isDirected,
isWeighted,
MultisliceType,
LayerCouplingStrength = 1,
format = "muxviz edge-colored",
verbose = T)

and add : layerEdges <- list()
before this part:
for (l in 1:Layers) {
if (verbose)
cat(paste(" Reading layer from file", df.config$layers.file, "...\n"))

    if (ncol(mEdges) == 5) {
      layerEdges[[l]] <- mEdges[mEdges[, 2] == l & mEdges[, 4] == l, c(1, 3, 5)]
    } else {
      layerEdges[[l]] <- mEdges[mEdges[, 2] == l & mEdges[, 4] == l, c(1, 3)]
    }
    
    if (ncol(layerEdges[[l]]) == 3) {
      colnames(layerEdges[[l]]) <- c("from", "to", "weight")
      if (!isWeighted) {
        cat(
          paste(
            "  WARNING! You asked for an unweighted network but weights are found. Assigning 1 by default.\n"
          )
        )
        layerEdges[[l]]$weight <- 1
      }

@carineemer
Copy link

In my case, I get the message :
"Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'data/jurua/jurua_layout.txt': No such file or directory"

The directory is correct and such de layout file seems to be.

Any help would be highly appreciated.

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants