knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
IPCAPS2
is an unsupervised clustering algorithm based on
iterative pruning to capture population structure. This version supports ordinal
data which can be applied directly to SNP data to identify fine-level population
structure and it is built on the iterative pruning Principal Component Analysis
(ipPCA) algorithm by Intarapanich et al. (2009) rubikclust()
from the R package KRIS
.
You can install the released version of IPCAPS2 from CRAN with:
install.packages("IPCAPS2")
Alternatively, you can install the dev version of IPCAPS2 from Github with
install.packages("remotes") remotes::install_github("kridsadakorn/ipcaps2", dependencies = TRUE)
You can see the reference manual from: https://www.biostatgen.org/ipcaps/
This is a basic example which shows you how to use the packages:
library(IPCAPS2) BED.file <- system.file("extdata", "ipcaps_example.bed", package = "IPCAPS2") LABEL.file <- system.file("extdata", "ipcaps_example_individuals.txt.gz", package = "IPCAPS2") my.cluster1 <- ipcaps2(bed = BED.file, label.file = LABEL.file, lab.col = 2, out = tempdir(), silence = TRUE)
The function ipcaps
does unsupervised clusering, and here is the result:
table(my.cluster1$cluster$label, my.cluster1$cluster$group)
The output directory will be indicated in the console or in my.cluster1$output.dir
. All result files are saved at:You can naviage to check the html
visualizations in the output directory.
print(my.cluster1$output.dir) list.files(my.cluster1$output.dir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.