Developed by: Kamil S Jaron, Amina Echchiki
ConjunctionStats
is a package for parsing the output of
Conjunction into R, to
allow statistical analysis.
ConjunctionStats requires two packages to be installed "hzar" and "RColorBrewer".
In terminal:
git clone https://github.com/KamilSJaron/ConjunctionStats.git
cd ./ConjunctionStats/
In R:
# install.packages('hzar')
# install.packages('RColorBrewer')
install.packages("./ConjunctionStats", repos = NULL, type="source")
In R:
# install.packages("devtools")
library(devtools)
install_github("KamilSJaron/ConjunctionStats", build_vignettes=FALSE)
library(ConjunctionStats)
# display function source code: FunctionName
# display function documentation: ?FunctionName
# example
ReadSetting
?ReadSetting
Here we only list all the functions, detailed descritions you can find in the manual pages of functions and plenty of examples you can find at repository ConjunctionExamples
ConjunctionStats nomenclature
Read...
functions are reading files.Fill...
functions are outputing an input object with some newly computed staticticsTrim...
functions are outputing an input object trimmed # if(get == trim){I should merge them}Get...
finctions are outputing a summary, statistics or reduced input objectPlot...
functions are plotting usually using paletes from package Rcolorbrewer
The core and the main purpose of the package is to provide an easy way how to import Conjunction output to R and compute some statistics.
0D
to fill
1D or 2D
setting <- ReadSetting(setting_file) # reads setting file, returns a dataframe of performed simulations
sims <- ReadSummary(out_file) # reads output file, returns a list of dataframes of demes of simulations
setting <- FillSetting(sims, setting, method='hzar') # add estimates of widths to setting frame using non-linear fitting of logistic function, depreciated for multilocus clines
The second part of the package is used for plotting common hybrid zone graphics. See man pages of funcitons to see details.
# high level plotting functions
PlotSim(...) # plot mean hybrid index, mean LD and average fitness across demes of one simulation
PlotStat(...) # make a dot plot with coloring of points according one of variables
# purely low level function
PlotAverages(...) # add averages to a plot, usually combined with PlotStat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.