knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

IPCAPS

R-CMD-check CRAN status codecov License: GPL v3 Lifecycle: maturing DOI

IPCAPS 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) and Limpiti et al. (2011). The IPCAPS involves an iterative process using multiple splits based on multivariate Gaussian mixture modeling of principal components and Clustering EM estimation as in Lebret et al. (2015) . In each iteration, rough clusters and outliers are also identified using the function rubikclust() from the R package KRIS.

Installation

You can install the released version of IPCAPS from CRAN with:

install.packages("IPCAPS")

Alternatively, you can install the dev version of IPCAPS from Github with

install.packages("remotes")
remotes::install_github("kridsadakorn/ipcaps", dependencies = TRUE)

Document

You can see the reference manual from: https://www.biostatgen.org/ipcaps/

Extra Supplementary Information for the IPCAPS paper

Fine-scale subpopulation detection via an SNP-based unsupervised method: A case study on the 1000 Genomes Project resources

Kridsadakorn Chaichoompu, Alisa Wilantho, Pongsakorn Wangkumhang, Sissades Tongsima, Bruno Cavadas, LuĂ­sa Pereira, and Kristel Van Steen

You can see the extra supplementary information from: https://www.biostatgen.org/paper_ipcaps/

Example

This is a basic example which shows you how to use the packages:

library(IPCAPS)

BED.file <- system.file("extdata", "ipcaps_example.bed", package = "IPCAPS")
LABEL.file <- system.file("extdata", "ipcaps_example_individuals.txt.gz",
                          package = "IPCAPS")
my.cluster1 <- ipcaps(bed = BED.file, label.file = LABEL.file, lab.col = 2,
out = tempdir())

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)

About



kridsadakorn/ipcaps documentation built on Nov. 4, 2022, 10:47 a.m.