getIBDiclusters: Interval Cluster Networks

Description Usage Arguments Value See Also Examples

Description

getIBDiclusters() produces a network of clusters of isolates that have been inferred IBD over a specified interval. Isolates that are not IBD over the interval are not included in the network or output. The networks are created using the R package igraph.

Usage

1
2
getIBDiclusters(ped.genotypes, ibd.segments, interval = NULL, prop = 0,
  hi.clust = FALSE)

Arguments

ped.genotypes

A list containing 2 objects. See the Value description in getGenotypes for more details on this input.

ibd.segments

A data frame containing the IBD segments detected by isoRelate. See the Value description in getIBDsegments for more details on this input.

interval

A vector of length 3 containing the region to identify clusters over. This vector should contain the chromosome ID, the start of the interval in base-pairs and the end of the interval in base-pairs; in this order respectively.

prop

Numeric value between 0 and 1 (inclusive). The minimum proportion of an interval (in base-pairs) shared IBD between a pair of isolates in order for the pair to be included in the network. For example, if prop=1 then two isolates will be included if they are IBD over the entire interval, whereas prop=0.5 will include isolates that are IBD over at least 50% of the interval. The default is prop=0, which includes isolates if they have an IBD segment that overlaps the interval in any way.

hi.clust

Logical. Whether to perform hierarchical clustering using the fastgreedy.community approach in the igraph package.

Value

A list of three objects named clusters, i.network and hi.clust:

  1. A list where each object contains the names of isolates that form a disjoint cluster in the network. If hierarchical clustering has been performed then the clusters may not be disjoint.

  2. An igraph network used in the construction of network plots. See http://igraph.org/r/ doe more details.

  3. Logical. Whether or not hierarchical clustering has been performed.

See Also

getGenotypes, getIBDsegments and getIBDpclusters.

Examples

1
2
3
4
5
6
7
8
# generate the isolates who are IBD over the Plasmodium falciparum CRT gene
my_i_clusters <- getIBDiclusters(ped.genotypes = png_genotypes,
                                 ibd.segments = png_ibd,
                                 interval = c("Pf3D7_07_v3", 403222, 406317),
                                 prop=0,
                                 hi.clust = FALSE)

str(my_i_clusters)

bahlolab/isoRelate documentation built on May 11, 2019, 5:25 p.m.