run_msreject: Run MsReject

Description Usage Arguments Value

View source: R/run_msreject.R

Description

This is wrapper function for running the msReject in msbayes.For installing/compiling msReject see [msbayes webpage](http://msbayes.sourceforge.net/).

Usage

1
2
3
4
5
6
7
8
9
run_msreject(
  hyperstat,
  reference.table,
  MsRejectallocation,
  samplingtolerance,
  prefix = "temp",
  hbayeSSC.style = T,
  write.posterior.file = F
)

Arguments

hyperstat

A vector containing the "observed" hyperstats from step 1

reference.table

A data frame containing the hyperstats from ABC simulation(step 2). The column name of this data frame must match the names of hyperstat vector

MsRejectallocation

A character string. The location of the msReject (including the executable itself)

samplingtolerance

Numeric. The sampling fraction for msReject

prefix

A character string for writing the "observed" hyperstat and reference table to files, prefix_hyperstat_file and prefix_reference_table, respectively

hbayeSSC.style

TRUE(Default) or FALSE.In hBayeSSC, running msReject involves using the hyperstats of haptypes, hapdiv, nucdiv, tajimasD.

write.posterior.file

TRUE or FALSE(Default). If TRUE, the retained abc simulation replicates will be write to a file named prefix_Posterior. If False, they will be returned as a data frame

Value

If write.posterior.file is FALSE, this function returns a data frame containing the retained rows from reference table after rejection. The first column is 'uid', the replicates number, the second column is the number of events, and the third column is the total number of species. Following are columns for the "real" expansion time for each species in the simulation, and then, the columns of hyperstats.If write.posterior.file is TRUE, this function returns the file name (including the path) of the posterior file.


huatengh/CoExpansionValidation documentation built on Nov. 19, 2021, 11:07 a.m.