| graph.params-class {poolfstat} | R Documentation |
S4 class to represent a population tree or admixture graph and its underlying parameter.
Description
S4 class to represent a population tree or admixture graph and its underlying parameter.
Details
The graph is specified by a three column (character) matrix giving for each edge (whether admixed or not) to i) the child node; ii) the parent node; iii) the admixture proportion. For non-admixed edge, the third column must be blank. An admixed node should be referred two times as a child node with two different parent node and two different admixture proportions coded as alpha and (1-alpha) (parentheses are mandatory) if alpha is the name of the parameter for admixture proportion. The dot.graph element allows to plot the graph using grViz() from the DiagrammeR package or with the dot program after writing the files (e.g., dot -Tpng inputgraph.dot in terminal). Note that the dot file may be customized (e.g., to change leave color, parameter names...).
Slots
graphThe graph in 3 column format (see details)
dot.graphThe graph in dot format
is.admgraphIf FALSE the graph is binary tree (i.e., no admixture events), if TRUE the graph is an admixture graph
n.leavesNumber of leaves of the graph
leavesName of the leaves
root.nameName of the root
n.nodesNumber of nodes (including root)
nodes.namesName of the nodes
n.edgesNumber of edges (including admixture edges)
edges.namesNames of the edges (coded as "Parent node Name"<->"Child node Name")
n.adm.nodesNumber of admixed nodes (=0 if is.admgraph=FALSE). This is also the number of admixed parameters since only two-ways admixture are assumed for a given node
adm.params.namesNames of the admixed parameters
graph.matrixThe graph incidence matrix consisting of n.leaves rows and n.edges columns. The elements of the matrix are the weights of each edge (in symbolic representation) for the different possible paths from the leaves to the graph root.
root.edges.idxIndexes of the graph.matrix columns associated to the (two) edges connected to the root
f2.targetThe (n.leaves-1) stats F2 involving popref (i.e., of the form F2(popref;pop))
f2.target.popsA matrix of (n.leaves-1) rows and 2 columns containing the names of populations of the F2 stats. The first column is by construction always popref. The order is the same as in f2.target
f3.targetThe (n.leaves-1)(n.leaves-2)/2 stats F3 involving popref as a target (i.e., of the form F3(popref;popA,popB))
f3.target.popsA matrix of (n.leaves-1)(n.leaves-2)/2 rows and 3 columns containing the name of popref in the first column and the names of the two populations involved in the F3 stats. The order is the same as in f3.target
poprefThe name of the reference population defining the fstats basis
f.QmatA square matrix of rank n.leaves(n.leaves-1)/2 corresponding to the error covariance matrix of the F2 and F3 estimates
HetEstimated leave heterozygosities (if present in the fstats object)
See Also
To generate graph.params object, see generate.graph.params. The object may be used to estimate graph parameters with the function fit.graph or to generate files for the qpGraph software with graph.params2qpGraphFiles. See also graph.params2symbolic.fstats to obtain symbolic representation of Fstats from the matrix "Omega".