Giter Club home page Giter Club logo

anemone's Introduction

aNEMOne

Build Status

An R package to create input files for and analyze output files from Nemo.

aNEMOne logo

Documentation

Nemo is an individual-based forward-time simulation program created and maintained by Fred Guillaume. The latest release is available for download here.

This package is meant to aid in writing input files for Nemo, particularly when dealing with large landscapes consisting of many patches that require large range-wide matrices for specifying dispersal distances or distances within which breeding can happen from a focal patch. See additions to the Nemo code documented here for some of the capabilities that this package is meant to deal with. Future updates will include functions for analyzing stat file outputs and other output files.

The package can be installed using devtools, which itself can be installed from CRAN with

install.packages("devtools")

Once devtools is installed, run

library(devtools)
install_github("kjgilbert/aNEMOne")
library(aNEMOne)

and the package will be installed and open.

Functions

An example script shows how this package's functions may be used to produce a .ini input file for Nemo.

The main function make.input takes all of the parameters that would normally appear in your input file with some defaults already set. See ?make.input for details. This function really provides no advantage unless you use the additional functions to create large matrices and kernels that can now be automatically inserted into the input file without worry about copy and paste or bracket errors.

  • make.delet.input does the same as above except has deleterious loci instead of neutral loci.

  • make.nemo.input makes inputs with deleterious loci and a quantitative trait for the newest release of Nemo, v2.3.46, and hence has no breeding window functionality.

Miscellaneous functions used for making inputs

  • See ?patch.cap for details on making an array of patch capacities. Currently only two different K's may be set across the landscape, but more may easily be added, so feel free to request so. This function also works for male and female specific carrying capacities as well as temporally set capacities.

  • See ?make.kernel.and.matrix for details on making connectivity matrices and probability kernels for dispersal and breeding windows. The function returns the array for the kernel and prints the connectivity matrix to file.

Selection landscape

  • See ?make.landscape for details on making the landscape of phenotypic optima for Nemo's selection_local_optima input parameter. The function returns the mean optimum value for the first column of landscape patches, visualizes the landscape, and write to file the matrix to be fed in for input.

  • See ?step.landscape for details on making a stepwise gradient landscape of phenotypic optima for Nemo's selection_local_optima input parameter. The function returns the optimum value for the first column of landscape patches, visualizes the landscape, and write to file the matrix to be fed in for input.

  • See ?changing.landscape for details on how to combine landscapes of two types or steepnesses.

Useful for running analyses on Westgrid or other similar Grid Engine clusters

  • make.pbs creates a PBS file for the provided .ini file. It is important that GrexLine.txt, MiddleLine.txt, and LastLine.txt are in the same directory as the .ini file (and the same holds for multi.pbs below).

  • multi.pbs creates PBS files for all .ini files in a directory.

Useful for running analyses on Ubelix or other similar slurm clusters

forthcoming

Handle outputs

  • dist.delet.effects Plots histograms of the effect sizes of deleterious mutations from a .del file.

  • delet.muts.over.landscape Plots heat maps of the numbers of homozygous, heterozygous, or total mutations over the landscape from a .del file.

  • sim.results.pop Plots the desired summary statistics from the output .stat file over all generations specified for saving data.

  • fit.results.landscape Plots heat maps of total fitness, or fitness for just the quantitative trait or just deleterious mutations, across the landscape from a .fit file.

Developer Notes

For sanity's sake, remember that the latest version of roxygen2 is not compatible for its method of creating .Rd documentation files. Current version is using roxygen2 v4.1.0, installed via install_version("roxygen2", version = "4.1.0", repos = "http://cran.us.r-project.org"). I think it is most likely just me that has not kept up with the latest R package development tools.

anemone's People

Stargazers

 avatar Jaime Ashander avatar Katie Lotterhos avatar peterdfields avatar

Watchers

Katie Lotterhos avatar

Forkers

ashander

anemone's Issues

nemo outputs

Hey Kim,
I'm getting ready to do some Nemo simulations with neutral loci and quantitative trait loci. I was wondering whether you had some scripts that convert the different output files for each type into a single file for analysis?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.