CollapsABEL: Generalized CDH (GCDH) Analysis

Implements a generalized version of the CDH test (<DOI:10.1371/journal.pone.0028145> and <DOI:10.1186/s12859-016-1006-9>) for detecting compound heterozygosity on a genome-wide level, due to usage of generalized linear models it allows flexible analysis of binary and continuous traits with covariates.

AuthorKaiyin Zhong, Fan Liu
Date of publication2016-12-11 20:35:07
MaintainerKaiyin Zhong <>

View on CRAN

Man pages

alphaNumeric: Alpha-numeric characters

asBigMatrix: Coerce an R vector/matrix/data.frame into a big.matrix

assocFilter: Filter a PlGwasC object by the results of a 'plink –assoc'...

baseName: Basename of a FilePath object

bedcollr: Shift bed files

bedSizeCorrect: Check whether bed file is of correct size

bimCorrectTypes: Correct types of bim data.frame

bin2DescFilename: Convert a .bin filename to a .desc filename

binPhe: Check whether phenotype of a GWAS is binary

bmAddCol: Add column(s) to an existing big.matrix

bmAttachBin: Attach a big.matrix by its bin filename

bmConvertFun: Conversion function to use when appending values to a...

bmFilename: Generate a big.matrix filename (.bin or .desc)

bmFilepath: Get the big.matrix file path according to GCDH task tag

bytesSnp: Get number of bytes used by each SNP.

changeByMap: Transform a vector by a mapping

charify: Convert certain columns of a data.frame to character type

checkFileExist: Stop when any file does not exist

chExt: Change extension names

cmh: Contrast Manhattan plot the simple way

colClasses: Get classes of columns of a data.frame

colCors: Correlation coefficient of column-pairs of two data frames

CollapsABEL: CollapsABEL: an R library for detecting compound heterozygote...

collapse: Collpase genotypes

collapseMat: Collapse two genotype matrices, column by column

collClear: Clear up CollapsABEL workspace

collenv: An environment for storing CollapsABEL package local...

connectSnpPair: Annotate a pair of SNPs in the contrast Manhattan plot

contrastData: Prepare data for 'contrastPlot'

contrastPlot: Produce contrast Manhattan plot

correctDesc: Correct description of big.matrix

correctTypes_methods: Convert columns of a data frame to certain types

covarNames: Get covariate names of a GWAS

cytoband: Find cytoband at a given position

datToVec: Extract one row or column of a data frame as a vector

desc2BinFilename: Convert a .desc filename to a .bin filename

dir.create2: Create directory if it does not already exist

dirName: Directory name of a file path

eprint: Print quoted expression then its value

evalFile: Eval R expressions from a file.

famCorrectTypes: Correct types of fam data.frame

fidIid: FID and IID columns from fam file

file.create2: Create file if it does not already exist

filePath: Constructor for FilePath class

FilePath-class: An S4 class to represent a file path

fileSize: Get file size

gcdhBmCreate: Create a big.matrix under specified GCDH tag

gcdhDir: Create GCDH task directories by tag

gcdhPower: GCDH power analysis

gcdhRegion: Run GCDH over a region

gcdhReport: Generate a report from a GCDH run

getHaplo: Infer haplotypes for a pair of SNPs

getHaplos: Inferring haplotypes from two genotype data frames, and join...

getOrElse-operator: Default value for expression.

getQuery: Get query results from a SQLite database

getr2: Estimate percentage of variation explained

glm2: GLM with arbitrary column names

glmIter: Perform glm iteratively through a number of independent...

gwasDat: Read genotype and phenotype data into R

gwasDir: GWAS results directory of a certain GWAS scan

gwasLog: Plink log fie

gwasOut: GWAS output file name

gwasOutStem: Plink output filename

gwasR: Invoke a GWAS in R

gwasRDS: Get RDS file path of a PlGwasC object

head2: Head and tail in two dimensions

headPhe: Read first n lines of a phenotype file

isBinary: Check whether a trait is binary

isS4Class: Check whether an S4 object is of a certain class

isSetup: Check if a directory containing .bed .fam and .bim files is...

isSetupRbed: Check if an RbedInfoC object is properly set up

isSQLite3: Check whether a file is a SQLite3 database.

lagDistance: Distance with lag

lenCheck: Check each element of a list has expected length Give a...

listEqual: Check equality of two lists

listGwasTags: List GWAS or GCDH tags

loadGwas: Load PlGwasC object by tag, from the RDS file

makePhe: Generate phenotype file from a fam file

manhattanData: Prepare data for Manhattan plot.

manhattanPlot: Produce Manhattan plot

nIndivApprPl: Get apparent number of individuals

nIndivPl: Get number of individuals

nonExistentFiles: Non-existent files from a vector of filenames

nSnpPl: Get number of SNPs.

numVectorSQLRepr: String representation of a numeric vector for SQLite...

permutePhe: Permute a phenotype file

plGwas: Constructor for PlGwasC class

PlGwasC-class: An S4 class representing info about GWAS on plink files

plInfo: Constructor for PlInfoC class

PlInfoC-class: An S4 class representing info about plink files

plinkr: A wrapper for plink

plTrim: Trim plink files

qq: QQ plot of one p-value vector

qq2: QQ plot of two p-value vector

qqmulti: QQ plot of multiple p-value vectors

randNormDat: Generate a m by n data.frame from normal distribution

randomString: Generate a single alpha-numeric random string

randomStrings: Generate random strings

rbedInfo: Constructor of RbedInfoC class

RbedInfoC-class: S4 class for necessary info to read a bed file into R

readAssoc: Read PLINK .assoc files

readBed: Read genotypes from PLINK bed file into R

readBim: Read plink .bim files

readBmBin: Read columns into an R matrix from a big.matrix .bin file

readDesc: Read big.matrix .desc file

readFam: Read plink .fam files

readFunFactory: Generate read_fun for ReadInfo class

readGwasOut: Read GWAS output from plink If the GWAS is finished, returns...

readInfo: ReadInfo constructor

ReadInfo-class: An S4 class to represent information about a...

readLiteral: Read a file literally (all columns as character)

readLogistic: Read PLINK logistic regression output files.

readPhe: Read phenotype file

read.phe.table: Read phenotype file

readPlinkOut: Read plink output files

readQassoc: Read .qassoc files

realBedSize: File size of bed file

removeTag: Remove GWAS results by tag

reprClasses: Represent classes of a data.frame in a character vector

rmFilesByStem: Remove files by matching the starting part

runGcdh: Run GCDH analysis

runGwas: Run a GWAS

runTypeI: Run simulations to control type-I error

saveDesc: Save big.matrix description object to disk

sendQuery: Send query to SQLite database

setOptModel: Set analysis model

setup: Setup up a directory containing plink files

setupRbed: Setup an RbedInfoC object

shiftBed: Shift bed files

shiftedStem: Add a "shift" suffix to a stem

slurp: Read a text file into a single string

snpPos: Retrive SNP positions from UCSU database

snpRowId: Get row number of SNPs from their names

spit: Write strings to a file

sqliteFilePl: SQLite file of a PlInfoC object

stopFormat: Stop with format string

strConcat: Concatenate a vector of strings

strVectorRepr: String Representation of a character vector

strVectorSQLRepr: String representation of a character vector for SQLite...

systemFormat: Call system command with format string

theoBedSize: Theoretical size of bed file

validPhe: Validate a phenotype file

write.phe.table: Write a phenotype data.frame to file

Files in this package

CollapsABEL/R/0_strConcat.R CollapsABEL/R/0_readFactory.R CollapsABEL/R/1_bigmatrixUtils.R CollapsABEL/R/3_permute.R
CollapsABEL/R/0_plinkr.R CollapsABEL/R/1_rbedInfo.R CollapsABEL/R/0_glm2.R CollapsABEL/R/0_loadJava.R CollapsABEL/R/0_lenCheck.R CollapsABEL/R/0_nonExistentFiles.R CollapsABEL/R/0_bedcollr.R CollapsABEL/R/0_cytoband.R CollapsABEL/R/1_bedinfo.R CollapsABEL/R/0_sqlUtils.R CollapsABEL/R/0__globalVars.R CollapsABEL/R/0_filePath.R CollapsABEL/R/snpPos.R CollapsABEL/R/4_haplo.R CollapsABEL/R/0_manhattan.R CollapsABEL/R/0_head2.R CollapsABEL/R/0_utils.R CollapsABEL/R/2_plGwas.R CollapsABEL/R/CollapsABEL.R
CollapsABEL/man/stopFormat.Rd CollapsABEL/man/manhattanData.Rd CollapsABEL/man/shiftedStem.Rd CollapsABEL/man/charify.Rd CollapsABEL/man/fidIid.Rd CollapsABEL/man/checkFileExist.Rd CollapsABEL/man/gwasOutStem.Rd CollapsABEL/man/chExt.Rd CollapsABEL/man/getHaplos.Rd CollapsABEL/man/nonExistentFiles.Rd CollapsABEL/man/alphaNumeric.Rd CollapsABEL/man/correctTypes_methods.Rd CollapsABEL/man/strConcat.Rd CollapsABEL/man/gcdhReport.Rd CollapsABEL/man/runGcdh.Rd CollapsABEL/man/plinkr.Rd CollapsABEL/man/ReadInfo-class.Rd CollapsABEL/man/isBinary.Rd CollapsABEL/man/realBedSize.Rd CollapsABEL/man/manhattanPlot.Rd CollapsABEL/man/head2.Rd CollapsABEL/man/plTrim.Rd CollapsABEL/man/systemFormat.Rd CollapsABEL/man/readBim.Rd CollapsABEL/man/randomString.Rd CollapsABEL/man/makePhe.Rd CollapsABEL/man/asBigMatrix.Rd CollapsABEL/man/gwasOut.Rd CollapsABEL/man/readAssoc.Rd CollapsABEL/man/colCors.Rd CollapsABEL/man/readQassoc.Rd CollapsABEL/man/readFam.Rd CollapsABEL/man/changeByMap.Rd CollapsABEL/man/getHaplo.Rd CollapsABEL/man/numVectorSQLRepr.Rd CollapsABEL/man/RbedInfoC-class.Rd CollapsABEL/man/listGwasTags.Rd CollapsABEL/man/plGwas.Rd CollapsABEL/man/headPhe.Rd CollapsABEL/man/snpRowId.Rd CollapsABEL/man/nSnpPl.Rd CollapsABEL/man/gwasDat.Rd CollapsABEL/man/evalFile.Rd CollapsABEL/man/filePath.Rd CollapsABEL/man/readLiteral.Rd CollapsABEL/man/isSQLite3.Rd CollapsABEL/man/gwasLog.Rd CollapsABEL/man/getQuery.Rd CollapsABEL/man/plInfo.Rd CollapsABEL/man/CollapsABEL.Rd CollapsABEL/man/slurp.Rd CollapsABEL/man/assocFilter.Rd CollapsABEL/man/bedcollr.Rd CollapsABEL/man/binPhe.Rd CollapsABEL/man/colClasses.Rd CollapsABEL/man/correctDesc.Rd CollapsABEL/man/randNormDat.Rd CollapsABEL/man/getOrElse-operator.Rd CollapsABEL/man/rbedInfo.Rd CollapsABEL/man/readLogistic.Rd CollapsABEL/man/write.phe.table.Rd CollapsABEL/man/loadGwas.Rd CollapsABEL/man/file.create2.Rd CollapsABEL/man/bimCorrectTypes.Rd CollapsABEL/man/cytoband.Rd CollapsABEL/man/bytesSnp.Rd CollapsABEL/man/bmAddCol.Rd CollapsABEL/man/readDesc.Rd CollapsABEL/man/spit.Rd CollapsABEL/man/gcdhBmCreate.Rd CollapsABEL/man/desc2BinFilename.Rd CollapsABEL/man/sendQuery.Rd CollapsABEL/man/listEqual.Rd CollapsABEL/man/readBed.Rd CollapsABEL/man/snpPos.Rd CollapsABEL/man/contrastData.Rd CollapsABEL/man/nIndivPl.Rd CollapsABEL/man/lenCheck.Rd CollapsABEL/man/readBmBin.Rd CollapsABEL/man/dirName.Rd CollapsABEL/man/runTypeI.Rd CollapsABEL/man/gwasR.Rd CollapsABEL/man/connectSnpPair.Rd CollapsABEL/man/validPhe.Rd CollapsABEL/man/lagDistance.Rd CollapsABEL/man/shiftBed.Rd CollapsABEL/man/cmh.Rd CollapsABEL/man/readInfo.Rd CollapsABEL/man/gwasDir.Rd CollapsABEL/man/randomStrings.Rd CollapsABEL/man/gcdhPower.Rd CollapsABEL/man/bmFilename.Rd CollapsABEL/man/collClear.Rd CollapsABEL/man/covarNames.Rd CollapsABEL/man/dir.create2.Rd CollapsABEL/man/datToVec.Rd CollapsABEL/man/bmFilepath.Rd CollapsABEL/man/bedSizeCorrect.Rd CollapsABEL/man/readFunFactory.Rd CollapsABEL/man/fileSize.Rd CollapsABEL/man/removeTag.Rd CollapsABEL/man/setupRbed.Rd CollapsABEL/man/bmConvertFun.Rd CollapsABEL/man/setOptModel.Rd CollapsABEL/man/qq2.Rd CollapsABEL/man/reprClasses.Rd CollapsABEL/man/collapseMat.Rd CollapsABEL/man/nIndivApprPl.Rd CollapsABEL/man/baseName.Rd CollapsABEL/man/isSetup.Rd CollapsABEL/man/permutePhe.Rd CollapsABEL/man/collenv.Rd CollapsABEL/man/theoBedSize.Rd CollapsABEL/man/gcdhDir.Rd CollapsABEL/man/read.phe.table.Rd CollapsABEL/man/bin2DescFilename.Rd CollapsABEL/man/PlGwasC-class.Rd CollapsABEL/man/gcdhRegion.Rd CollapsABEL/man/isSetupRbed.Rd CollapsABEL/man/readPhe.Rd CollapsABEL/man/collapse.Rd CollapsABEL/man/runGwas.Rd CollapsABEL/man/eprint.Rd CollapsABEL/man/qqmulti.Rd CollapsABEL/man/FilePath-class.Rd CollapsABEL/man/PlInfoC-class.Rd CollapsABEL/man/readGwasOut.Rd CollapsABEL/man/getr2.Rd CollapsABEL/man/saveDesc.Rd CollapsABEL/man/readPlinkOut.Rd CollapsABEL/man/rmFilesByStem.Rd CollapsABEL/man/famCorrectTypes.Rd CollapsABEL/man/setup.Rd CollapsABEL/man/strVectorSQLRepr.Rd CollapsABEL/man/glmIter.Rd CollapsABEL/man/qq.Rd CollapsABEL/man/gwasRDS.Rd CollapsABEL/man/strVectorRepr.Rd CollapsABEL/man/sqliteFilePl.Rd CollapsABEL/man/isS4Class.Rd CollapsABEL/man/contrastPlot.Rd CollapsABEL/man/bmAttachBin.Rd CollapsABEL/man/glm2.Rd

Questions? Problems? Suggestions? or email at

All documentation is copyright its authors; we didn't write any of that.