From bd580655c2e0c17da45f90dcb6f74d5f61a8658f Mon Sep 17 00:00:00 2001 From: Don Kang Date: Mon, 16 Jan 2012 00:00:00 +0000 Subject: [PATCH] version 0.1.8 --- DESCRIPTION | 8 ++++---- MD5 | 16 ++++++++-------- R/MetaQC.R | 15 ++++++++------- man/MetaQC-package.Rd | 8 ++++---- man/MetaQC.Rd | 2 +- man/cleanup.Rd | 2 +- man/plot.proto.Rd | 2 +- man/print.proto.Rd | 2 +- man/runQC.Rd | 2 +- 9 files changed, 29 insertions(+), 28 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e81dc20..e815195 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: MetaQC Type: Package Title: MetaQC: Objective Quality Control and Inclusion/Exclusion Criteria for Genomic Meta-Analysis -Version: 0.1.6 +Version: 0.1.8 Author: Don Kang and George Tseng Maintainer: Don Kang @@ -32,7 +32,7 @@ License: GPL-2 URL: https://github.com/donkang75/MetaQC LazyLoad: yes Collate: MetaQC.R requireAll.R functions.R runQC.R cleanup.R -Date: 2011-10-17 -Packaged: 2011-10-17 19:08:40 UTC; don +Date: 2012-01-16 +Packaged: 2012-01-16 05:23:41 UTC; don Repository: CRAN -Date/Publication: 2011-10-18 05:59:12 +Date/Publication: 2012-01-16 07:32:42 diff --git a/MD5 b/MD5 index f716938..6e2d6c7 100644 --- a/MD5 +++ b/MD5 @@ -1,17 +1,17 @@ -62eda68290c7a9a312e37977a8859bff *DESCRIPTION +90255e6b96799f5426cb64932acfdec9 *DESCRIPTION abde996ec487191303de7c015cf694a0 *NAMESPACE -115b78ebc07a73c1922ab2c4a4055cc6 *R/MetaQC.R +8a7a74b7075054ef0d3f203f3c381abc *R/MetaQC.R 045e992b75151a01a136ab0734346e75 *R/cleanup.R 622edf4b88cff644bc5a5c7f4b215766 *R/functions.R 747136af145e716b1c9c85cb0a12f7f5 *R/requireAll.R b6c2cca24c87e56bd8dd33b8e48b78af *R/runQC.R 35fa70c4a316424b88aa1ca609d070b1 *data/brain.rda ef5a22d59ce52a794593a74f8447e29a *data/datalist -4fea906710ab5ccff80fa862b815d3bf *man/MetaQC-package.Rd -c398ff7912e87624b9cd23df341b7105 *man/MetaQC.Rd +fed180a046f4759c1e98ccaa8e8cbf1d *man/MetaQC-package.Rd +65b210d4df63e710bd7527c6adf20958 *man/MetaQC.Rd b5ec4431932b3841d6b5b48f90d10196 *man/brain.Rd -c025f1de74a4e2ae4d3d8527c970e71a *man/cleanup.Rd -16b3a1dfa4bb6712f96ce87e1ef11792 *man/plot.proto.Rd -0cbfaabae717a1f56b78a21262431240 *man/print.proto.Rd +96c3b57ac777598e83d7ab2ef36de420 *man/cleanup.Rd +d762c55478e30e8144a7d4939fb24291 *man/plot.proto.Rd +e3fbf01f46e2bf413f4eec6c38050c1c *man/print.proto.Rd edcab02ebd1cd6ee5c44642838f4f068 *man/requireAll.Rd -8aeb4121bfc1487f9ad101202d575e24 *man/runQC.Rd +810a9f25eb3734d6d48ed86a8ec09677 *man/runQC.Rd diff --git a/R/MetaQC.R b/R/MetaQC.R index 6cdcef9..3129f00 100644 --- a/R/MetaQC.R +++ b/R/MetaQC.R @@ -113,10 +113,9 @@ MetaQC <- function(DList, GList, isParallel=FALSE, nCores=NULL, useCache=TRUE, f .d <- .DListF[[i]] .isNA <- any(is.na(.d)) - .pathMat <- foreach(g=iter(.$.GListIdx[[i]]), .combine=cbind) %dopar% { - .pathVec <- rep(0,nrow(.d)) - .pathVec[g] <- 1 - return(.pathVec) + .pathMat <- matrix(0, nrow(.d), length(.$.GListIdx[[i]])) + for(jj in 1:ncol(.pathMat)) { + .pathMat[.$.GListIdx[[i]][[jj]], jj] <- 1 } rownames(.pathMat) <- 1:nrow(.d) colnames(.pathMat) <- names(.$.GListIdx[[i]]) @@ -139,6 +138,7 @@ MetaQC <- function(DList, GList, isParallel=FALSE, nCores=NULL, useCache=TRUE, f } names(.pathList) <- sapply(.pathList,length) + #performance significantly degraded by length of .pathList, which is the number of unique pathway sizes .ScoresNullDist <- foreach(b=1:.B, .combine=rbind, .export="printLog") %dopar% { .g <- sample(nrow(.pathMat)) @@ -301,7 +301,7 @@ MetaQC <- function(DList, GList, isParallel=FALSE, nCores=NULL, useCache=TRUE, f .dat <- .dat[rowSums(!is.na(.dat))>=3,] .reduced <- GetEWPval(.dat[,-i]) .obs <- .dat[,i] - cor.test(.reduced, .obs, method="spearman", alternative="g")$p.value + suppressWarnings(cor.test(.reduced, .obs, method="spearman", alternative="g")$p.value) } names(.$.CQCgScores) <- colnames(.PValMat) .$.CQCgScores <- ifelse(.$.CQCgScores < .Machine$double.xmin, .Machine$double.xmin, .$.CQCgScores) @@ -356,7 +356,7 @@ MetaQC <- function(DList, GList, isParallel=FALSE, nCores=NULL, useCache=TRUE, f .dat <- .dat[rowSums(!is.na(.dat))>=3,] .reduced <- GetEWPval(.dat[,-i]) .obs <- .dat[,i] - cor.test(.reduced, .obs, method="spearman")$p.value + suppressWarnings(cor.test(.reduced, .obs, method="spearman")$p.value) } names(.$.CQCpScores) <- colnames(.PathPValMat) .$.CQCpScores <- ifelse(.$.CQCpScores < .Machine$double.xmin, .Machine$double.xmin, .$.CQCpScores) @@ -417,9 +417,10 @@ MetaQC <- function(DList, GList, isParallel=FALSE, nCores=NULL, useCache=TRUE, f RunQC <- function(., nPath=NULL, B=1e4, pvalCut=.05, pvalAdjust=FALSE, fileForCQCp="c2.all.v3.0.symbols.gmt", isCAQC=FALSE) { if(!file.exists(fileForCQCp)) { res <- Download("MetaQC",fileForCQCp) - if (inherits(res, "try-error") | res != 0L) + if (inherits(res, "try-error") | res != 0L) { file.remove(fileForCQCp) stop(gettextf("download of file '%s' failed!\nPlease download gmt files at http://www.broadinstitute.org/gsea/downloads.jsp", fileForCQCp)) + } } .GList <- paste(sub("(.+)[.][^.]+$", "\\1", basename(fileForCQCp)),".rda",sep="") diff --git a/man/MetaQC-package.Rd b/man/MetaQC-package.Rd index 55f3c92..ec6907d 100644 --- a/man/MetaQC-package.Rd +++ b/man/MetaQC-package.Rd @@ -2,7 +2,7 @@ \alias{MetaQC-package} \docType{package} \title{ -MetaQC: Quantitative Quality Assessment for Inclusion/Exclusion Criteria of Genomic Meta-Analysis +MetaQC: Objective Quality Control and Inclusion/Exclusion Criteria for Genomic Meta-Analysis } \description{ MetaQC implements our proposed quantitative quality control measures: (1) internal homogeneity of co-expression structure among studies (internal quality control; IQC); (2) external consistency of co-expression structure correlating with pathway database (external quality control; EQC); (3) accuracy of differentially expressed gene detection (accuracy quality control; AQCg) or pathway identification (AQCp); (4) consistency of differential expression ranking in genes (consistency quality control; CQCg) or pathways (CQCp). (See the reference for detailed explanation.) @@ -12,8 +12,8 @@ For each quality control index, the p-values from statistical hypothesis testing \tabular{ll}{ Package: \tab MetaQC\cr Type: \tab Package\cr -Version: \tab 0.1.6\cr -Date: \tab 2011-10-17\cr +Version: \tab 0.1.8\cr +Date: \tab 2012-01-16\cr License: \tab GPL-2\cr LazyLoad: \tab yes\cr } @@ -22,7 +22,7 @@ LazyLoad: \tab yes\cr Don Kang (donkang75@gmail.com) and George Tseng (ctseng@pitt.edu) } \references{ -Dongwan D. Kang, Etienne Sibille, Naftali Kaminski, and George C. Tseng. (2011) MetaQC: Objective Quality Control and Inclusion/Exclusion Criteria for Genomic Meta-Analysis. +Dongwan D. Kang, Etienne Sibille, Naftali Kaminski, and George C. Tseng. (Nucleic Acids Res. 2012) MetaQC: Objective Quality Control and Inclusion/Exclusion Criteria for Genomic Meta-Analysis. } \keyword{ QualityControl } \keyword{ MetaAnalysis }% __ONLY ONE__ keyword per line diff --git a/man/MetaQC.Rd b/man/MetaQC.Rd index aa65977..139d1ba 100644 --- a/man/MetaQC.Rd +++ b/man/MetaQC.Rd @@ -63,7 +63,7 @@ Use Print function to view various information. See examples below. } \references{ -Dongwan D. Kang, Etienne Sibille, Naftali Kaminski, and George C. Tseng. (2011) MetaQC: Objective Quality Control and Inclusion/Exclusion Criteria for Genomic Meta-Analysis. +Dongwan D. Kang, Etienne Sibille, Naftali Kaminski, and George C. Tseng. (Nucleic Acids Res. 2012) MetaQC: Objective Quality Control and Inclusion/Exclusion Criteria for Genomic Meta-Analysis. } \author{ Don Kang (donkang75@gmail.com) and George Tseng (ctseng@pitt.edu) diff --git a/man/cleanup.Rd b/man/cleanup.Rd index bf5e49d..4f3fb8a 100644 --- a/man/cleanup.Rd +++ b/man/cleanup.Rd @@ -26,7 +26,7 @@ A proto R object which obtained by MetaQC function. NA } \references{ -Dongwan D. Kang, Etienne Sibille, Naftali Kaminski, and George C. Tseng. (2011) Meta-QC: Objective Quality Control and Inclusion/Exclusion Criteria for Genomic Meta-Analysis. +Dongwan D. Kang, Etienne Sibille, Naftali Kaminski, and George C. Tseng. (Nucleic Acids Res. 2012) Meta-QC: Objective Quality Control and Inclusion/Exclusion Criteria for Genomic Meta-Analysis. } \author{ Don Kang (donkang75@gmail.com) and George Tseng (ctseng@pitt.edu) diff --git a/man/plot.proto.Rd b/man/plot.proto.Rd index 5232ad9..2ccf772 100644 --- a/man/plot.proto.Rd +++ b/man/plot.proto.Rd @@ -29,7 +29,7 @@ Further arguments to print function. NA } \references{ -Dongwan D. Kang, Etienne Sibille, Naftali Kaminski, and George C. Tseng. (2011) MetaQC: Objective Quality Control and Inclusion/Exclusion Criteria for Genomic Meta-Analysis. +Dongwan D. Kang, Etienne Sibille, Naftali Kaminski, and George C. Tseng. (Nucleic Acids Res. 2012) MetaQC: Objective Quality Control and Inclusion/Exclusion Criteria for Genomic Meta-Analysis. } \author{ Don Kang (donkang75@gmail.com) and George Tseng (ctseng@pitt.edu) diff --git a/man/print.proto.Rd b/man/print.proto.Rd index 3f2634a..6d3e5b9 100644 --- a/man/print.proto.Rd +++ b/man/print.proto.Rd @@ -29,7 +29,7 @@ Further arguments to print function. NA } \references{ -Dongwan D. Kang, Etienne Sibille, Naftali Kaminski, and George C. Tseng. (2011) MetaQC: Objective Quality Control and Inclusion/Exclusion Criteria for Genomic Meta-Analysis. +Dongwan D. Kang, Etienne Sibille, Naftali Kaminski, and George C. Tseng. (Nucleic Acids Res. 2012) MetaQC: Objective Quality Control and Inclusion/Exclusion Criteria for Genomic Meta-Analysis. } \author{ Don Kang (donkang75@gmail.com) and George Tseng (ctseng@pitt.edu) diff --git a/man/runQC.Rd b/man/runQC.Rd index a298c43..d5d0ffa 100644 --- a/man/runQC.Rd +++ b/man/runQC.Rd @@ -42,7 +42,7 @@ Gene set used for CQCp calculation. Usually larger gene set is used than EQC cal A data frame showing a summary of each quality control score. } \references{ -Dongwan D. Kang, Etienne Sibille, Naftali Kaminski, and George C. Tseng. (2011) MetaQC: Objective Quality Control and Inclusion/Exclusion Criteria for Genomic Meta-Analysis. +Dongwan D. Kang, Etienne Sibille, Naftali Kaminski, and George C. Tseng. (Nucleic Acids Res. 2012) MetaQC: Objective Quality Control and Inclusion/Exclusion Criteria for Genomic Meta-Analysis. } \author{ Don Kang (donkang75@gmail.com) and George Tseng (ctseng@pitt.edu)