[Genabel-commits] r1877 - in pkg: . MultiABEL MultiABEL/R MultiABEL/inst MultiABEL/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Oct 30 12:56:42 CET 2014
Author: shenxia
Date: 2014-10-30 12:56:42 +0100 (Thu, 30 Oct 2014)
New Revision: 1877
Added:
pkg/MultiABEL/
pkg/MultiABEL/ChangeLog
pkg/MultiABEL/DESCRIPTION
pkg/MultiABEL/NAMESPACE
pkg/MultiABEL/R/
pkg/MultiABEL/R/MultiABEL.R
pkg/MultiABEL/R/MultiMeta.R
pkg/MultiABEL/R/MultiRep.R
pkg/MultiABEL/R/Multivariate.R
pkg/MultiABEL/R/misc.R
pkg/MultiABEL/inst/
pkg/MultiABEL/inst/CITATION
pkg/MultiABEL/man/
pkg/MultiABEL/man/MultiABEL.Rd
pkg/MultiABEL/man/MultiMeta.Rd
pkg/MultiABEL/man/MultiRep.Rd
pkg/MultiABEL/man/Multivariate.Rd
Log:
MultiABEL submission to R-Forge for check and review
Added: pkg/MultiABEL/ChangeLog
===================================================================
--- pkg/MultiABEL/ChangeLog (rev 0)
+++ pkg/MultiABEL/ChangeLog 2014-10-30 11:56:42 UTC (rev 1877)
@@ -0,0 +1,14 @@
+2014-10-28 15:25 xia
+
+ * Updated to version 1.0-1 for
+ technical review of the GenABEL project
+ * Replication analysis confirmed
+ * Meta-analysis implemented
+
+2014-02-07 15:25 xia
+
+ * MultiABEL packaged! Initial version 0.1-0
+ * Multivariate GWAS analysis via MANOVA
+ Compatible with GenABEL objects
+ Compatible with DatABEL format
+
\ No newline at end of file
Added: pkg/MultiABEL/DESCRIPTION
===================================================================
--- pkg/MultiABEL/DESCRIPTION (rev 0)
+++ pkg/MultiABEL/DESCRIPTION 2014-10-30 11:56:42 UTC (rev 1877)
@@ -0,0 +1,18 @@
+Package: MultiABEL
+Type: Package
+Title: Multivariate Genome-Wide Association Analyses
+Version: 1.0-1
+Date: 2014-10-28
+Author: Xia Shen, Yurii Aulchenko
+Maintainer: Xia Shen <xia.shen at ki.se>
+Description: This package includes functions for performing multivariate
+ genome-wide association (GWA) analyses. The GWA module is
+ compatible with existing *ABEL data formats.
+Depends:
+ R (>= 2.10),
+ GenABEL,
+ DatABEL,
+ svMisc
+License: GPL (>= 2)
+LazyLoad: yes
+Packaged: 2014-10-28 17:55:18 UTC; xia
Added: pkg/MultiABEL/NAMESPACE
===================================================================
--- pkg/MultiABEL/NAMESPACE (rev 0)
+++ pkg/MultiABEL/NAMESPACE 2014-10-30 11:56:42 UTC (rev 1877)
@@ -0,0 +1,2 @@
+import("GenABEL", "DatABEL", "svMisc")
+export("Multivariate", "MultiRep", "MultiMeta")
Added: pkg/MultiABEL/R/MultiABEL.R
===================================================================
--- pkg/MultiABEL/R/MultiABEL.R (rev 0)
+++ pkg/MultiABEL/R/MultiABEL.R 2014-10-30 11:56:42 UTC (rev 1877)
@@ -0,0 +1,57 @@
+#' MultiABEL: Multivariate Genome-Wide Association Analyses
+#'
+#' The MultiABEL package performs multivariate genome-wide association studies (GWAS)
+#' and subsequent analyses. The GWAS module is compatible with different kinds of *ABEL
+#' data formats.
+#'
+#' For converting data from other formats, see
+#'
+#' \code{\link{convert.snp.illumina}} (Illumina/Affymetrix-like format). This is
+#' our preferred converting function, very extensively tested. Other conversion
+#' functions include:
+#' \code{\link{convert.snp.text}} (conversion from human-readable GenABEL format),
+#' \code{\link{convert.snp.ped}} (Linkage, Merlin, Mach, and similar files),
+#' \code{\link{convert.snp.mach}} (Mach-format),
+#' \code{\link{convert.snp.tped}} (from PLINK TPED format),
+#' \code{\link{convert.snp.affymetrix}} (BRML-style files).
+#'
+#' For converting of GenABEL's data to other formats, see
+#' \code{\link{export.merlin}} (MERLIN and MACH formats),
+#' \code{\link{export.impute}} (IMPUTE, SNPTEST and CHIAMO formats),
+#' \code{\link{export.plink}} (PLINK format, also exports phenotypic data).
+#'
+#' To load the data, see \code{\link{load.gwaa.data}}.
+#'
+#' For conversion to DatABEL format (used by ProbABEL and some other
+#' GenABEL suite packages), see
+#' \code{\link{impute2databel}},
+#' \code{\link{impute2mach}},
+#' \code{\link{mach2databel}}.
+#'
+#' For data managment and manipulations see
+#' \code{\link{merge.gwaa.data}},
+#' \code{\link{merge.snp.data}},
+#' \code{\link{gwaa.data-class}},
+#' \code{\link{snp.data-class}},
+#' \code{\link{snp.names}},
+#' \code{\link{snp.subset}}.
+#'
+#' @author Xia Shen, Yurii Aulchenko
+#'
+#' @references
+#' If you use MultiABEL package in your analysis, please cite the following work:
+#'
+#' Xia Shen, ..., Gordan Lauc, Jim Wilson, Yurii Aulchenko (2014).
+#' Multi-omic-variate analysis identified the association between 14q32.33
+#' and compound N-Glycosylation of human Immunoglobulin G. \emph{Submitted}.
+#'
+#' @seealso \code{GenABEL}, \code{DatABEL}
+#'
+#'
+#' @name MultiABEL
+#' @docType package
+#' @title Multivariate GWAS in R
+#' @aliases MultiABEL multiabel MultiABEL-package
+#' @keywords package
+#'
+NULL
\ No newline at end of file
Property changes on: pkg/MultiABEL/R/MultiABEL.R
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: pkg/MultiABEL/R/MultiMeta.R
===================================================================
--- pkg/MultiABEL/R/MultiMeta.R (rev 0)
+++ pkg/MultiABEL/R/MultiMeta.R 2014-10-30 11:56:42 UTC (rev 1877)
@@ -0,0 +1,70 @@
+#' Meta-analysis for multivariate genome-wide association scan
+#'
+#' The function performs meta-analysis for multiple multivariate GWA analyses
+#'
+#' @param reslist A list where each element is a multivariate GWA result of class "MultiRes".
+#' @param outfile A string giving the path and file name of the output file. By default, a file
+#' named \code{'Multivariate_meta-analysis_results.txt'} will be written into the current working directory.
+#'
+#' @return The function returns a matrix containing the meta-analysis results, where the row names are
+#' the variants names, and the column names are the names of the studies provided in \code{reslist} or
+#' generated by the program if no names are given, with an extra column \code{"p.meta"} containing the
+#' meta-analysis P-values. The results are also written into \code{outfile}.
+#'
+#' @author Xia Shen
+#'
+#' @references
+#' Xia Shen, ..., Gordan Lauc, Jim Wilson, Yurii Aulchenko (2014).
+#' Multi-omic-variate analysis identified the association between 14q32.33 and
+#' compound N-Glycosylation of human Immunoglobulin G \emph{Submitted}.
+#'
+#' @seealso
+#' \code{Multivariate}
+#'
+#' @examples
+#' \dontrun{
+#' ## loading two gwaa.data sets in GenABEL
+#' data(ge03d2)
+#' data(ge03d2ex)
+#'
+#' ## in each dataset, running multivariate GWAS for 3 traits: height, weight, bmi
+#' res1 <- Multivariate(gwaa.data = ge03d2, trait.cols = c(5, 6, 8),
+#' covariate.cols = c(2, 3))
+#' res2 <- Multivariate(gwaa.data = ge03d2ex.clean, trait.cols = c(5, 6, 8),
+#' covariate.cols = c(2, 3))
+#'
+#' ## running meta-analysis by combining the P-values
+#' meta <- MultiMeta(list(res1, res2))
+#' }
+#' @aliases MultiMeta, multimeta
+#' @keywords multivariate, meta-analysis
+#'
+`MultiMeta` <- function(reslist, outfile = 'Multivariate_meta-analysis_results.txt') {
+ cat('checking data ...')
+ k <- length(reslist)
+ if (k < 2) stop('not enough studies for meta-analysis!')
+ common <- rownames(reslist[[1]])
+ for (i in 1:k) {
+ if (class(reslist[[i]]) != 'MultiRes') {
+ stop('incorrect class of results!')
+ }
+ common <- common[common %in% rownames(reslist[[i]])]
+ }
+ if (length(common) == 0) stop('no variant exists in all studies!')
+ cat(' OK\n')
+ cat('meta-analysis ...')
+ pmat <- matrix(NA, length(common), k + 1)
+ if (is.null(names(reslist))) {
+ listname <- paste('Study', 1:k, sep = '.')
+ } else {
+ listname <- names(reslist)
+ }
+ dimnames(pmat) <- list(common, c(listname, 'p.meta'))
+ for (i in 1:k) pmat[,i] <- reslist[[i]][common,'P.F']
+ pmat[,'p.meta'] <- pchisq(-2*(rowSums(log(pmat[,1:k]))), 2*k, lower.tail = FALSE)
+ cat(' OK\n')
+ cat('writing results ...')
+ write.table(pmat, outfile, row.names = TRUE, col.names = TRUE, quote = FALSE, sep = '\t')
+ cat(' OK\n')
+ return(pmat)
+}
Property changes on: pkg/MultiABEL/R/MultiMeta.R
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: pkg/MultiABEL/R/MultiRep.R
===================================================================
--- pkg/MultiABEL/R/MultiRep.R (rev 0)
+++ pkg/MultiABEL/R/MultiRep.R 2014-10-30 11:56:42 UTC (rev 1877)
@@ -0,0 +1,119 @@
+#' Replication analysis of multivariate genome-wide association signal
+#'
+#' The function performs replication analysis of multivariate GWA signals.
+#'
+#' @param training.pheno An (optional) matrix or data frame contains the phenotype data for the discovery
+#' sample, preferrably adjusted for fixed effects and population structure before multivariate GWA analysis.
+#' @param training.phenofile An (optional) plain text file contains phenotypes for the discovery sample.
+#' If this is provided, it will serve as \code{training.pheno}.
+#' @param test.pheno An (optional) matrix or data frame contains the phenotype data for the replication
+#' sample, preferrably adjusted for fixed effects and population structure.
+#' @param test.phenofile An (optional) plain text file contains phenotypes of the replication sample.
+#' If this is provided, it will serve as \code{test.pheno}.
+#' @param pheno.names A vector (length > 1) giving the column names of the phenotypes to be analyzed.
+#' @param training.geno A matrix or data.frame that contains the discovery sample genotype dosages
+#' of the variants to replicate.
+#' @param test.geno A matrix or data.frame that contains the replication sample genotype dosages
+#' of the variants to replicate. This object should have the same column names and order
+#' as \code{training.geno}.
+#'
+#' @note Either \code{.pheno} or \code{.phenofile} has to be provided.
+#' If both are provided, only \code{phenofile} will be used. Individual IDs
+#' in \code{.pheno} or \code{.phenofile} and \code{.geno} have to match!
+#'
+#' @return The function returns a list of 3 matrices. \code{$replication} contains the estimate of
+#' variant effect on the corresponding compound phenotype (\code{beta_c}), standard error (\code{s.e.}),
+#' replication P-value (\code{P}), and proportion of phenotypic variance explained (\code{R-squared}).
+#' \code{$training.coef} contains the estimated coefficients in the discovery sample of each phenotype
+#' for each variant to construct the compound phenotype. \code{$test.coef} contains similar coefficients
+#' as in \code{$training.coef} but estimated in the replication sample, but these are just for the record,
+#' NOT used in the replication procedure.
+#'
+#' @author Xia Shen, Yurii Aulchenko
+#'
+#' @references
+#' Xia Shen, ..., Gordan Lauc, Jim Wilson, Yurii Aulchenko (2014).
+#' Multi-omic-variate analysis identified the association between 14q32.33 and
+#' compound N-Glycosylation of human Immunoglobulin G \emph{Submitted}.
+#'
+#' @seealso
+#' \code{\link{Multivariate}}
+#'
+#' @examples
+#' \dontrun{
+#' ## loading example discovery sample gwaa.data in GenABEL
+#' data(ge03d2)
+#'
+#' ## running multivariate GWAS for 3 traits: height, weight, bmi
+#' res <- Multivariate(gwaa.data = ge03d2, trait.cols = c(5, 6, 8),
+#' covariate.cols = c(2, 3))
+#'
+#' ## extracting 5 significant variants
+#' (top <- res[order(res[,'P.F']),][2:6,])
+#' snps <- rownames(top)
+#' training.geno <- as.double(gtdata(ge03d2)[,snps])
+#'
+#' ## loading example test sample gwaa.data in GenABEL
+#' data(ge03d2c)
+#'
+#' ## extracting genotypes of the 5 variants
+#' test.geno <- as.double(gtdata(ge03d2c)[,snps])
+#'
+#' ## try replication
+#' rep <- MultiRep(training.pheno = phdata(ge03d2), test.pheno = phdata(ge03d2c),
+#' pheno.names = c('height', 'weight', 'bmi'),
+#' training.geno = training.geno, test.geno = test.geno)
+#' }
+#' @aliases MultiRep, multirep
+#' @keywords multivariate, replication
+#'
+`MultiRep` <- function(training.pheno = NULL, training.phenofile = NULL,
+ test.pheno = NULL, test.phenofile = NULL, pheno.names = NULL,
+ training.geno, test.geno) {
+ cat('loading data ...')
+ if (is.null(training.phenofile) & is.null(training.pheno)) {
+ stop('no phenotypes provided for the training set!')
+ }
+ if (is.null(test.phenofile) & is.null(test.pheno)) {
+ stop('no phenotypes provided for the test set!')
+ }
+ if (!is.null(training.phenofile)) {
+ training.pheno <- read.table(training.phenofile, header = TRUE)
+ }
+ if (!is.null(test.phenofile)) {
+ test.pheno <- read.table(test.phenofile, header = TRUE)
+ }
+ if (is.null(pheno.names)) {
+ idx <- which(colnames(training.pheno) %in% colnames(test.pheno))
+ pheno.names <- colnames(training.pheno)[idx]
+ }
+ if (!all(pheno.names %in% colnames(training.pheno)) |
+ !all(pheno.names %in% colnames(test.pheno))) stop('phenotype(s) missing!')
+ if (ncol(training.geno) != ncol(test.geno) |
+ nrow(training.geno) != nrow(training.pheno) |
+ nrow(test.geno) != nrow(test.pheno)) stop('dimensions do not match!')
+ cat(' OK\n')
+ cat('initializing analysis ...')
+ Y0 <- as.matrix(training.pheno[,pheno.names])
+ Y1 <- as.matrix(test.pheno[,pheno.names])
+ training.coef <- test.coef <- matrix(NA, length(pheno.names), ncol(training.geno))
+ dimnames(training.coef) <- dimnames(test.coef) <- list(pheno.names, colnames(training.geno))
+ reptab <- matrix(NA, ncol(training.geno), 4)
+ dimnames(reptab) <- list(colnames(training.geno), c('beta_c', 's.e.', 'P', 'R-squared'))
+ cat(' OK\n')
+ if (ncol(training.geno) != 1) {
+ cat('replication analysis ...\n')
+ } else cat('replication analysis ...')
+ for (k in 1:ncol(training.geno)) {
+ m0 <- lm(training.geno[,k] ~ Y0)
+ training.coef[,k] <- m0$coef[-1]
+ m1 <- lm(test.geno[,k] ~ Y1)
+ test.coef[,k] <- m1$coef[-1]
+ cy <- Y1 %*% training.coef[,k]
+ mrep <- lm(cy ~ test.geno[,k])
+ reptab[k,] <- c(summary(mrep)$coef[2,c(1:2, 4)], summary(mrep)$r.squared)
+ if (ncol(training.geno) != 1) progress(k/ncol(training.geno)*100)
+ }
+ if (ncol(training.geno) == 1) cat(' OK\n') else cat('\n')
+ return(list(replication = reptab, training.coef = training.coef, test.coef = test.coef))
+}
Property changes on: pkg/MultiABEL/R/MultiRep.R
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: pkg/MultiABEL/R/Multivariate.R
===================================================================
--- pkg/MultiABEL/R/Multivariate.R (rev 0)
+++ pkg/MultiABEL/R/Multivariate.R 2014-10-30 11:56:42 UTC (rev 1877)
@@ -0,0 +1,112 @@
+#' Multivariate genome-wide association scan
+#'
+#' The function imports GenABEL (gwaa.data class) or DatABEL (.fv*) data formats
+#' and performs multivariate test for each genetic variant using multivariate
+#' analysis of variance (MANOVA).
+#'
+#' @param gwaa.data An (optional) object of \code{\link{gwaa.data-class}}.
+#' @param phenofile An (optional) plain text file contains phenotypic outcomes and covariates.
+#' @param genofile An (optional) object of \code{\link{databel-class}} containing genotype data.
+#' @param outfile A string giving the path and file name of the output file. By default, a file
+#' named \code{'Multivariate_GWAS_results.txt'} will be written into the current working directory.
+#' @param trait.cols A vector (length > 1) giving the column indices of the phenotypes to be analyzed.
+#' @param covariate.cols An (optional) vector giving the column indices of the covariates to be included.
+#' @param cuts An integer telling how many pieces the genotype data matrix will be splitted for analyze.
+#' The value can be set depending on the memory size. The smaller the value is, potentially the faster
+#' the analysis will be.
+#' @param ... other parameters passed to \code{\link{summary.manova}}, e.g. different kinds of test statistics.
+#'
+#' @note Either \code{gwaa.data} (for GenABEL data format) or the combination of
+#' \code{phenofile} and \code{genofile} (for DatABEL data format) has to be provided.
+#' If all are provided, only \code{phenofile} and \code{genofile} will be used. When using
+#' DatABEL format input, individual IDs in \code{phenofile} and \code{genofile} have to match!
+#'
+#' @return The function returns a matrix of class "MultiRes" containing the multivariate GWA results,
+#' where the row names are the variants names, and the column names correspond to the manova test
+#' statistic value, approximated F statistic value, F statistic numerator degrees of freedom,
+#' F statistic denominator degrees of freedom, and the P-value. The results are also written into \code{outfile}.
+#'
+#' @author Xia Shen
+#'
+#' @references
+#' Xia Shen, ..., Gordan Lauc, Jim Wilson, Yurii Aulchenko (2014).
+#' Multi-omic-variate analysis identified the association between 14q32.33 and
+#' compound N-Glycosylation of human Immunoglobulin G \emph{Submitted}.
+#'
+#' @seealso
+#' \code{\link{aov}}, \code{\link{summary.manova}}
+#'
+#' @examples
+#' \dontrun{
+#' ## loading example gwaa.data in GenABEL
+#' data(ge03d2ex.clean)
+#'
+#' ## running multivariate GWAS for 3 traits: height, weight, bmi
+#' res <- Multivariate(gwaa.data = ge03d2ex.clean, trait.cols = c(5, 6, 8),
+#' covariate.cols = c(2, 3))
+#'
+#' ## converting the same dataset into DatABEL format files
+#' write.table(phdata(ge03d2ex.clean), 'pheno.txt', col.names = TRUE, row.names = TRUE,
+#' quote = FALSE, sep = '\t')
+#' matrix2databel(geno, 'geno')
+#'
+#' ## running the multivariate GWAS again
+#' res <- Multivariate(phenofile = 'pheno.txt', genofile = 'geno', trait.cols = c(5, 6, 8),
+#' covariate.cols = c(2, 3))
+#' }
+#' @aliases Multivariate, multivariate
+#' @keywords multivariate
+#'
+`Multivariate` <- function(gwaa.data = NULL, phenofile = NULL, genofile = NULL, outfile = 'Multivariate_GWAS_results.txt',
+ trait.cols, covariate.cols = NULL, cuts = 20, ...) {
+ cat('loading data ...')
+ if (length(trait.cols) == 1) stop('select multiple traits to analyze!')
+ if (!is.null(phenofile) & !is.null(genofile)) {
+ pheno <- read.table(phenofile, header = TRUE)
+ geno <- databel(genofile)
+ if (nrow(pheno) != nrow(geno)) stop('sizes of phenofile and genofile do not match!')
+ GenABEL <- FALSE
+ cat(' OK\n')
+ } else if (!is.null(gwaa.data)) {
+ pheno <- gwaa.data at phdata
+ GenABEL <- TRUE
+ cat(' OK\n')
+ } else {
+ stop('insufficient data input!')
+ }
+ cat('initializing analysis ...')
+ if (!GenABEL) res <- matrix(NA, ncol(geno), 5) else res <- matrix(NA, ncol(gwaa.data at gtdata), 5)
+ colnames(res) <- c('MANOVA.stat', 'F.stat', 'df.num', 'df.den', 'P.F')
+ if (!GenABEL) rownames(res) <- colnames(geno) else rownames(res) <- gwaa.data at gtdata@snpnames
+ Y <- as.matrix(pheno[,trait.cols])
+ X <- matrix(1, nrow(Y), 1)
+ if (!is.null(covariate.cols)) X <- cbind(X, as.matrix(pheno[,covariate.cols]))
+ if (!GenABEL) nsnp <- ncol(geno) else nsnp <- ncol(gwaa.data at gtdata)
+ if (cuts != 1) {
+ cutpoints <- round(seq(1, nsnp, length = cuts + 1))
+ starts <- cutpoints[1:cuts]
+ ends <- c(cutpoints[2:cuts] - 1, cutpoints[cuts + 1])
+ } else {
+ starts <- 1
+ ends <- nsnp
+ }
+ cat(' OK\n')
+ if (cuts != 1) {
+ cat('multivariate GWA scan ...\n')
+ } else cat('multivariate GWA scan ...')
+ for (k in 1:cuts) {
+ idx <- starts[k]:ends[k]
+ if (!GenABEL) g <- databel2matrix(geno[,idx]) else g <- as.double(gwaa.data at gtdata[,idx])
+ for (j in 1:ncol(g)) {
+ stats <- try(summary(manova(Y ~ 0 + X + g[,j]), ...)$stats, silent = TRUE)
+ if (!inherits(stats, 'try-error')) res[idx[j],] <- stats[nrow(stats) - 1,-1]
+ }
+ if (cuts != 1) progress(k/cuts*100)
+ }
+ if (cuts == 1) cat(' OK\n') else cat('\n')
+ cat('writing results ...')
+ write.table(res, outfile, row.names = TRUE, col.names = TRUE, quote = FALSE, sep = '\t')
+ cat(' OK\n')
+ class(res) <- 'MultiRes'
+ return(res)
+}
Property changes on: pkg/MultiABEL/R/Multivariate.R
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: pkg/MultiABEL/R/misc.R
===================================================================
--- pkg/MultiABEL/R/misc.R (rev 0)
+++ pkg/MultiABEL/R/misc.R 2014-10-30 11:56:42 UTC (rev 1877)
@@ -0,0 +1,17 @@
+
+.onAttach <-
+ function(lib, pkg, ...)
+{
+ pkgDescription <- packageDescription(pkg)
+ pkgVersion <- pkgDescription$Version
+ pkgDate <- pkgDescription$Date
+ pkgName <- pkgDescription$Package
+ pkgTitle <- pkgDescription$Title
+ pkgAuthor <- pkgDescription$Author
+ pkgMaintainer <- pkgDescription$Maintainer
+ packageStartupMessage(paste("\n", pkgName, ": ", pkgTitle, sep = ""))
+ packageStartupMessage(paste("Version ", pkgVersion, " (", pkgDate, ") installed", sep = ""))
+ packageStartupMessage(paste("Author: ", pkgAuthor, sep = ""))
+ packageStartupMessage(paste("Maintainer: ", pkgMaintainer, "\n", sep = ""))
+ packageStartupMessage('Use citation("MultiABEL") to know how to cite this work.\n')
+}
\ No newline at end of file
Property changes on: pkg/MultiABEL/R/misc.R
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: pkg/MultiABEL/inst/CITATION
===================================================================
--- pkg/MultiABEL/inst/CITATION (rev 0)
+++ pkg/MultiABEL/inst/CITATION 2014-10-30 11:56:42 UTC (rev 1877)
@@ -0,0 +1,23 @@
+citHeader("To cite the package MultiABEL in publications use:")
+
+citEntry(entry="Article",
+ title = "Multi-omic-variate analysis identified the association between 14q32.33 and compound N-Glycosylation of human Immunoglobulin G",
+ author = personList(as.person("Xia Shen"),
+ as.person("..."),
+ as.person("Gordan Lauc"),
+ as.person("Jim Wilson"),
+ as.person("Yurii Aulchenko")),
+ journal = "Submitted",
+ year = "2014",
+ volume = "0",
+ number = "0",
+ pages = "0-0",
+ url = "http://",
+
+ textVersion =
+ paste("Xia Shen, ..., Gordan Lauc, Jim Wilson, Yurii Aulchenko (2014).",
+ "Multi-omic-variate analysis identified the association between 14q32.33 and compound N-Glycosylation of human Immunoglobulin G",
+ "Submitted",
+ "URL http://")
+)
+
Added: pkg/MultiABEL/man/MultiABEL.Rd
===================================================================
--- pkg/MultiABEL/man/MultiABEL.Rd (rev 0)
+++ pkg/MultiABEL/man/MultiABEL.Rd 2014-10-30 11:56:42 UTC (rev 1877)
@@ -0,0 +1,62 @@
+% Generated by roxygen2 (4.0.2): do not edit by hand
+\docType{package}
+\name{MultiABEL}
+\alias{MultiABEL}
+\alias{MultiABEL-package}
+\alias{multiabel}
+\title{Multivariate GWAS in R}
+\description{
+MultiABEL: Multivariate Genome-Wide Association Analyses
+}
+\details{
+The MultiABEL package performs multivariate genome-wide association studies (GWAS)
+and subsequent analyses. The GWAS module is compatible with different kinds of *ABEL
+data formats.
+
+For converting data from other formats, see
+
+\code{\link{convert.snp.illumina}} (Illumina/Affymetrix-like format). This is
+our preferred converting function, very extensively tested. Other conversion
+functions include:
+\code{\link{convert.snp.text}} (conversion from human-readable GenABEL format),
+\code{\link{convert.snp.ped}} (Linkage, Merlin, Mach, and similar files),
+\code{\link{convert.snp.mach}} (Mach-format),
+\code{\link{convert.snp.tped}} (from PLINK TPED format),
+\code{\link{convert.snp.affymetrix}} (BRML-style files).
+
+For converting of GenABEL's data to other formats, see
+\code{\link{export.merlin}} (MERLIN and MACH formats),
+\code{\link{export.impute}} (IMPUTE, SNPTEST and CHIAMO formats),
+\code{\link{export.plink}} (PLINK format, also exports phenotypic data).
+
+To load the data, see \code{\link{load.gwaa.data}}.
+
+For conversion to DatABEL format (used by ProbABEL and some other
+GenABEL suite packages), see
+\code{\link{impute2databel}},
+\code{\link{impute2mach}},
+\code{\link{mach2databel}}.
+
+For data managment and manipulations see
+\code{\link{merge.gwaa.data}},
+\code{\link{merge.snp.data}},
+\code{\link{gwaa.data-class}},
+\code{\link{snp.data-class}},
+\code{\link{snp.names}},
+\code{\link{snp.subset}}.
+}
+\author{
+Xia Shen, Yurii Aulchenko
+}
+\references{
+If you use MultiABEL package in your analysis, please cite the following work:
+
+Xia Shen, ..., Gordan Lauc, Jim Wilson, Yurii Aulchenko (2014).
+Multi-omic-variate analysis identified the association between 14q32.33
+and compound N-Glycosylation of human Immunoglobulin G. \emph{Submitted}.
+}
+\seealso{
+\code{GenABEL}, \code{DatABEL}
+}
+\keyword{package}
+
Property changes on: pkg/MultiABEL/man/MultiABEL.Rd
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: pkg/MultiABEL/man/MultiMeta.Rd
===================================================================
--- pkg/MultiABEL/man/MultiMeta.Rd (rev 0)
+++ pkg/MultiABEL/man/MultiMeta.Rd 2014-10-30 11:56:42 UTC (rev 1877)
@@ -0,0 +1,54 @@
+% Generated by roxygen2 (4.0.2): do not edit by hand
+\name{MultiMeta}
+\alias{MultiMeta}
+\alias{MultiMeta,}
+\alias{multimeta}
+\title{Meta-analysis for multivariate genome-wide association scan}
+\usage{
+MultiMeta(reslist, outfile = "Multivariate_meta-analysis_results.txt")
+}
+\arguments{
+\item{reslist}{A list where each element is a multivariate GWA result of class "MultiRes".}
+
+\item{outfile}{A string giving the path and file name of the output file. By default, a file
+named \code{'Multivariate_meta-analysis_results.txt'} will be written into the current working directory.}
+}
+\value{
+The function returns a matrix containing the meta-analysis results, where the row names are
+the variants names, and the column names are the names of the studies provided in \code{reslist} or
+generated by the program if no names are given, with an extra column \code{"p.meta"} containing the
+meta-analysis P-values. The results are also written into \code{outfile}.
+}
+\description{
+The function performs meta-analysis for multiple multivariate GWA analyses
+}
+\examples{
+\dontrun{
+## loading two gwaa.data sets in GenABEL
+data(ge03d2)
+data(ge03d2ex)
+
+## in each dataset, running multivariate GWAS for 3 traits: height, weight, bmi
+res1 <- Multivariate(gwaa.data = ge03d2, trait.cols = c(5, 6, 8),
+ covariate.cols = c(2, 3))
+res2 <- Multivariate(gwaa.data = ge03d2ex.clean, trait.cols = c(5, 6, 8),
+ covariate.cols = c(2, 3))
+
+## running meta-analysis by combining the P-values
+meta <- MultiMeta(list(res1, res2))
+}
+}
+\author{
+Xia Shen
+}
+\references{
+Xia Shen, ..., Gordan Lauc, Jim Wilson, Yurii Aulchenko (2014).
+Multi-omic-variate analysis identified the association between 14q32.33 and
+compound N-Glycosylation of human Immunoglobulin G \emph{Submitted}.
+}
+\seealso{
+\code{Multivariate}
+}
+\keyword{meta-analysis}
+\keyword{multivariate,}
+
Property changes on: pkg/MultiABEL/man/MultiMeta.Rd
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: pkg/MultiABEL/man/MultiRep.Rd
===================================================================
--- pkg/MultiABEL/man/MultiRep.Rd (rev 0)
+++ pkg/MultiABEL/man/MultiRep.Rd 2014-10-30 11:56:42 UTC (rev 1877)
@@ -0,0 +1,90 @@
+% Generated by roxygen2 (4.0.2): do not edit by hand
+\name{MultiRep}
+\alias{MultiRep}
+\alias{MultiRep,}
+\alias{multirep}
+\title{Replication analysis of multivariate genome-wide association signal}
+\usage{
+MultiRep(training.pheno = NULL, training.phenofile = NULL,
+ test.pheno = NULL, test.phenofile = NULL, pheno.names = NULL,
+ training.geno, test.geno)
+}
+\arguments{
+\item{training.pheno}{An (optional) matrix or data frame contains the phenotype data for the discovery
+sample, preferrably adjusted for fixed effects and population structure before multivariate GWA analysis.}
+
+\item{training.phenofile}{An (optional) plain text file contains phenotypes for the discovery sample.
+If this is provided, it will serve as \code{training.pheno}.}
+
+\item{test.pheno}{An (optional) matrix or data frame contains the phenotype data for the replication
+sample, preferrably adjusted for fixed effects and population structure.}
+
+\item{test.phenofile}{An (optional) plain text file contains phenotypes of the replication sample.
+If this is provided, it will serve as \code{test.pheno}.}
+
+\item{pheno.names}{A vector (length > 1) giving the column names of the phenotypes to be analyzed.}
+
+\item{training.geno}{A matrix or data.frame that contains the discovery sample genotype dosages
+of the variants to replicate.}
+
+\item{test.geno}{A matrix or data.frame that contains the replication sample genotype dosages
+of the variants to replicate. This object should have the same column names and order
+as \code{training.geno}.}
+}
+\value{
+The function returns a list of 3 matrices. \code{$replication} contains the estimate of
+variant effect on the corresponding compound phenotype (\code{beta_c}), standard error (\code{s.e.}),
+replication P-value (\code{P}), and proportion of phenotypic variance explained (\code{R-squared}).
+\code{$training.coef} contains the estimated coefficients in the discovery sample of each phenotype
+for each variant to construct the compound phenotype. \code{$test.coef} contains similar coefficients
+as in \code{$training.coef} but estimated in the replication sample, but these are just for the record,
+NOT used in the replication procedure.
+}
+\description{
+The function performs replication analysis of multivariate GWA signals.
+}
+\note{
+Either \code{.pheno} or \code{.phenofile} has to be provided.
+If both are provided, only \code{phenofile} will be used. Individual IDs
+in \code{.pheno} or \code{.phenofile} and \code{.geno} have to match!
+}
+\examples{
+\dontrun{
+## loading example discovery sample gwaa.data in GenABEL
+data(ge03d2)
+
+## running multivariate GWAS for 3 traits: height, weight, bmi
+res <- Multivariate(gwaa.data = ge03d2, trait.cols = c(5, 6, 8),
+ covariate.cols = c(2, 3))
+
+## extracting 5 significant variants
+(top <- res[order(res[,'P.F']),][2:6,])
+snps <- rownames(top)
+training.geno <- as.double(gtdata(ge03d2)[,snps])
+
+## loading example test sample gwaa.data in GenABEL
+data(ge03d2c)
+
+## extracting genotypes of the 5 variants
+test.geno <- as.double(gtdata(ge03d2c)[,snps])
+
+## try replication
+rep <- MultiRep(training.pheno = phdata(ge03d2), test.pheno = phdata(ge03d2c),
+ pheno.names = c('height', 'weight', 'bmi'),
+ training.geno = training.geno, test.geno = test.geno)
+}
+}
+\author{
+Xia Shen, Yurii Aulchenko
+}
+\references{
+Xia Shen, ..., Gordan Lauc, Jim Wilson, Yurii Aulchenko (2014).
+Multi-omic-variate analysis identified the association between 14q32.33 and
+compound N-Glycosylation of human Immunoglobulin G \emph{Submitted}.
+}
+\seealso{
+\code{\link{Multivariate}}
+}
+\keyword{multivariate,}
+\keyword{replication}
+
Property changes on: pkg/MultiABEL/man/MultiRep.Rd
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: pkg/MultiABEL/man/Multivariate.Rd
===================================================================
--- pkg/MultiABEL/man/Multivariate.Rd (rev 0)
+++ pkg/MultiABEL/man/Multivariate.Rd 2014-10-30 11:56:42 UTC (rev 1877)
@@ -0,0 +1,80 @@
+% Generated by roxygen2 (4.0.2): do not edit by hand
+\name{Multivariate}
+\alias{Multivariate}
+\alias{Multivariate,}
+\alias{multivariate}
+\title{Multivariate genome-wide association scan}
+\usage{
+Multivariate(gwaa.data = NULL, phenofile = NULL, genofile = NULL,
+ outfile = "Multivariate_GWAS_results.txt", trait.cols,
+ covariate.cols = NULL, cuts = 20, ...)
+}
+\arguments{
+\item{gwaa.data}{An (optional) object of \code{\link{gwaa.data-class}}.}
+
+\item{phenofile}{An (optional) plain text file contains phenotypic outcomes and covariates.}
+
+\item{genofile}{An (optional) object of \code{\link{databel-class}} containing genotype data.}
+
+\item{outfile}{A string giving the path and file name of the output file. By default, a file
+named \code{'Multivariate_GWAS_results.txt'} will be written into the current working directory.}
+
+\item{trait.cols}{A vector (length > 1) giving the column indices of the phenotypes to be analyzed.}
+
+\item{covariate.cols}{An (optional) vector giving the column indices of the covariates to be included.}
+
+\item{cuts}{An integer telling how many pieces the genotype data matrix will be splitted for analyze.
+The value can be set depending on the memory size. The smaller the value is, potentially the faster
+the analysis will be.}
+
+\item{...}{other parameters passed to \code{\link{summary.manova}}, e.g. different kinds of test statistics.}
+}
+\value{
+The function returns a matrix of class "MultiRes" containing the multivariate GWA results,
+where the row names are the variants names, and the column names correspond to the manova test
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/genabel -r 1877
More information about the Genabel-commits
mailing list