fwd.phen.sim: Simulate a phenotype, from root to tips.

View source: R/fwd.phen.sim.R

fwd.phen.simR Documentation

Simulate a phenotype, from root to tips.

Description

[*An exploratory function:*] Having already simulated a genotype, this function allows you to simulate an associated phenotype along the tree, from root to tips.

Usage

fwd.phen.sim(snps.assoc, p = 1, tree = NULL)

Arguments

snps.assoc

A matrix created by the fwd.snp.sim function, which indicates where genotypic substitutions occur on the tree at phenoypically-associated sites.

p

An integer specifying the probability of phenotypic substition, given genotypic substitution (see details).

tree

An phylo object.

Details

The parameter p controls the simulation of the phenotype by specifying the expected value of the number of phenotypic substitions to occur on the tree provided, given that a genotypic substitution has occurred on a particular branch of the tree.

Author(s)

Caitlin Collins caitiecollins@gmail.com

Examples


## basic use of fn
tree <- coalescent.tree.sim(n.ind = 100, seed = 1)

## plot output
plot(tree)


caitiecollins/treeWAS documentation built on March 9, 2024, 3:15 p.m.