Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/post_sampletrees.R
This function can be used to concatenate the results of two consecutive runs of sampletrees.
1 2 |
x |
An object of class ‘treeoutput’ with results from the first sampletrees run |
y |
An object of class ‘treeoutput’ with results from the second sampletrees run. |
runname |
The name to give the merged run |
... |
additional arguments to merge; currently unused |
The function restartRun can be used to set options for starting sampletrees where a previous run finished. Once the second run is complete, it is useful to merge the processed output of the two runs. This function does not merge the actual files; instead, a new object of class ‘treeoutput’ is created that stores the run information, the merged Theta values, Rho values, and any tree summaries that were computed. Note that it assumes that the same tree summaries were computed on both of the runs. To save the merged results use writeTreeoutput.
In order to set values for the first sample and last sample, the value of the thinning interval is used. The computation assumes that the thinning interval is the same for both sets of output. A warning is given if they are not the same, but computation is not stopped; the thinning for the first set of output is assumed.
Returns a list of class ‘treeoutput’ with values set to those in output1 and output2.
Kelly Burkett
Burkett KM, McNeney B, Graham J. Sampletrees and Rsampletrees: sampling gene genealogies conditional on SNP genotype data. Bioinformatics. 32:1580-2, 2016
restartRun, writeTreeoutput
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #\dontrun{
#system.file("Examples/example_h_pars",package="Rsampletrees")
#paste(system.file(package="Rsampletrees"),runpars$RunName, sep="/")
filename=paste(path.package("Rsampletrees"),"/extdata/example_h_pars",sep="")
runpars=readArgs(filename, check=FALSE)
runname=paste(path.package("Rsampletrees"),"extdata",runpars$RunName, sep="/")
runpars=changeArgs(runpars, RunName=runname)
results1=readOutput(argobj=runpars)
#system.file("Examples/example_h_2_pars",package="Rsampletrees")
#paste(system.file(package="Rsampletrees"),runpars$RunName, sep="/")
filename=paste(path.package("Rsampletrees"),"/extdata/example_h_2_pars",sep="")
runpars=readArgs(filename, check=FALSE)
runname=paste(path.package("Rsampletrees"),"extdata",runpars$RunName, sep="/")
runpars=changeArgs(runpars, RunName=runname)
results2=readOutput(argobj=runpars)
newresults=merge(x=results1, y=results2, runname="Merge2000")
#}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.