Title: | Package for running agent based model exploring genetic risks of aquaculture production |
---|---|
Description: | This package runs an agent based model in Python, exploring the genetic risks of aquaculture production on wild populations. |
Authors: | Eric J. Ward [aut, cre] , Dan Ovando [aut] , Natalie Lowell [aut] |
Maintainer: | Eric Ward <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.1 |
Built: | 2024-11-26 16:29:46 UTC |
Source: | https://github.com/nwfsc-cb/shellfish-genetic-risks |
Generate a control file from the default template
generate_ctrl_file(ctrl_file_name = "ctrl", destdir = ".")
generate_ctrl_file(ctrl_file_name = "ctrl", destdir = ".")
ctrl_file_name |
the desired name of the control file |
destdir |
the directory to store the control file in |
the file path of the control file
## Not run: generate_ctrl_file() ## End(Not run)
## Not run: generate_ctrl_file() ## End(Not run)
Install Required Python Packages
install_pypkgs(method = "auto", conda = "auto")
install_pypkgs(method = "auto", conda = "auto")
method |
python install method |
conda |
path to the conda executable |
## Not run: install_pylibs() ## End(Not run)
## Not run: install_pylibs() ## End(Not run)
load shellfish model
load_shellfish(condaenv = "r-reticulate")
load_shellfish(condaenv = "r-reticulate")
condaenv |
the Conda environment used |
## Not run: load_shellfish() ## End(Not run)
## Not run: load_shellfish() ## End(Not run)
plot_shellfish
returns a ggplot2
object with the desired plot specified by the type
argument.
plot_shellfish(results, type = "rvars")
plot_shellfish(results, type = "rvars")
results |
a list of results generated by |
type |
The type of plot to generate, one of
|
a ggplot2
object
## Not run: results <- serve_shellfish(batches = c("spam","eggs")) plot_shellfish(results, type = "rpart") ## End(Not run)
## Not run: results <- serve_shellfish(batches = c("spam","eggs")) plot_shellfish(results, type = "rpart") ## End(Not run)
Run all control files in a folder
run_ctrl_folder(ctrl_folder, reps = 1, cores = 1)
run_ctrl_folder(ctrl_folder, reps = 1, cores = 1)
ctrl_folder |
the location of the folder containing the control files |
reps |
the number of reps per control file |
cores |
the number of cores. Set to greater than 1 to run in parallel |
## Not run: run_ctrl_folder("my_control_files", cores = 6) ## End(Not run)
## Not run: run_ctrl_folder("my_control_files", cores = 6) ## End(Not run)
Run shellfishrisk from control file
run_shellfishrisk_ctrlfile( batch = "demo", reps = 1, coreid = 1, ctrl_file_path )
run_shellfishrisk_ctrlfile( batch = "demo", reps = 1, coreid = 1, ctrl_file_path )
batch |
the name of the batch |
reps |
the number of reps to run |
coreid |
no id |
ctrl_file_path |
the file path to the control file to be used |
nothing
Load and Serve Shellfish Genetics Results
serve_shellfish(batches, results_dir = NA)
serve_shellfish(batches, results_dir = NA)
results_dir |
the name of the directory where results are stored |
batch |
the name of the batch of results |
a list containing each of the results objects
## Not run: results <- serve_shellfish(batch = "dev") ## End(Not run)
## Not run: results <- serve_shellfish(batch = "dev") ## End(Not run)
ggplot2 theme for shellfishrisks
theme_shellfish(...)
theme_shellfish(...)
... |
ggplot(mtcars, aes(mpg)) + geom_histogram() + shellfishrisks::theme_shellfish()
ggplot(mtcars, aes(mpg)) + geom_histogram() + shellfishrisks::theme_shellfish()