filter_GD_by_coverage: filters the GD counts by the species coverage of each of the...

Description Usage Arguments Details

View source: R/filter_GD_by_coverage.R

Description

filter_GD_by_coverage is to identify for each gd whether the two duplicated subclades contains species number more than a given level.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
filter_GD_by_coverage(
  phyto,
  node,
  trees,
  gdtable,
  sptree,
  split,
  tree_id_tab,
  sub_coverage = NULL,
  max.tip = NULL,
  up_one_node = FALSE,
  plot = 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.

sub_coverage

a numeric specify the species coverage level. If <= 1, treated as percentage. If > 1, treated as number of species.

max.tip

an integer specifying the max number of tips for the coverage filtering. Applied only when sub_coverage is set as percent (<= 1). Used as a cutoff for coverage as N tips as for deep nodes having large clades.

up_one_node

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

plot

whether to plot subclades. Defaults to FALSE.

pdfwid

the width of pdf file for subtrees. Defaults to 10.

pdflen

the length of pdf file for subtrees. Defaults to 30.

mc.cores

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

Details

returns a pdf plotting the gd clades, with gd pairs in red and other species in the same clade in sptree in green. A file with prefix "Include_or_not_" indicates for each tree and gd the requirement is fulfilled or not. A file with prefix "Trees_have_basal_tips_" shows the page number the tree fulfilled the requirement in the pdf file.


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