localPCA is an R-package that uses the R-package lostruct to perform genome-wide local PCA scans (following Li & Ralph 2019 method) through a reproducible pipeline.
This is the github version of the package. The original version can be found on IRD Forge, here. This package and the methods implemented have been jointly developped with Marine Salson and will soon be published (tba).
The pipeline is divided into three main functions in the R-package:
# actual lostruct() analysis run across a defined window-size.
loPCA()
# Extract significantly divergent genomic windows (from genome-wide pattern)
# and cluster them into outlier genomic regions.
getRegion()
# Perform K-means clustering and compute Ho (observed hterozygosity) for each outlier genomic regions.
# Output summary table and plots for visual inspection of candidate inverted regions.
detectInv()You can install the development version of localPCA either directly in R:
devtools::install_github("stella-huynh/localPCA")or by cloning the repository:
git clone git@github.com:stella-huynh/localPCA.git #local bash command-line
devtools::build("<path/to/package>") #in RThis package comes with example results from the three main functions loPCA(), getRegion() and detectInv(), respectively accessible as follows:
library(localPCA)
data("winList")
data("regList")
data("invList")