Convert return of functions in sitePath package to a
data.frame so can be better worked with. The group name for
each tip is the same as groupTips.
A fixationSites object will output the mutation
name of the fixation and the cluster name before and after the mutation.
An SNPsites object will output the tip name with
the SNP and its position.
An parallelSites object will output the tip name
with the group name and mutation info.
# S3 method for fixationSites
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
# S3 method for SNPsites
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
# S3 method for parallelSites
as.data.frame(x, row.names = NULL, optional = FALSE, ...)The object to be converted to data.frame.
Unimplemented.
Unimplemented.
Other arguments.
A data.frame object.
data(zikv_tree_reduced)
data(zikv_align_reduced)
tree <- addMSA(zikv_tree_reduced, alignment = zikv_align_reduced)
fixations <- fixationSites(lineagePath(tree))
as.data.frame(fixations)
#> mutation from to
#> 1 V784L 3.1.1 3.1.2
#> 2 V988A 1.1.1 2.1.1
#> 3 T196A 3.2.1 3.2.2
#> 4 S139N 1.1.1 2.2.1
#> 5 G894A 2.2.2 2.2.3
#> 6 V1542I 2.2.4 2.2.5
#> 7 M2074L 2.2.2 2.2.3
#> 8 Y2086H 1.1.1 2.2.1
#> 9 M2634V 2.2.1 2.2.2
#> 10 R3045C 2.2.3 2.2.4