Package 'shellfishrisks'

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

Help Index


Generate a control file from the default template

Description

Generate a control file from the default template

Usage

generate_ctrl_file(ctrl_file_name = "ctrl", destdir = ".")

Arguments

ctrl_file_name

the desired name of the control file

destdir

the directory to store the control file in

Value

the file path of the control file

Examples

## Not run: 

generate_ctrl_file()

## End(Not run)

Install Required Python Packages

Description

Install Required Python Packages

Usage

install_pypkgs(method = "auto", conda = "auto")

Arguments

method

python install method

conda

path to the conda executable

Examples

## Not run: 
install_pylibs()

## End(Not run)

load shellfish model

Description

load shellfish model

Usage

load_shellfish(condaenv = "r-reticulate")

Arguments

condaenv

the Conda environment used

Examples

## Not run: 
load_shellfish()

## End(Not run)

Plot Shellfish

Description

plot_shellfish returns a ggplot2 object with the desired plot specified by the type argument.

Usage

plot_shellfish(results, type = "rvars")

Arguments

results

a list of results generated by shellfishrisks::serve_shellfish

type

The type of plot to generate, one of

  • "rvars": plot values from the pop_rvars objects

  • "fst": plot fst outcomes

  • "popsize": plot the subpopulation sizes

Value

a ggplot2 object

Examples

## Not run: 

results <- serve_shellfish(batches = c("spam","eggs"))

plot_shellfish(results, type = "rpart")



## End(Not run)

Run all control files in a folder

Description

Run all control files in a folder

Usage

run_ctrl_folder(ctrl_folder, reps = 1, cores = 1)

Arguments

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

Examples

## Not run: 

run_ctrl_folder("my_control_files", cores = 6)


## End(Not run)

Run shellfishrisk from control file

Description

Run shellfishrisk from control file

Usage

run_shellfishrisk_ctrlfile(
  batch = "demo",
  reps = 1,
  coreid = 1,
  ctrl_file_path
)

Arguments

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

Value

nothing


Load and Serve Shellfish Genetics Results

Description

Load and Serve Shellfish Genetics Results

Usage

serve_shellfish(batches, results_dir = NA)

Arguments

results_dir

the name of the directory where results are stored

batch

the name of the batch of results

Value

a list containing each of the results objects

Examples

## Not run: 

results <- serve_shellfish(batch = "dev")


## End(Not run)

ggplot2 theme for shellfishrisks

Description

ggplot2 theme for shellfishrisks

Usage

theme_shellfish(...)

Arguments

...

Examples

ggplot(mtcars, aes(mpg)) + geom_histogram() + shellfishrisks::theme_shellfish()