changeArgs.treeoutput: Modify the settings stored in a sampletrees treeoutput object

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/post_sampletrees.R

Description

Modify the settings stored in a sampletrees treeoutput object.

Usage

1
2
## S3 method for class 'treeoutput'
changeArgs(object,...)

Arguments

object

An object of class ‘treeoutput’

...

Optional tag names and the value they should be set to. See Details section.

Details

The function changeArgs modifies the settings values from a run of sampletrees (the settings are stored in the runinfo component of the treeoutput object). The format for passing arguments to this function is: TagName=Value. The names are given in the Value section.

Value

Returns an object of class ‘treeoutput’ with the runinfo settings modified as specified.

The settings names in the runinfo component are:

RunName

Run name for the sampletrees run (Default="Run")

Seed

Initial seed for sampletrees run. (Default=NA)

DataType

The type of the data file g=genotype h=haplotype. (Default="h")

DataFile

The name of the file containing the haplotype or genotype data. DEFAULT=NA but the user must change this value before running sampletrees()

LocationFile

The name of the file containing the genomic locations (in base pairs) of the SNP markers. Default=NA but the user must change this value before running sampletrees()

WeightFile

The name of the file containing the probabilities for sampling each of the 7 updates. Default=NA but the user must change this value before running sampletrees(). See setWeights for more information.

FocalPoint

The location of the focal point. Default=NA but the user must change this value before running sampletrees()

ChainLength

How long to run the chain. (Default=1000)

BurnIn

Discard the first 'BurnIn' samples. (Default=100)

Thinning

Return output every 'Thinning'th sample. (Default=1)

InitialTheta

Initial value for mutation rate theta. (Default=1)

MinTheta

Minimum for Uniform prior for theta. (Default=0.0001)

MaxTheta

Maximum for Univorm prior for theta. (Default=10)

InitialRho

Initial value for recombination rate rho. (Default=0.0004)

ScaleRho

Scale parameter for gamma prior for rho. (Default=0.1)

ShapeRho

Shape parameter for gamma prior for rho. (Default=1)

InitialTreeFile

Name for a file containing initial tree data for a run of sampletrees. These are typically available from a previous run of sampletrees. If DataType="g", initial haplotype configurations will be taken from this file rather than one specified by InitialHaploFile. (Default=NA)

RandomTree

Indicates whether initial tree generated by randomly connecting nodes. (Default=FALSE)

HaploFreqFile

The name of the file with the haplo frequency estimates to be used only if DataType="g". See estimateHapFreqs() for more information. Default=NA but user must change this value if DataType is 'g'.

InitialHaploFile

Name for an optional file containing the initial haplotype configurations for the sampletrees run (optional if DataType="g"). Each row of this file corresponds to a haplotype, there are 2 rows/individual and rows must be in the same order as in DataFile. (Default=NA)

HaploListFile

Name for a optional file containing a list of likely haplotypes (optional if DataType="g"). Each row corresponds to a haplotype. (Default=NA)

Author(s)

Kelly Burkett

References

Burkett KM, McNeney B, Graham J. Sampletrees and Rsampletrees: sampling gene genealogies conditional on SNP genotype data. Bioinformatics. 32:1580-2, 2016

See Also

changeArgs.pars, checkArgs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#\dontrun{
 #system.file("Examples/example_g_pars",package="Rsampletrees")
filename=paste(path.package("Rsampletrees"),"/extdata/example_g_pars",sep="")
runpars=readArgs(filename, check=FALSE)
#paste(system.file(package="Rsampletrees"),runpars$RunName, sep="/")
runname=paste(path.package("Rsampletrees"),"extdata",runpars$RunName, sep="/")
runpars=changeArgs(runpars, RunName=runname)
results=readOutput(argobj=runpars)
results=changeArgs(results, RunName="NewName")
#}

Rsampletrees documentation built on March 3, 2020, 1:07 a.m.