Clarification to using indirect=TRUE in testEdges
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)
-
-
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.
-
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.
-
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.
-
- changed status to resolved
Fixed in 962ca8e.
- Log in to comment
Greetings @WAus10,
This looks like a bug in
testEdges
. Let me investigate and I'll get back to you when it's fixed.