Iterative Pruning to Capture Population Structure

An unsupervised clustering algorithm based on iterative pruning is for capturing 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 as explained in Intarapanich et al. (2009) . The 'IPCAPS' involves an iterative process using multiple splits based on multivariate Gaussian mixture modeling of principal components and 'Expectation-Maximization' clustering as explained in Lebret et al. (2015) . In each iteration, rough clusters and outliers are also identified using the function rubikclust() from the R package 'KRIS'.



title: "README" author: "Kridsadakorn Chaichoompu" date: "11/06/2018" output: html_document: keep_md: yes pdf_document: default

Summary

The R package 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 (Intarapanich et al., 2009; 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.

The R package IPCAPS requires stats, utils, graphics, grDevices, MASS, Matrix, expm, KRIS, fpc, LPCM, apcluster, Rmixmod.

Here is the list of functions in the R package IPCAPS:

  • export.groups
  • get.node.info
  • ipcaps
  • save.eigenplots.html
  • save.html
  • save.plots.cluster.html
  • save.plots.label.html
  • save.plots
  • top.discriminator

Moreover, here is the list of example datasets in the R package IPCAPS:

  • label
  • PC
  • raw.data

Lastly, here is the list of example data files included in the directory extdata of IPCAPS:

  • IPCAPS_example.bed
  • IPCAPS_example.bim
  • IPCAPS_example.fam
  • IPCAPS_example_PC10.txt
  • IPCAPS_example_individuals.txt
  • IPCAPS_example_rowVar_colInd.txt
  • IPCAPS_example.RData

Installation

Install the released version of IPCAPS from CRAN:

install.packages("IPCAPS")

For developemenpers: problem sovling in checking the package as CRAN

Error of Roxygen2 in building RD files

The source codes in this package include the Roxgen's syntax. If there is a problem for generating the RD files (facing some errors) using RStudio (Build > Document), try to use roxygen2::roxygenise() instead of Build > Document from the menu. Alternatively, install the package devtools, then enable RStudio to use the functions from devtools (check Build > Configure Build Tools... > use devtools package functions if available) or run devtools::document() in the console.

Error of testthat for unit testing

When facing error for testthat, try to update the package testthat and add Suggests: testthat in DESCRIPTION file.

Submit package to CRAN

Check the submission using R CMD check --as-cran and a current version of r-devel, as mandated by the CRAN Repository Policy. (You could do so using the win-builder service at http://win-builder.r-project.org)

Resubmit new version to CRAN

Check downstream dependencies with devtools::revdep_check()

Error on checking DESCRIPTION meta-information in Linux

Edit ~/.profile, ~/.bash_profile or ~/.bashrc, then add

export LANG=en_US.UTF-8

export LC_ALL=en_US.UTF-8

CONTRIBUTOR CODE OF CONDUCT

As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the Contributor Covenant, version 1.0.0, available at https://www.contributor-covenant.org/version/1/0/0/code-of-conduct.html

News


title: "NEWS" author: "Kridsadakorn Chaichoompu" date: "11/06/2018" output: html_document: keep_md: yes pdf_document: default

IPCAPS 1.1.5

Updates

  • Added more details in roxygen part of ipcaps-package.R
  • Fixed text according to comments from CRAN
  • Updated README.md according to the changes above

IPCAPS 1.1.4

Updates

  • Added references in the DESCRIPTION file
  • Added single quotes for Software's names in the DESCRRIPTION file

IPCAPS 1.1.3

Fixed Text

  • In DESCRIPTION
  • In README.Rmd

IPCAPS 1.1.2

Fixed Bugs

  • Removed all examples for roxygen2 for all internal functions
  • Removed all "library(IPCAPS)" in unit tests and examples

Changes

  • All example files were changed from simSNP* to IPCAPS_example*

Added example file

  • inst/extdata/IPCAPS_example.RData to used in the example of ipcaps()

IPCAPS 1.1.1

Added unit testing

  • testthat/test_clusteringmode.R

Changes

  • moved the nested functions in pasre.categorical.data and preprocess to parallelization.R
  • add roxygen2 code to pasre.categorical.data, replace.missing, do.glm

Updates

  • In roxygen part, changed from getwd() to tempdir()
  • fixed errors according to check as cran

Fixed functions

  • preprocess(): changed filename.label to label.file

IPCAPS 1.1.0

Updated functions

  • In check.stopping(), changed from eigen.fit = max(eigen.fit.vec[1:2]) to eigen.fit = max(eigen.fit.vec). This change may affect clustering result.

IPCAPS 1.0.7

Added data

  • data/IPCAPS_example.RData
  • inst/extdata/IPCAPS_example.bed
  • inst/extdata/IPCAPS_example.bim
  • inst/extdata/IPCAPS_example.fam
  • inst/extdata/IPCAPS_example.individuals.txt
  • inst/extdata/IPCAPS_example_PC10.txt
  • inst/extdata/IPCAPS_example_rowVar_colInd.txt

Added R file to describe data files

  • R/data.R

Added unit testing

  • testthat/test_caleigenfit.R
  • testthat/test_checkstopping.R

IPCAPS 1.0.6

Fixed functions

Removed the old RD files and added roxygen script to create manual for these functions:

  • save.plots.cluster.html
  • save.plots.label.html
  • save.plots
  • top.discriminator

IPCAPS 1.0.5

Fixed functions

Removed the old RD files and added roxygen script to create manual for these functions:

  • preprocess
  • process.each.node
  • save.eigenplots
  • save.html

IPCAPS 1.0.4.0

Fixed functions and objects

Removed the old RD files and added roxygen script to create manual for these functions and objects:

  • IPCAPS-package
  • ipcaps
  • output.template
  • postprocess

IPCAPS 1.0.3.0

Fixed functions

Removed the old RD files and added roxygen script to create manual for these functions:

  • diff.eigen.fit
  • diff.xy
  • export.groups
  • get.node.info

IPCAPS 1.0.2.0

Fixed functions

Removed the old RD files and added roxygen script to create manual for these functions:

  • cal.eigen.fit
  • check.stopping
  • clustering.mode
  • clustering

IPCAPS 1.0.1

Fixed functions

Removed the old RD files and added roxygen script to create manual for these functions:

  • cal.pc.linear
  • cal.pc.linear
  • cal.pc.linear
  • cal.pc.linear

IPCAPS 1.0.0.0

Initial functions

  • cal.pc.linear A function for linear principal component analysis (PCA)
  • fst.each.snp.hudson A function for fixation index (Fst) calculation for all SNPs between two groups.
  • fst.hudson A function for average fixation index (Fst) calculation between two groups.
  • plot3views A function to create scatter plots in three views.
  • read.bed Read the binary PLINK format (BED, BIM, and FAM)
  • rubikclust A function for unsupervised clustering to detect rough structures and outliers.
  • write.bed Write an list of SNP object to the binary PLINK format (BED, BIM, and FAM)
  • xxt A function for calculating matrix multipication between a matrix and its transpose for large data.

Initial R data

  • simsnp Synthetic dataset containing single nucleotide polymorphisms (SNP)
  • sample_labels Synthetic dataset containing population labels for the dataset simsnp.

Initial example files

  • example_SNP.bed Synthetic dataset containing single nucleotide polymorphisms (SNP) in binary format
  • example_SNP.bim Simulated SNP information
  • example_SNP.fam Simulated sample information

Updates

From the initial idea, some functions were changed their names:

  • The name of function cal.PC.linear was changed to cal.pc.linear.
  • The name of function plot.3views was changed to plot3views.
  • The name of function rubikClust was changed to rubikclust.
  • The name of function XXt was changed to xxt.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("IPCAPS")

1.1.5 by Kridsadakorn Chaichoompu, 10 months ago


https://gitlab.com/kris.ccp/ipcaps


Report a bug at https://gitlab.com/kris.ccp/ipcaps/issues


Browse source code at https://github.com/cran/IPCAPS


Authors: Kridsadakorn Chaichoompu [aut, cre] , Kristel Van Steen [aut] , Fentaw Abegaz [aut] , Sissades Tongsima [aut] , Philip Shaw [aut] , Anavaj Sakuntabhai [aut] , Luisa Pereira [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports stats, utils, graphics, grDevices, MASS, Matrix, expm, KRIS, fpc, LPCM, apcluster, Rmixmod

Suggests testthat


See at CRAN