-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathCS.prep.Rd
77 lines (59 loc) · 3.19 KB
/
CS.prep.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CS_prep.R
\name{CS.prep}
\alias{CS.prep}
\title{Prepare and bundle input CIRCUITSCAPE model parameters}
\usage{
CS.prep(n.Pops,
response,
covariates = NULL,
formula = NULL,
CS_Point.File,
CS.program,
Neighbor.Connect,
pairs_to_include,
platform,
parallel,
cores)
}
\arguments{
\item{n.Pops}{The number of populations that are being assessed}
\item{response}{Vector of pairwise genetic distances (lower half of pairwise matrix).}
\item{covariates}{Data frame of additional covariates that you want included in the MLPE model during opitmization.}
\item{formula}{If covariates are included in the model, specify the R formula for the fixed effects portion of the MLPE model.}
\item{CS_Point.File}{The path to the Circuitscape formatted point file. See Circuitscape documentation for help.}
\item{CS.program}{The path to the CIRCUITSCAPE executable file (cs_run.exe) on a Windows PC. If using a Linux or Mac system, provide the full path to the "csrun.py" file. See details below.}
\item{Neighbor.Connect}{Select 4 or 8 to designate the connection scheme to use in CIRCUITSCAPE (Default = 8)}
\item{pairs_to_include}{Default is NULL. If you wish to use the advanced CIRCUITSCAPE setting mode to include or exclude certain pairs of sample locations, provide the path to the properly formatted "pairs_to_include.txt" file here. Currently only "include" method is supported.}
\item{platform}{What computing platform are you using ("pc", "other"). This code has only been tested on Windows PC!!!}
\item{parallel}{(Logical) If using Linux / Ubuntu, do you want to run CIRCUITSCAPE in parallel?}
\item{cores}{If using Linux / Ubuntu and `parallel = TRUE`, how many cores should be used for parallel processing?}
}
\value{
An R object that is a required input into optimization functions
}
\description{
This function will prepare objects needed for running optimization functions
}
\details{
IT IS HIGHLY RECOMMENDED THAT YOU LOOK INTO USING THE JULIA VERSION OF CIRCUITSCAPE. THIS FUNCTION IS NO LONGER BEING ACTIVELY SUPPORTED OR UPDATED.
\code{CS.program} Example of path to CIRCUITSCAPE executible on Windows:
'"C:/Program Files/Circuitscape/cs_run.exe"'
***NOTE: Double quotation used***
This is the current default for \code{CS.program}, but the directory may need to be changed depending upon your installation of CIRCUITSCAPE
Linux
To call CIRCUITSCAPE from R on with Linux, first change file permissions from the command line terminal (shortcut: control + alt+ t) ` sudo chomod 755 /usr/local/bin/csrun.py `
Then specify \code{CS.program} as `csrun.py`
Only with Linux, \code{parallel} can be set to \code{TRUE}, and the number of cores to run in parallel can be specified with \code{cores}.
The Linux and Mac versions are in development. Please let me know if you encounter errors.
When specifying a formula, provide it as: \code{response ~ covariate}.
the formula \code{response} will use the vector of values specified for the \code{response} parameter. Make sure that covariate names match variable names provided in \code{covariates}
}
\examples{
## Not run:
## *** TO BE COMPLETED *** ##
## End (Not run)
}
\author{
Bill Peterman <[email protected]>
}