I'm trying to learn graphical analysis in a biological setting.

The online course suggested using the Go Programming language, so I'm new to it and help to understand why the number of edges that I read from the following code is different than from the site I'm downloading it from.

import (


infile := "YeastL.dot"
g, err := graphprac.NewGraph(infile)
if err != nil {
    log.Fatalf("failed to read graph: %v", err)
    fmt.Printf("G has %d nodes and %d edges.\n", g.Nodes().Len(), g.Edges().Len())

The output I'm getting is: G has 2361 nodes and 6646 edges.

But from the website http://vlado.fmf.uni-lj.si/pub/networks/data/bio/Yeast/Yeast.htm it's suppose to read 7182 edges.



1 Answer 1


the dot file in the Git repo has 6646 edges, the pajek file in your link has 7182.

Chances are the latter has been updated since.

  • $\begingroup$ Thats a good point @Rohit you need to contact the authors directly specifically whether an update has occurred $\endgroup$
    – M__
    Oct 29, 2020 at 1:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.