Create or modify a settings object containing the arguments for a run of the C++ program sampletrees.
newArgs(...)# S3 method for pars
changeArgs(object,...)
An object of class `pars'
Tags and the values they should be set to. A list of the tag names is given in the Value section
Returns an object of class `pars' which is a list with elements:
Run name for the sampletrees run (Default="Run")
Initial seed for sampletrees run. (Default=NA)
The type of the data file g=genotype h=haplotype. (Default="h")
The name of the file containing the haplotype or genotype data. DEFAULT=NA but the user must change this value before running sampletrees
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
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.
The location of the focal point. Default=NA but the user must change this value before running sampletrees
How long to run the chain. (Default=1000)
Discard the first 'BurnIn' samples. (Default=100)
Return output every 'Thinning'th sample. (Default=1)
Initial value for mutation rate theta. (Default=1)
Minimum for Uniform prior for theta. (Default=0.0001)
Maximum for Univorm prior for theta. (Default=10)
Initial value for recombination rate rho. (Default=0.0004)
Scale parameter for gamma prior for rho. (Default=0.1)
Shape parameter for gamma prior for rho. (Default=1)
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)
Indicates whether initial tree generated by randomly connecting nodes. (Default=FALSE)
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'.
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)
Name for a optional file containing a list of likely haplotypes (optional if DataType="g"). Each row corresponds to a haplotype. (Default=NA)
An indicator for whether the list passes the checks for a clean sampletrees run. In order to ensure no errors with sampletrees, the user should not modify this value and instead should run checkPars(). (Default=FALSE)
The function newArgs() initializes a list object of class `pars' that contains the settings for a run of sampletrees. The user can optionally pass arguments to newArgs to change some of the settings from their default values. The format for passing arguments to newArgs is: TagName=Value. The allowable tag names and their default values for an object of type 'pars' are given below in the Value section.
The function changeArgs modifies the values in a settings object of class `pars'. The arguments are passed to changeArgs in same way as to newArgs.
Note that although both functions allow list elements to be set to default values, before running sampletrees the user will have to provide non-default values for some elements (DataFile, LocationFile, WeightFile, FocalPoint). Using non-default values is recommended for ChainLength/BurnIn/Thinning as the default values are set to ensure short test runs.
Burkett KM, McNeney B, Graham J. Sampletrees and Rsampletrees: sampling gene genealogies conditional on SNP genotype data. Bioinformatics. 32:1580-2, 2016
checkArgs
# NOT RUN {
runpars=newArgs(DataFile="sequences_Theta8_Rho8.txt", DataType="h",
LocationFile="locations_Theta8_Rho8.txt",RunName="Test-h",FocalPoint=10000)
runpars=changeArgs(runpars, Seed=1938474, WeightFile="weights-h.txt")
# }
Run the code above in your browser using DataLab