README.md

Linkage Disequilibrium Analysis

Package with an automatized workflow to 'rehh' package's functions.

Installation

if (!requireNamespace("devtools")) install.packages("devtools")
devtools::install_github("cmcouto-silva/LD")
library(LD)

Workflow instructions

Supposing you're handling a dataset with chromossomes from 1 to 22, here is your to-do steps:

Initialization:
ldstart()

This creates five folders: 'haplotypes', 'populations', 'snps', 'rehh_in', and 'rehh_out'.

Then all you have to do (manually) is to put your haplotypes' files in the 'haplotypes' folder, the populations' files in the 'populations' folder, and the target-SNPs' files in the 'snps' folder. All haplotypes' files must be in conventional .haps/.sample format (standard output from Shapeit Sofware). Population and SNP's files must be text files (.txt) with a single ID per line.

For more details, see help(ldstart)

Following workflow steps are as simple as:

# Produce required files
make.binary.haplotypes()
make.input.files()
make.scanhh()

# Load 'scanhh.list'
load("./scanhh.RData")

# Computing Statistics and generating result files
ihs()
xpehh(scanhh.list$population1, scanhh.list$population2)
rsb(scanhh.list$population1, scanhh.list$population2)

At the end of this workflow you'll have:

This package has been created pursuing an easy, simple, and fast execution of a workflow for linkage disequilibrium analysis, using algorithm's computations avaialable in 'rehh' package (which reproduce Statistics proposed by the original papers). Therefore, there is a reasonable kind of freedom restriction expected to users. Nevertheless, a useful set of parameters are available and can be consulted in the help session for each function.

The R binary file from class "haplohh" named "haps-sample.RData" allows users to run rehh::scanhh() function with desired arguments available in rehh package's parameters, while R binary file named "scanhh.RData" allows users to perform all set of algorithms available in 'rehh' package as they want to, giving them freedom of parameters/arguments choice and data manipulation.

This workflow works just on Unix-based platforms (e.g. Linux and MAC OS). In the next few days will be implemented an internal-function that enables Windows users to use it as well.

Vignettes and reproducible example files will be included soon.

Best regards,

CainĂ£ Max Couto-Silva


cmcouto-silva/LD documentation built on Sept. 20, 2020, 2:46 p.m.