Clarification to using indirect=TRUE in testEdges

Issue #63 resolved
Wes Austin
created an issue

Maybe this is a simple question, but when trying to run testEdges program using the example data or my own I get an error:

edge_test_sample <- testEdges(graph_list, "ISOTYPE", nperm=20, indirect = TRUE)
Error in grouped_df_impl(data, unname(vars), drop) : 
  Column `PARENT` is unknown

I'm assuming based on the documentation "If TRUE walk through any nodes with annotations specified in the argument to count indirect connections." I need to specify what nodes to walk through (in my case the inferred), but I've been unable to determine how to do this.

Thanks.

Comments (5)

  1. Jason Vander Heiden

    It wasn't handling cases where there were zero indirect edges. I pushed a fix to the bitbucket repo, which you can install from via:

    library(devtools)
    install_bitbucket("kleinstein/alakazam@default")
    

    Also, there was a typo in the docs. It said:

    "walk through any nodes with annotations specified in the argument."

    And it should've said:

    "walk through any nodes with annotations specified in the exclude argument."

    Let us know if you have any more trouble.

  2. Jason Vander Heiden

    Oh, I forgot. To answer your question about how to specify which nodes to exclude, you use the exclude argument as follows:

    x <- testEdges(graphs, "ISOTYPE", nperm=10, indirect=TRUE, 
                             exclude=c("Germline", "IgM", NA))
    

    That'd skip unannotated (inferred) nodes, IgM nodes, and the germline.

    You can see all the node annotations on an igraph object via:

    library(igraph)
    g <- ExampleTrees[[3]]
    as.data.frame(vertex_attr(g))
    

    Inferred will usually have NA for everything that was a column in the original data.

  3. Log in to comment