You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First thanks for publishing Treeio - very helpful set of code. I do have a question about a field that is present from get placements(). I have a .jplace file (attached) that I've read in with:
j = read.jplace("epa_result.CCF.300.jplace.txt")
p = get.placements(j, "best")
head(p)
This shows a tibble where "node" is one of the columns.
I have written a function which returns the ancestral node of an edge: getEdgeAncestor = function(tree, edge){ return(tree$edge[edge, 1] - length(tree$tip.lable)) }
However, this function does not match the tibble "node" column. My question then is, what is the "node" column signify in the get.placements(j, "best") ?
Thanks for your attention, the node column is the index of total nodes, I don't understand edge in your function, is it the index of tree$edge? I guess the edge of the function is from the edge_num of jplace file, but the edge_num of jplace file is different from the index of tree$edge, you can see https://doi.org/10.1371/journal.pone.0031009. Could you please explain why you wrote the function?
I have a reference tree which was generated from full length 16S rRNA sequences.
I took these long sequences that were used to build the reference tree and cut these 16S rRNA sequences into short 200 basepair long regions.
I then placed these 200 long basepair reads onto the reference tree. Now I'm trying to determine the distance from the placed read to the read that it was derived from.
To do this, I'm trying to map the edges in get.placements(p) to the edge table in jTree$edge:
j = read.jplace("epa_result.1100F.200.jplace")
jTree = get.tree(j)
jTree
p = get.placements(j, "best")
head(p)
# how can I map between these two things?
jTree$edges
p$edge_num
Hello,
First thanks for publishing Treeio - very helpful set of code. I do have a question about a field that is present from get placements(). I have a .jplace file (attached) that I've read in with:
This shows a tibble where "node" is one of the columns.
I have written a function which returns the ancestral node of an edge:
getEdgeAncestor = function(tree, edge){ return(tree$edge[edge, 1] - length(tree$tip.lable)) }
However, this function does not match the tibble "node" column. My question then is, what is the "node" column signify in the
get.placements(j, "best")
?Thanks
epa_result.CCF.300.jplace.txt
The text was updated successfully, but these errors were encountered: