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.

Install the latest version of this package by entering the following in R:
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


\%||\% Man page
alphaNumeric Man page
asBigMatrix Man page
asBigMatrix,data.frame,ANY,ANY,ANY,ANY,ANY,ANY,ANY,logical-metho Man page
asBigMatrix,matrix,ANY,ANY,ANY,ANY,ANY,ANY,ANY,logical-method Man page
asBigMatrix,vector,ANY,ANY,ANY,ANY,ANY,ANY,ANY,logical-method Man page
assocFilter Man page
baseName Man page
baseName,FilePath-method Man page
bedcollr Man page
bedSizeCorrect Man page
bimCorrectTypes Man page
bin2DescFilename Man page
binPhe Man page
bmAddCol Man page
bmAttachBin Man page
bmConvertFun Man page
bmFilename Man page
bmFilepath Man page
bytesSnp Man page
changeByMap Man page
charify Man page
checkFileExist Man page
chExt Man page
cmh Man page
colClasses Man page
colCors Man page
collapsabel Man page
CollapsABEL Man page
collapsabel-package Man page
CollapsABEL-package Man page
collapse Man page
collapseMat Man page
collClear Man page
collenv Man page
connectSnpPair Man page
contrastData Man page
contrastPlot Man page
correctDesc Man page
correctTypes Man page
correctTypes_methods Man page
covarNames Man page
cytoband Man page
datToVec Man page
desc2BinFilename Man page
dir.create2 Man page
dirName Man page
dirName,FilePath-method Man page
eprint Man page
evalFile Man page
famCorrectTypes Man page
fidIid Man page
file.create2 Man page
filePath Man page
.FilePath Man page
FilePath-class Man page
fileSize Man page
gcdhBmCreate Man page
gcdhDir Man page
gcdhPower Man page
gcdhRegion Man page
gcdhReport Man page
getHaplo Man page
getHaplos Man page
getOrElse-operator Man page
getQuery Man page
getr2 Man page
glm2 Man page
glmIter Man page
gwasDat Man page
gwasDir Man page
gwasLog Man page
gwasOut Man page
gwasOutStem Man page
gwasR Man page
gwasRDS Man page
head2 Man page
headPhe Man page
isBinary Man page
isS4Class Man page
isSetup Man page
isSetupRbed Man page
isSQLite3 Man page
lagDistance Man page
lenCheck Man page
listEqual Man page
listGwasTags Man page
listTags Man page
loadGwas Man page
makePhe Man page
manhattanData Man page
manhattanPlot Man page
nIndivApprPl Man page
nIndivPl Man page
nonExistentFiles Man page
nSnpPl Man page
numVectorSQLRepr Man page
permutePhe Man page
plGwas Man page
.PlGwasC Man page
PlGwasC-class Man page
plGwas,PlGwasC,character,character,character,character,logical,l Man page
plGwas,RbedInfoC,character,character,character,character,logical Man page
plGwas,RbedInfoC,character,character,character,character,missing Man page
plGwas,RbedInfoC,character,character,missing,character,missing,m Man page
plInfo Man page
.PlInfoC Man page
PlInfoC-class Man page
plInfo,missing,character,logical-method Man page
plInfo,missing,character,missing-method Man page
plInfo,PlInfoC,character,logical-method Man page
plInfo,PlInfoC,character,missing-method Man page
plinkr Man page
plTrim Man page
qq Man page
qq2 Man page
qqmulti Man page
randNormDat Man page
randomString Man page
randomStrings Man page
rbedInfo Man page
.RbedInfoC Man page
RbedInfoC-class Man page
readAssoc Man page
readBed Man page
readBed,RbedInfoC,ANY,logical,logical-method Man page
readBed,RbedInfoC,ANY,logical,missing-method Man page
readBed,RbedInfoC,ANY,missing,logical-method Man page
readBed,RbedInfoC,ANY,missing,missing-method Man page
readBed,RbedInfoC,missing,logical,logical-method Man page
readBed,RbedInfoC,missing,logical,missing-method Man page
readBed,RbedInfoC,missing,missing,logical-method Man page
readBed,RbedInfoC,missing,missing,missing-method Man page
readBim Man page
readBmBin Man page
readDesc Man page
readFam Man page
readFunFactory Man page
readGwasOut Man page
readInfo Man page
.ReadInfo Man page
readInfo,character,character-method Man page
readInfo,character,missing-method Man page
ReadInfo-class Man page
readLiteral Man page
readLogistic Man page
readPhe Man page
read.phe.table Man page
readPlinkOut Man page
readQassoc Man page
realBedSize Man page
removeTag Man page
reprClasses Man page
rmFilesByStem Man page
runGcdh Man page
runGwas Man page
runTypeI Man page
saveDesc Man page
sendQuery Man page
setOptModel Man page
setup Man page
setupRbed Man page
shiftBed Man page
shiftedStem Man page
slurp Man page
snpPos Man page
snpRowId Man page
spit Man page
sqliteFilePl Man page
stopFormat Man page
strConcat Man page
strVectorRepr Man page
strVectorSQLRepr Man page
systemFormat Man page
tail2 Man page
theoBedSize Man page
validPhe Man page
write.phe.table Man page


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

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

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