detect_closest_out_for_GD: Detect the existence of the closest outgroups for each gd

Description Usage Arguments Details Examples

View source: R/detect_closest_out_for_GD.R

Description

detect_closest_out_for_GD is to find out whether each gd has tips of its sister clade as the closest outgroup, in order to verify the support of gd. The returning object contains a simple summary for the number and percent of gd that has the closest outgroup. This function will also produce pdf files plotting subclade of each gd, with tips colored, for easier manual investigation when required.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
detect_closest_out_for_GD(
  phyto,
  node,
  trees,
  gdtable,
  sptree,
  split,
  tree_id_tab,
  up_one_node = FALSE,
  pdfwid = 10,
  pdflen = 30,
  mc.cores = 4
)

Arguments

phyto

the phyto id for the analysis.

node

a numeric indicating the target node id as in ape. An alternative arg of phyto.

trees

a list of objects of class "phylo". A list of gene trees to be examined. Can be unrooted.

gdtable

a data.frame of the gd table file provided by Tree2GD.

sptree

the species tree used to do tree reconciliation.

split

a character. The symbol used to separate species name and the sequence number in the gene family trees.

tree_id_tab

a table for the tree id during Tree2GD and the name of the corresponding tree file. The first column is the id, and the second column is the tree names.

up_one_node

logical. Whether to choose tips of one node deeper as the closest outgroup, as a second step of investigation. Default FALSE.

pdfwid

the width of pdf file for subtrees. Default 10.

pdflen

the length of pdf file for subtrees. Default 30.

mc.cores

the number of cores used for mclapply. Defaults to 4.

Details

For each gd, detect whether there are closest outgroups exactly next to the duplicated node, that can actually define the gd at the indicated node. Otherwise, gd will be possible to be at other (deeper) nodes as well.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
res<-
detect_closest_out_of_GD(
phyto,trees = trees,gdtable = gdtable,
sptree = sptree,split=".",tree_id_tab = tree_id_tab,
up_one_node=FALSE,pdfwid = 20,pdflen = 100)

res

## End(Not run)

Chien-Hsun/rePhylo documentation built on May 19, 2020, 3:15 a.m.