plotggMST: Function to plot a minimum spanning tree of the class...

Description Usage Arguments Author(s) Examples

View source: R/plotggMST.R

Description

Function to plot a minimum spanning tree for an individual using the mst function from ape and positioning the nodes according to the fruchtermanreingold in sna. The size of the nodes correspond to the number of copies for that particular sequence.

Usage

1
  plotggMST(x,individualID=NULL,locus=NULL)

Arguments

x

An object of the class "obkData"

locus

a character or integer indicating the loci to be used; if NULL, checks will be made to check that only one locus is in the object.

individualID

a character or integer to specify the individual identifier to draw the minimum spanning tree for.

Author(s)

Joseph Hughes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
## load data
data(HorseFlu)
x <- HorseFlu

## plot minimum spanning tree for individual 42
plotggMST(x,individualID=42)

## another example data
data(ToyOutbreak)
x <- ToyOutbreak

## plot minimum spanning tree for gene1
plotggMST(x, locus="gene1")


## End(Not run)

Example output

Loading required package: ggplot2
Loading required package: network
network: Classes for Relational Data
Version 1.13.0 created on 2015-08-31.
copyright (c) 2005, Carter T. Butts, University of California-Irvine
                    Mark S. Handcock, University of California -- Los Angeles
                    David R. Hunter, Penn State University
                    Martina Morris, University of Washington
                    Skye Bender-deMoll, University of Washington
 For citation information, type citation("network").
 Type help("network-package") to get started.

Loading required package: knitr
 OutbreakTools 0.1-14 has been loaded

[1] 1
[1] "gene1"

OutbreakTools documentation built on Oct. 6, 2017, 1:03 a.m.