Understanding the output from view.cnapath()

Issue #164 resolved
Former user created an issue

Which paths are plotted in VMD using default setting? I am following transducin example:

view.cnapath(pa1, pdb, launch = TRUE)

I see a red thick line between source and sink and many thin blue lines in between. Does red thickest line represent shortest path between sink and source? Does default setting plot all suboptimal paths in vmd? I do not see 250 suboptimal paths plotted.

Is there a way to change axis fonts etc for length distribution plots from print.cnapath(plot=TRUE)? If not, what is the way to save the data in the format that is easy to plot using other software.

Comments (9)

  1. Xinqiu Yao

    Hi,

    The red thickest line is the shortest path. The function shows both shortest and suboptimal paths in a way that, if two paths share a common edge, only one line representing the shorter path is plotted between the two nodes. In other words, all paths are merged on overlapping edges, and so you can't see explicitly each individual path except for the shortest path (it is dominant on all common edges and so displayed explicitly). In this way, the VMD loading will be much faster than that drawing lines for all paths, and it still gives the basic picture about how two distal nodes are connected.

    However, we do consider updating the function to draw all paths as was done in the paper (Van Wart et al., JCTC 2014, 10:511-517), i.e. drawing splines using VMD command. It should be done very soon. Always check the latest commit to keep being posted.

    About the length distribution, currently the function doesn't support customized plot. You can always access the raw data and make your own plot very easily. Note that pa1 is just a list object containing all paths and their lengths. For example, a simple alternative path length distribution plot can be:

    hist(pa1$dist)
    

    You can also write lengths to hard disk and plot it with other software than R:

    cat(pa1$dist, "\n", file="dist.txt")
    cat(pa2$dist, "\n", file="dist.txt", append=TRUE)
    
  2. Xinqiu Yao

    Hi,

    view.cnapath() now support spline option to draw all paths as spline curves. For example

    view.cnapath(pa1, pdb, launch = TRUE, spline=TRUE)
    

    Any comment is welcomed!

  3. Xinqiu Yao

    I received a message about this issue from the server, but it is strange the message not shown here. So, I pasted the question manually:

    leleonp commented on issue #164: Understanding the output from view.cnapath()

    How you can save from command line the vmd file? thanks

  4. Xinqiu Yao

    Can you provide more details about your question?

    By 'command line', do you mean within an 'R' session? You can specify the prefix of output file names by the option 'out.prefix' of the function view.cnapath() (type 'help(view.cnapath)' for more details). For example,

    view.cnapath(pa, pdb, out.prefix = "mypath")
    

    In your local directory, there will be two files generated: mypath.vmd and mypath.pdb. To view them manually, type following command line in your System shell:

    vmd -e mypath.vmd

  5. Log in to comment