agraph: Create an admixture graph object.

Description Usage Arguments Value See Also Examples

View source: R/agraph.R

Description

Create an admixture graph object, an acyclic directed graph.

Usage

1
2

Arguments

leaves

The names of the leaves in the admixture graph. Do not use (, ) or a single R.

inner_nodes

The name of the inner nodes in the admxture graph. Do not use (, ) or a single R except for the root if you wish.

parent_edges

The list of edges in the graph, created by parent_edges.

admixture_proportions

The list of admixture proportions; created by admixture_proportions. Do not use +, -, *, (, ).

Value

An admixture graph object.

See Also

edge

admixture_edge

admix_props

parent_edges

admixture_proportions

plot.agraph

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
leaves <- c("A", "B", "C", "D")
inner_nodes <- c("ab", "b", "bc", "abc", "abcd")
edges <- parent_edges(c(edge("A", "ab"),
                        edge("B", "b"),
                        edge("C", "bc"),
                        edge("D", "abcd"),
                        edge("ab", "abc"),
                        edge("bc", "abc"),
                        edge("abc", "abcd"),
                        admixture_edge("b", "ab", "bc")))
admixtures <- admixture_proportions(c(admix_props("b", "ab", "bc", "x")))

graph <- agraph(leaves, inner_nodes, edges, admixtures)

mailund/admixture_graph documentation built on April 3, 2018, 9:28 p.m.