run.Structure: Run Structure anaylsis

Description Usage Arguments See Also Examples

Description

This function analyses data using Structure.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
run.Structure(x, NUMRUNS, MAXPOPS, BURNIN, NUMREPS, NOADMIX, ADMBURNIN,
  FREQSCORR, UPDATEFREQ, M, W, S, REPEATS, dir, clean, verbose, threads, SEED)

## S3 method for class 'StructureData'
run.Structure(x, NUMRUNS = 2, MAXPOPS = 1:10,
  BURNIN = 10000, NUMREPS = 20000, NOADMIX = FALSE, ADMBURNIN = 500,
  FREQSCORR = TRUE, UPDATEFREQ = max(floor(BURNIN + NUMREPS)/1000, 1),
  M = "Greedy", W = TRUE, S = FALSE, REPEATS = 1000, dir = tempdir(),
  clean = TRUE, verbose = FALSE, threads = 1, SEED = sample.int(1e+05,
  NUMRUNS * length(MAXPOPS)))

## S3 method for class 'list'
run.Structure(x, NUMRUNS = 2, MAXPOPS = 1:10,
  BURNIN = 10000, NUMREPS = 20000, NOADMIX = FALSE, ADMBURNIN = 500,
  FREQSCORR = TRUE, UPDATEFREQ = max(floor(BURNIN + NUMREPS)/1000, 1),
  M = "Greedy", W = TRUE, S = FALSE, REPEATS = 1000,
  dir = file.path(tempdir(), seq_along(x)), clean = TRUE, verbose = FALSE,
  threads = 1, SEED = sample.int(1e+05, NUMRUNS * length(MAXPOPS) *
  length(x)))

Arguments

x

StructureData object.

NUMRUNS

numeric Number of replicate Structure runs. Defaults to 2.

MAXPOPS

numeric Number of populations assumed. Defaults to 2.

BURNIN

numeric Length of burnin period. Defaults to 10000.

NUMREPS

numeric Number of MCMC iterations for inference. Defaults to 20000.

NOADMIX

logical Do not use admixture model. Defaults to FALSE.

ADMBURNIN

numeric Initial period of burnin with admixture model. Defaults to 500.

FREQSCORR

logical Allele frequencies are correlated among populations? Defaults to TRUE.

UPDATEFREQ

numeric Frequency to store updates to loglikelihood for traceplots. Defaults to yield 1000 frequencies.

M

character name of search method. Valid arguments are 'FullSearch', 'Greedy', or 'LargeKGreedy'. Defaults to 'Greedy'.

W

logical weight populations by number of individuals? Defaults to TRUE.

S

logical if TRUE the G matrix similarity statistic used used. Else the G \prime statistic is used. Defaults to codeFALSE.

REPEATS

numeric Number of random input orders tested. Defaults to 1000.

dir

character with directory to use for analysis.

clean

logical should input and output files be deleted after analysis is finished?

verbose

logical should messages be printed during processing?

threads

numeric number of threads to use for processing. Defaults to 1.

SEED

numeric Seed for random number generator. Defaults to NA so a random seed is used.

See Also

StructureData, StructureOpts.

Examples

1
2
3
4
5
6
7
# run Structure using low number of iterations
dat <- read.StructureData(system.file('extdata', 'example_fstat_aflp.dat', package='structurer'))
x <- run.Structure(dat, NUMRUNS=2, MAXPOPS=1:3, BURNIN=10, NUMREPS=10, NOADMIX=FALSE, ADMBURNIN=10)
# run Structure for a list of two StructureData objects
x2 <- run.Structure(list(dat, dat), NUMRUNS=2, MAXPOPS=1:3, BURNIN=10, NUMREPS=10, NOADMIX=FALSE, 
 ADMBURNIN=10)
print(x)

jeffreyhanson/structurer documentation built on May 19, 2019, 4:01 a.m.