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.


Comments (5)

  1. Jason Vander Heiden

    Greetings @WAus10,

    This looks like a bug in testEdges. Let me investigate and I'll get back to you when it's fixed.

  2. 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:


    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.

  3. 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:

    g <- ExampleTrees[[3]]

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

  4. Wes Austin reporter

    Thanks, that seems to have fixed my issue. I was able to run the example data and mine now appears to be running without that error.

  5. Log in to comment