GithubHelp home page GithubHelp logo

ipcaps2's Introduction

IPCAPS2

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

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) <doi: 10.1186/1471-2105-10-382> and Limpiti et al. (2011)<doi: 10.1186/1471-2105-12-255>. The IPCAPS2 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) <doi: 10.18637/jss.v067.i06>. 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 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)

Document

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

Example

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)
#>           
#>             1  2  3  4  5
#>   outlier3  1  1  1  0  0
#>   pop1      0  0  0 50  0
#>   pop2      0  0  0  0 50

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)
#> [1] "/var/folders/sp/hhmj9xvx53z4g4dktf5f503r0000gp/T//RtmprvfefM/cluster_output"

list.files(my.cluster1$output.dir)
#> [1] "groups.txt"                "images"                   
#> [3] "RData"                     "tree_scatter_cluster.html"
#> [5] "tree_scatter_label.html"   "tree_scree.html"          
#> [7] "tree_text.html"

About

  • Prof. Kristel Van Steen, visit
  • Kridsadakorn Chaichoompu, visit

ipcaps2's People

Contributors

kridsadakorn avatar

Watchers

 avatar

Forkers

fossabot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.