[med-svn] [r-bioc-mergeomics] 02/03: Imported Upstream version 1.4.0

Dylan Aïssi bob.dybian-guest at moszumanska.debian.org
Mon Jul 24 19:49:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

bob.dybian-guest pushed a commit to branch master
in repository r-bioc-mergeomics.

commit 34a5e2d0446607858d15421fb7e74ee97a6a34c4
Author: Dylan Aïssi <bob.dybian at gmail.com>
Date:   Mon Jul 24 21:49:01 2017 +0200

    Imported Upstream version 1.4.0
---
 DESCRIPTION                        |   4 +-
 R/cle.LS.R                         | 498 ++++++++++++++++++++-----------------
 build/vignette.rds                 | Bin 233 -> 231 bytes
 inst/doc/Mergeomics.Rnw            |   8 +-
 inst/doc/Mergeomics.pdf            | Bin 265347 -> 265168 bytes
 inst/unitTests/test_ssea.analyze.R |   4 +-
 man/MSEA.KDA.onestep.Rd            |   8 +-
 man/Mergeomics-package.Rd          |   8 +-
 man/kda.analyze.Rd                 |   8 +-
 man/kda.analyze.exec.Rd            |  16 +-
 man/kda.analyze.simulate.Rd        |  16 +-
 man/kda.analyze.test.Rd            |  16 +-
 man/kda.configure.Rd               |   8 +-
 man/kda.finish.Rd                  |   8 +-
 man/kda.finish.estimate.Rd         |   8 +-
 man/kda.finish.save.Rd             |   8 +-
 man/kda.finish.summarize.Rd        |   8 +-
 man/kda.finish.trim.Rd             |   8 +-
 man/kda.prepare.Rd                 |  16 +-
 man/kda.prepare.overlap.Rd         |   8 +-
 man/kda.prepare.screen.Rd          |   8 +-
 man/kda.start.Rd                   |  16 +-
 man/kda.start.edges.Rd             |   8 +-
 man/kda.start.identify.Rd          |   8 +-
 man/kda.start.modules.Rd           |   8 +-
 man/kda2cytoscape.Rd               |   8 +-
 man/kda2cytoscape.colorize.Rd      |   8 +-
 man/kda2cytoscape.colormap.Rd      |   8 +-
 man/kda2cytoscape.drivers.Rd       |   8 +-
 man/kda2cytoscape.edges.Rd         |   8 +-
 man/kda2cytoscape.exec.Rd          |   8 +-
 man/kda2cytoscape.identify.Rd      |   8 +-
 man/kda2himmeli.Rd                 |   8 +-
 man/kda2himmeli.colorize.Rd        |   8 +-
 man/kda2himmeli.colormap.Rd        |   8 +-
 man/kda2himmeli.drivers.Rd         |   8 +-
 man/kda2himmeli.edges.Rd           |   8 +-
 man/kda2himmeli.exec.Rd            |   8 +-
 man/kda2himmeli.identify.Rd        |   8 +-
 man/ssea.analyze.Rd                |  25 +-
 man/ssea.analyze.observe.Rd        |  10 +-
 man/ssea.analyze.randgenes.Rd      |  51 +++-
 man/ssea.analyze.randloci.Rd       |  10 +-
 man/ssea.analyze.simulate.Rd       |  29 ++-
 man/ssea.analyze.statistic.Rd      |   8 +-
 man/ssea.control.Rd                |  10 +-
 man/ssea.finish.Rd                 |  10 +-
 man/ssea.finish.details.Rd         |  10 +-
 man/ssea.finish.fdr.Rd             |  10 +-
 man/ssea.finish.genes.Rd           |  10 +-
 man/ssea.meta.Rd                   |   8 +-
 man/ssea.prepare.Rd                |  10 +-
 man/ssea.prepare.counts.Rd         |  10 +-
 man/ssea.prepare.structure.Rd      |  10 +-
 man/ssea.start.Rd                  |   8 +-
 man/ssea.start.configure.Rd        |  10 +-
 man/ssea.start.identify.Rd         |   8 +-
 man/ssea.start.relabel.Rd          |  10 +-
 man/ssea2kda.Rd                    |   8 +-
 man/ssea2kda.analyze.Rd            |  10 +-
 man/ssea2kda.import.Rd             |  10 +-
 man/tool.aggregate.Rd              |   8 +-
 man/tool.cluster.Rd                |  10 +-
 man/tool.cluster.static.Rd         |   8 +-
 man/tool.coalesce.Rd               |  10 +-
 man/tool.coalesce.exec.Rd          |   8 +-
 man/tool.coalesce.find.Rd          |   8 +-
 man/tool.coalesce.merge.Rd         |   8 +-
 vignettes/Mergeomics.Rnw           |   8 +-
 69 files changed, 634 insertions(+), 537 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 5ca0d32..5accb61 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
 Package: Mergeomics
 Type: Package
 Title: Integrative network analysis of omics data
-Version: 1.2.0
+Version: 1.4.0
 Date: 2016-01-04
 Author: Ville-Petteri Makinen, Le Shu, Yuqi Zhao, Zeyneb Kurt, Bin Zhang,
     Xia Yang
@@ -16,5 +16,5 @@ biocViews: Software
 Suggests: RUnit, BiocGenerics
 License: GPL (>= 2)
 Depends: R (>= 3.0.1)
-Packaged: 2016-10-18 00:16:52 UTC; biocbuild
+Packaged: 2017-04-25 00:37:08 UTC; biocbuild
 NeedsCompilation: no
diff --git a/R/cle.LS.R b/R/cle.LS.R
index c1dde9f..4081566 100644
--- a/R/cle.LS.R
+++ b/R/cle.LS.R
@@ -1685,252 +1685,290 @@ ssea2kda.analyze <- function(job, moddata) {
 #                  P         enrichment P-values
 #                  FREQ      enrichment P-values (raw frequencies)
 #
-# Written by Ville-Petteri Makinen 2013
-#
-ssea.analyze <- function(job) {
-    cat("\nEstimating enrichment...\n")  
-    set.seed(job$seed)
-    
-    # Observed enrichment scores.
-    db <- job$database
-    scores <- ssea.analyze.observe(db)
-    nmods <- length(scores)
-    
-    # Simulated scores.
-    nperm <- job$nperm
-    nullsets <- ssea.analyze.simulate(db, scores, nperm, job$permtype)
-    
-    # Estimate scores based on Gaussian distribution.
-    cat("\nNormalizing scores...\n")
-    znull <- double()
-    zscores <- NA*scores
-    for(i in which(0*scores == 0)) {
-        x <- nullsets[[i]]    
-        x <- x[which(0*x == 0)]
-        param <- tool.normalize(x)
-        z <- tool.normalize(x, param)
-        zscores[i] <- tool.normalize(scores[i], param)
-        znull <- c(znull, z)
-    }
-    
-    # Estimate hit frequencies.
-    freq <- NA*scores
-    nnull <- length(znull)
-    for(i in which(0*scores == 0))
-        freq[i] <- sum(zscores[i] <= znull)/nnull
-    
-    # Estimate scores based on frequencies.
-    hscores <- NA*freq
-    rows <- which(freq > 5.0/nnull)
-    hscores[rows] <- qnorm(freq[rows], lower.tail=FALSE)
-    
-    # Fill in scores for low frequencies.
-    if(length(rows) < length(freq)) {
-        omega <- which.max(zscores)
-        hscores[omega] <- zscores[omega]
-        rows <- c(rows, omega)
-        pt <- approx(x=zscores[rows], y=hscores[rows], xout=zscores)
-        hscores <- pt$y
-    }
-    
-    # Estimate statistical significance.
-    z <- 0.5*(zscores + hscores)
-    pvalues <- pnorm(z, lower.tail=FALSE)
-    
-    # Collect results.
-    res <- data.frame(MODULE=(1:nmods), stringsAsFactors=FALSE)
-    res$P <- pvalues
-    res$FREQ <- freq
-    
-    # Remove missing scores.
-    targets <- which(0*scores == 0)
-    job$results <- res[targets,]
-    return(job)
+# Written by Ville-Petteri Makinen 2013, Modified by Le Shu 2016
+#
+ssea.analyze <- function(job, trim_start=0.002, trim_end=0.998) {
+    cat("\nEstimating enrichment...\n")  
+    set.seed(job$seed)
+    
+    # Observed enrichment scores.
+    db <- job$database
+    scores <- ssea.analyze.observe(db)
+    nmods <- length(scores)
+    
+    # Simulated scores.
+    nperm <- job$nperm
+    nullsets <- ssea.analyze.simulate(db, scores, nperm, job$permtype, trim_start, trim_end)
+    
+    # Estimate scores based on Gaussian distribution.
+    cat("\nNormalizing scores...\n")
+    znull <- double()
+    zscores <- NA*scores
+    for(i in which(0*scores == 0)) {
+        x <- nullsets[[i]]    
+        x <- x[which(0*x == 0)]
+        param <- tool.normalize(x)
+        z <- tool.normalize(x, param)
+        zscores[i] <- tool.normalize(scores[i], param)
+        znull <- c(znull, z)
+    }
+    
+    # Estimate hit frequencies.
+    freq <- NA*scores
+    nnull <- length(znull)
+    for(i in which(0*scores == 0))
+        freq[i] <- sum(zscores[i] <= znull)/nnull
+    
+    # Estimate scores based on frequencies.
+    hscores <- NA*freq
+    rows <- which(freq > 5.0/nnull)
+    hscores[rows] <- qnorm(freq[rows], lower.tail=FALSE)
+    
+    # Fill in scores for low frequencies.
+    if(length(rows) < length(freq)) {
+        omega <- which.max(zscores)
+        hscores[omega] <- zscores[omega]
+        rows <- c(rows, omega)
+        pt <- approx(x=zscores[rows], y=hscores[rows], xout=zscores)
+        hscores <- pt$y
+    }
+    
+    # Estimate statistical significance.
+    z <- 0.5*(zscores + hscores)
+    pvalues <- pnorm(z, lower.tail=FALSE)
+    
+    # Collect results.
+    res <- data.frame(MODULE=(1:nmods), stringsAsFactors=FALSE)
+    res$P <- pvalues
+    res$FREQ <- freq
+    
+    # Remove missing scores.
+    targets <- which(0*scores == 0)
+    job$results <- res[targets,]
+    return(job)
 }
 
 #----------------------------------------------------------------------------
 
-ssea.analyze.simulate <- function(db, observ, nperm, permtype) {
-    
-    # Include only non-empty modules for simulation.
-    nmods <- length(db$modulesizes)
-    targets <- which(db$modulesizes > 0)
-    hits <- rep(NA, nmods)
-    hits[targets] <- 0
-    
-    # Prepare data structures to hold null samples.
-    keys <- rep(0, nperm)
-    scores <- rep(NA, nperm)
-    scoresets <- list()
-    for(i in 1:nmods)
-        scoresets[[i]] <- double()
-    
-    # Simulate random scores.
-    nelem <- 0
-    snull <- double()
-    stamp <- Sys.time()
-    for(k in 1:nperm) {
-        if(permtype == "gene") snull <- ssea.analyze.randgenes(db, targets)
-        if(permtype == "locus") snull <- ssea.analyze.randloci(db, targets)
-        if(length(snull) < 1) stop("Unknown permutation type.")
-        
-        # Check data capacity.
-        ntarg <- length(targets)
-        if((nelem + ntarg) >= length(keys)) {
-            keys <- c(keys, rep(0, nelem))
-            scores <- c(scores, rep(NA, nelem))
-        }
-        
-        # Collect scores.
-        for(i in 1:ntarg) {
-            nelem <- (nelem + 1)
-            t <- targets[i]
-            keys[nelem] <- t
-            scores[nelem] <- snull[i]
-            hits[t] <- (hits[t] + (snull[i] > observ[t]))
-        }
-        
-        # Drop less significant modules.
-        hmax <- min(sqrt(nperm/k), 10)
-        targets <- which(hits < hmax)
-        if(length(targets) < 1) break
-        
-        # Progress report.
-        delta <- as.double(Sys.time() - stamp)
-        if((delta < 10.0) & (k < nperm)) next
-        cat(sprintf("%d/%d cycles\n", k, nperm))
-        stamp <- Sys.time()
-    }
-    
-    # Remove missing entries.
-    scores <- scores[1:nelem]
-    keys <- keys[1:nelem]
-    
-    # Organize null scores into lists.
-    st <- tool.aggregate(keys)
-    labels <- as.integer(st$labels)
-    blocks <- st$blocks
-    for(i in 1:length(blocks)) {
-        key <- labels[i]
-        rows <- blocks[[i]]
-        scoresets[[key]] <- scores[rows]
-    }
-    return(scoresets)
+ssea.analyze.simulate <- function(db, observ, nperm, permtype, trim_start, trim_end) {
+
+    #############################################################################
+	#####This is an additional process to trim genes with exceptionally high value####
+	###################################################################################
+	gene2loci <- db$gene2loci
+	locus2row <- db$locus2row
+	observed <- db$observed
+    #Calcuate individual gene enrichment score
+	trim_scores <- rep(NA, length(gene2loci))
+	
+	for(k in 1:length(trim_scores)) {
+        genes <- k
+        
+        # Collect markers.
+        loci <- integer()
+        for(i in genes) 
+            loci <- c(loci, gene2loci[[i]])
+        
+        # Determine data rows.
+        loci <- unique(loci)
+        rows <- locus2row[loci]
+        nloci <- length(rows)
+        
+        # Calculate total counts.
+        e <- (nloci/length(locus2row))*colSums(observed)
+        o <- observed[rows,]
+        if(nloci > 1) o <- colSums(o)
+        
+        # Estimate enrichment.
+        trim_scores[k] <- ssea.analyze.statistic(o, e)
+    }
+	cutoff=as.numeric(quantile(trim_scores,probs=c(trim_start,trim_end)))
+	gene_sel=which(trim_scores>cutoff[1]&trim_scores<cutoff[2])
+	
+	
+    # Include only non-empty modules for simulation.
+    nmods <- length(db$modulesizes)
+    targets <- which(db$modulesizes > 0)
+    hits <- rep(NA, nmods)
+    hits[targets] <- 0
+    
+    # Prepare data structures to hold null samples.
+    keys <- rep(0, nperm)
+    scores <- rep(NA, nperm)
+    scoresets <- list()
+    for(i in 1:nmods)
+        scoresets[[i]] <- double()
+    
+    # Simulate random scores.
+    nelem <- 0
+    snull <- double()
+    stamp <- Sys.time()
+    for(k in 1:nperm) {
+        if(permtype == "gene") snull <- ssea.analyze.randgenes(db, targets, gene_sel)
+        if(permtype == "locus") snull <- ssea.analyze.randloci(db, targets)
+        if(length(snull) < 1) stop("Unknown permutation type.")
+        
+        # Check data capacity.
+        ntarg <- length(targets)
+        if((nelem + ntarg) >= length(keys)) {
+            keys <- c(keys, rep(0, nelem))
+            scores <- c(scores, rep(NA, nelem))
+        }
+        
+        # Collect scores.
+        for(i in 1:ntarg) {
+            nelem <- (nelem + 1)
+            t <- targets[i]
+            keys[nelem] <- t
+            scores[nelem] <- snull[i]
+            hits[t] <- (hits[t] + (snull[i] > observ[t]))
+        }
+        
+        # Drop less significant modules.
+        hmax <- min(sqrt(nperm/k), 10)
+        targets <- which(hits < hmax)
+        if(length(targets) < 1) break
+        
+        # Progress report.
+        delta <- as.double(Sys.time() - stamp)
+        if((delta < 10.0) & (k < nperm)) next
+        cat(sprintf("%d/%d cycles\n", k, nperm))
+        stamp <- Sys.time()
+    }
+    
+    # Remove missing entries.
+    scores <- scores[1:nelem]
+    keys <- keys[1:nelem]
+    
+    # Organize null scores into lists.
+    st <- tool.aggregate(keys)
+    labels <- as.integer(st$labels)
+    blocks <- st$blocks
+    for(i in 1:length(blocks)) {
+        key <- labels[i]
+        rows <- blocks[[i]]
+        scoresets[[key]] <- scores[rows]
+    }
+    return(scoresets)
 }
 
 #----------------------------------------------------------------------------
 
-ssea.analyze.observe <- function(db) {
-    mod2gen <- db$module2genes
-    gene2loci <- db$gene2loci
-    locus2row <- db$locus2row
-    observed <- db$observed
-    expected <- db$expected
-    nmods <- length(mod2gen)  
-    
-    # Test every module.
-    scores <- rep(NA, nmods)
-    for(k in 1:nmods) {
-        genes <- mod2gen[[k]]
-        
-        # Collect markers.
-        loci <- integer()
-        for(i in genes) 
-            loci <- c(loci, gene2loci[[i]])
-        
-        # Determine data rows.
-        loci <- unique(loci)
-        rows <- locus2row[loci]
-        nloci <- length(rows)    
-        
-        # Calculate total counts.
-        e <- nloci*expected
-        o <- observed[rows,]
-        if(nloci > 1) o <- colSums(o)
-        
-        # Estimate enrichment.
-        scores[k] <- ssea.analyze.statistic(o, e)
-    }
-    return(scores)
+ssea.analyze.observe <- function(db) {
+    mod2gen <- db$module2genes
+    gene2loci <- db$gene2loci
+    locus2row <- db$locus2row
+    observed <- db$observed
+    expected <- db$expected
+    nmods <- length(mod2gen)  
+    
+    # Test every module.
+    scores <- rep(NA, nmods)
+    for(k in 1:nmods) {
+        genes <- mod2gen[[k]]
+        
+        # Collect markers.
+        loci <- integer()
+        for(i in genes) 
+            loci <- c(loci, gene2loci[[i]])
+        
+        # Determine data rows.
+        loci <- unique(loci)
+        rows <- locus2row[loci]
+        nloci <- length(rows)    
+        
+        # Calculate total counts.
+        #e <- nloci*expected
+		e <- (nloci/length(locus2row))*colSums(observed)
+        o <- observed[rows,]
+        if(nloci > 1) o <- colSums(o)
+        
+        # Estimate enrichment.
+        scores[k] <- ssea.analyze.statistic(o, e)
+    }
+    return(scores)
 }
 
 #----------------------------------------------------------------------------
 
-ssea.analyze.randgenes <- function(db, targets) {
-    mod2gen <- db$module2genes
-    modsizes <- db$modulesizes
-    modlengths <- db$modulelengths
-    gene2loci <- db$gene2loci
-    locus2row <- db$locus2row
-    observed <- db$observed
-    expected <- db$expected
-    
-    # Test target modules.
-    scores <- double()
-    nrows <- length(locus2row)
-    npool <- length(gene2loci)
-    for(k in targets) {
-        msize <- modsizes[[k]]
-        nloci <- modlengths[[k]]
-        
-        # Collect pre-defined number of markers from random genes.
-        loci <- integer()
-        genes <- sample.int(npool, (msize + 10))
-        while(length(loci) < nloci) {
-            for(i in genes) {
-                tmp <- gene2loci[[i]]
-                loci <- c(loci, tmp)
-            }
-            loci <- unique(loci)
-            genes <- sample.int(npool, msize)
-        }
-        
-        # Determine data rows.
-        loci <- loci[1:nloci]
-        rows <- locus2row[loci]
-        
-        # Calculate total counts.
-        e <- nloci*expected
-        o <- observed[rows,]
-        if(nloci > 1) o <- colSums(o)
-        
-        # Estimate enrichment.
-        z <- ssea.analyze.statistic(o, e)
-        scores <- c(scores, z)
-    }
-    return(scores)
+ssea.analyze.randgenes <- function(db, targets, gene_sel) {
+    mod2gen <- db$module2genes
+    modsizes <- db$modulesizes
+    modlengths <- db$modulelengths
+    gene2loci <- db$gene2loci
+    locus2row <- db$locus2row
+    observed <- db$observed
+    expected <- db$expected
+    
+    # Test target modules.
+    scores <- double()
+    nrows <- length(locus2row)
+    #npool <- length(gene2loci)
+    for(k in targets) {
+        msize <- modsizes[[k]]
+        nloci <- modlengths[[k]]
+        
+        # Collect pre-defined number of markers from random genes.
+        loci <- integer()
+        #genes <- sample.int(npool, (msize + 10))
+		genes <- sample(gene_sel, (msize + 10))
+        while(length(loci) < nloci) {
+            for(i in genes) {
+                tmp <- gene2loci[[i]]
+                loci <- c(loci, tmp)
+            }
+            loci <- unique(loci)
+            genes <- sample(gene_sel, (msize + 10))
+        }
+        
+        # Determine data rows.
+        loci <- loci[1:nloci]
+        rows <- locus2row[loci]
+        
+        # Calculate total counts.
+        #e <- nloci*expected
+		e <- (nloci/length(locus2row))*colSums(observed)
+        o <- observed[rows,]
+        if(nloci > 1) o <- colSums(o)
+        
+        # Estimate enrichment.
+        z <- ssea.analyze.statistic(o, e)
+        scores <- c(scores, z)
+    }
+    return(scores)
 }
 
 #----------------------------------------------------------------------------
 
-ssea.analyze.randloci <- function(db, targets) {
-    modlengths <- db$modulelengths
-    locus2row <- db$locus2row
-    observed <- db$observed
-    expected <- db$expected
-    
-    # Test target modules.
-    scores <- double()
-    nrows <- length(locus2row)
-    for(k in targets) {
-        nloci <- modlengths[[k]]
-        
-        # Determine data rows.
-        loci <- sample.int(nrows, nloci)
-        rows <- locus2row[loci]
-        
-        # Calculate total counts.
-        e <- nloci*expected
-        o <- observed[rows,]
-        if(nloci > 1) o <- colSums(o)
-        
-        # Estimate enrichment.
-        z <- ssea.analyze.statistic(o, e)
-        scores <- c(scores, z)
-    }
-    
-    # Return results.
-    return(scores)
+ssea.analyze.randloci <- function(db, targets) {
+    modlengths <- db$modulelengths
+    locus2row <- db$locus2row
+    observed <- db$observed
+    expected <- db$expected
+    
+    # Test target modules.
+    scores <- double()
+    nrows <- length(locus2row)
+    for(k in targets) {
+        nloci <- modlengths[[k]]
+        
+        # Determine data rows.
+        loci <- sample.int(nrows, nloci)
+        rows <- locus2row[loci]
+        
+        # Calculate total counts.
+        #e <- nloci*expected
+		e <- (nloci/length(locus2row))*colSums(observed)
+        o <- observed[rows,]
+        if(nloci > 1) o <- colSums(o)
+        
+        # Estimate enrichment.
+        z <- ssea.analyze.statistic(o, e)
+        scores <- c(scores, z)
+    }
+    
+    # Return results.
+    return(scores)
 }
 
 #----------------------------------------------------------------------------
diff --git a/build/vignette.rds b/build/vignette.rds
index 3652ad0..9c13842 100644
Binary files a/build/vignette.rds and b/build/vignette.rds differ
diff --git a/inst/doc/Mergeomics.Rnw b/inst/doc/Mergeomics.Rnw
index 294180d..3426f00 100644
--- a/inst/doc/Mergeomics.Rnw
+++ b/inst/doc/Mergeomics.Rnw
@@ -44,10 +44,10 @@ xyang123 at ucla.edu
 
 If you use mergeomics in published research, please cite:
 
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics 
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 
 
 \tableofcontents
diff --git a/inst/doc/Mergeomics.pdf b/inst/doc/Mergeomics.pdf
index 90dd8e8..e521779 100644
Binary files a/inst/doc/Mergeomics.pdf and b/inst/doc/Mergeomics.pdf differ
diff --git a/inst/unitTests/test_ssea.analyze.R b/inst/unitTests/test_ssea.analyze.R
index 061c1d0..3c6593e 100644
--- a/inst/unitTests/test_ssea.analyze.R
+++ b/inst/unitTests/test_ssea.analyze.R
@@ -23,7 +23,7 @@ test_ssea.analyze <- function() {
     ## compare the pvals with the expected ones:
     ## since we set the seed for random # generation, we know the exact
     ## results for our input sets:
-    checkEqualsNumeric(sort(as.numeric(job.msea$results$P))[1], 
-    3.67e-33, tolerance=1.0e-4)
+    checkEqualsNumeric(sort(as.numeric(job.msea$results$P))[2], 
+    2.25e-60, tolerance=1.0e-4)
 
 }
diff --git a/man/MSEA.KDA.onestep.Rd b/man/MSEA.KDA.onestep.Rd
index 158778d..79dd583 100644
--- a/man/MSEA.KDA.onestep.Rd
+++ b/man/MSEA.KDA.onestep.Rd
@@ -81,10 +81,10 @@ plan$nperm <- 100 ## default value is 20000
 \donttest{plan <- MSEA.KDA.onestep(plan, apply.MSEA=TRUE)}
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Zeyneb Kurt
diff --git a/man/Mergeomics-package.Rd b/man/Mergeomics-package.Rd
index 095d661..e25b2b4 100644
--- a/man/Mergeomics-package.Rd
+++ b/man/Mergeomics-package.Rd
@@ -58,10 +58,10 @@ Ville-Petteri Makinen, Le Shu, Yuqi Zhao, Zeyneb Kurt, Bin Zhang, Xia Yang
 Maintainer: <zeyneb at ucla.edu>
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 
 \keyword{ 
diff --git a/man/kda.analyze.Rd b/man/kda.analyze.Rd
index 5a8ecac..cc7257e 100644
--- a/man/kda.analyze.Rd
+++ b/man/kda.analyze.Rd
@@ -83,10 +83,10 @@ file.remove("subsetof.supersets.txt")
 unlink("Results", recursive = TRUE)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.analyze.exec.Rd b/man/kda.analyze.exec.Rd
index 1f5441c..71c452d 100644
--- a/man/kda.analyze.exec.Rd
+++ b/man/kda.analyze.exec.Rd
@@ -57,13 +57,13 @@ job.kda$depth<-1
 ## 0 means we do not consider the directions of the regulatory interactions
 ## while 1 is opposite.
 job.kda$direction<-1
-job.kda$nperm <- 20 # the default value is 2000, use 20 for unit tests
-
+job.kda$nperm <- 20 # the default value is 2000, use 20 for unit tests
+
 ## kda.start() process takes long time while seeking hubs in the given net
 ## Here, we used a very small subset of the module list (1st 10 mods
 ## from the original module file):
 moddata <- tool.read(job.kda$modfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 ## save this to a temporary file and set its path as new job.kda$modfile:
@@ -81,17 +81,17 @@ graph <- job.kda$graph  ## we need to import a network
 nsim <- job.kda$nperm   ## number of simulations
 ## calculate p-vals of KDs for the specified module:
 # p <- kda.analyze.exec(memb, graph, nsim) ## see kda.analyze() for details
-
+
 ## Remove the temporary files used for the test:
 file.remove("subsetof.supersets.txt")
 ## remove the results folder
 unlink("Results", recursive = TRUE)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.analyze.simulate.Rd b/man/kda.analyze.simulate.Rd
index 18b1922..eddbdea 100644
--- a/man/kda.analyze.simulate.Rd
+++ b/man/kda.analyze.simulate.Rd
@@ -71,13 +71,13 @@ job.kda$depth<-1
 ## 0 means we do not consider the directions of the regulatory interactions
 ## while 1 is opposite.
 job.kda$direction<-1
-job.kda$nperm <- 20 # the default value is 2000, use 20 for unit tests
-
+job.kda$nperm <- 20 # the default value is 2000, use 20 for unit tests
+
 ## kda.start() process takes long time while seeking hubs in the given net
 ## Here, we used a very small subset of the module list (1st 10 mods
 ## from the original module file):
 moddata <- tool.read(job.kda$modfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 ## save this to a temporary file and set its path as new job.kda$modfile:
@@ -116,7 +116,7 @@ nmemb <- length(memb)
 # x <- kda.analyze.simulate(obs[k], g, nmemb, nnodes, 200)
 ## Then, use x to estimate preliminary and final P-values. 
 ## See kda.analyze() for more detail
-
+
 ## Remove the temporary files used for the test:
 file.remove("subsetof.supersets.txt")
 ## remove the results folder
@@ -124,10 +124,10 @@ unlink("Results", recursive = TRUE)
 # } ## finishing for loop
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.analyze.test.Rd b/man/kda.analyze.test.Rd
index 49c0414..0594af3 100644
--- a/man/kda.analyze.test.Rd
+++ b/man/kda.analyze.test.Rd
@@ -66,13 +66,13 @@ job.kda$depth<-1
 ## 0 means we do not consider the directions of the regulatory interactions
 ## while 1 is opposite.
 job.kda$direction<-1
-job.kda$nperm <- 20 # the default value is 2000, use 20 for unit tests
-
+job.kda$nperm <- 20 # the default value is 2000, use 20 for unit tests
+
 ## kda.start() process takes long time while seeking hubs in the given net
 ## Here, we used a very small subset of the module list (1st 10 mods
 ## from the original module file):
 moddata <- tool.read(job.kda$modfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 ## save this to a temporary file and set its path as new job.kda$modfile:
@@ -105,17 +105,17 @@ obs[k] <- kda.analyze.test(g$RANK, g$STRENG, memb, nnodes)
 
 ## Then, estimate preliminary and final P-values by kda.analyze.simulate()
 ## See kda.analyze() for more details
-
+
 ## Remove the temporary files used for the test:
 file.remove("subsetof.supersets.txt")
 ## remove the results folder
 unlink("Results", recursive = TRUE)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.configure.Rd b/man/kda.configure.Rd
index 6c505cc..764395e 100644
--- a/man/kda.configure.Rd
+++ b/man/kda.configure.Rd
@@ -84,10 +84,10 @@ if(is.null(plan$seed)) plan$seed <- 1
 ## these are the main parameters needed to be assigned default values.
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.finish.Rd b/man/kda.finish.Rd
index 683d0d0..9a33cfb 100644
--- a/man/kda.finish.Rd
+++ b/man/kda.finish.Rd
@@ -64,10 +64,10 @@ job.kda <- kda.finish(job.kda)
 unlink("Results", recursive = TRUE)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.finish.estimate.Rd b/man/kda.finish.estimate.Rd
index 85de67a..a88a8f6 100644
--- a/man/kda.finish.estimate.Rd
+++ b/man/kda.finish.estimate.Rd
@@ -40,10 +40,10 @@ data(job_kda_analyze)
 # }
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.finish.save.Rd b/man/kda.finish.save.Rd
index b47c56a..42d49a9 100644
--- a/man/kda.finish.save.Rd
+++ b/man/kda.finish.save.Rd
@@ -46,10 +46,10 @@ data(job_kda_analyze)
 # }
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.finish.summarize.Rd b/man/kda.finish.summarize.Rd
index 5849c6c..dfd3d3e 100644
--- a/man/kda.finish.summarize.Rd
+++ b/man/kda.finish.summarize.Rd
@@ -50,10 +50,10 @@ data(job_kda_analyze)
 ## See kda.analyze() and kda.finish() for details
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.finish.trim.Rd b/man/kda.finish.trim.Rd
index 7b103c5..7b247c3 100644
--- a/man/kda.finish.trim.Rd
+++ b/man/kda.finish.trim.Rd
@@ -44,10 +44,10 @@ data(job_kda_analyze)
 ## See kda.analyze() and kda.finish() for details
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.prepare.Rd b/man/kda.prepare.Rd
index 45922f0..df63d8c 100644
--- a/man/kda.prepare.Rd
+++ b/man/kda.prepare.Rd
@@ -64,13 +64,13 @@ job.kda$depth<-1
 ## 0 means we do not consider the directions of the regulatory interactions
 ## while 1 is opposite.
 job.kda$direction <- 1
-job.kda$nperm <- 20 # the default value is 2000, use 20 for unit tests
-
+job.kda$nperm <- 20 # the default value is 2000, use 20 for unit tests
+
 ## kda.start() process takes long time while seeking hubs in the given net
 ## Here, we used a very small subset of the module list (1st 10 mods
 ## from the original module file):
 moddata <- tool.read(job.kda$modfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 ## save this to a temporary file and set its path as new job.kda$modfile:
@@ -84,17 +84,17 @@ job.kda <- kda.start(job.kda)
 ## Find the hubs, co-hubs, and hub neighborhoods (hubnets), etc.:
 job.kda <- kda.prepare(job.kda)
 ## After that, we need to call kda.analyze() and kda.finish()
-
+
 ## Remove the temporary files used for the test:
 file.remove("subsetof.supersets.txt")
 ## remove the results folder
 unlink("Results", recursive = TRUE)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.prepare.overlap.Rd b/man/kda.prepare.overlap.Rd
index 9b91bde..79ee090 100644
--- a/man/kda.prepare.overlap.Rd
+++ b/man/kda.prepare.overlap.Rd
@@ -73,10 +73,10 @@ job.kda$direction <- 1
 
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.prepare.screen.Rd b/man/kda.prepare.screen.Rd
index 0af1d76..179c40d 100644
--- a/man/kda.prepare.screen.Rd
+++ b/man/kda.prepare.screen.Rd
@@ -81,10 +81,10 @@ job.kda$direction <- 1
 ## Then, extract overlapping co-hubs by kda.prepare.overlap()
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.start.Rd b/man/kda.start.Rd
index de7d76c..e6ba5d7 100644
--- a/man/kda.start.Rd
+++ b/man/kda.start.Rd
@@ -57,13 +57,13 @@ job.kda$depth<-1
 ## 0 means we do not consider the directions of the regulatory interactions
 ## while 1 is opposite.
 job.kda$direction <- 1
-job.kda$nperm <- 20 # the default value is 2000, use 20 for unit tests
-
+job.kda$nperm <- 20 # the default value is 2000, use 20 for unit tests
+
 ## kda.start() process takes long time while seeking hubs in the given net
 ## Here, we used a very small subset of the module list (1st 10 mods
 ## from the original module file):
 moddata <- tool.read(job.kda$modfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 ## save this to a temporary file and set its path as new job.kda$modfile:
@@ -75,15 +75,15 @@ job.kda <- kda.configure(job.kda)
 job.kda <- kda.start(job.kda) 
 
 ## Remove the temporary files used for the test:
-file.remove("subsetof.supersets.txt")
+file.remove("subsetof.supersets.txt")
 ## remove the results folder
 unlink("Results", recursive = TRUE)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.start.edges.Rd b/man/kda.start.edges.Rd
index 8d0309a..549e563 100644
--- a/man/kda.start.edges.Rd
+++ b/man/kda.start.edges.Rd
@@ -23,10 +23,10 @@ maximum allowed node degree, edge direction (\code{job$netfile},
 is smaller than the maximum allowed node degree}
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \examples{
 job.kda <- list()
diff --git a/man/kda.start.identify.Rd b/man/kda.start.identify.Rd
index 3ef2bc3..43efe61 100644
--- a/man/kda.start.identify.Rd
+++ b/man/kda.start.identify.Rd
@@ -39,10 +39,10 @@ dd <- kda.start.identify(aa, "NODE", c("GeneA"))
 dd
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda.start.modules.Rd b/man/kda.start.modules.Rd
index ffa5ff6..ac46941 100644
--- a/man/kda.start.modules.Rd
+++ b/man/kda.start.modules.Rd
@@ -56,10 +56,10 @@ job.kda <- kda.configure(job.kda)
 unlink("Results", recursive = TRUE)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda2cytoscape.Rd b/man/kda2cytoscape.Rd
index 7fdaf0f..2df2749 100644
--- a/man/kda2cytoscape.Rd
+++ b/man/kda2cytoscape.Rd
@@ -88,10 +88,10 @@ job.kda <- kda2cytoscape(job.kda)
 unlink("Results", recursive = TRUE)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Zeyneb Kurt
diff --git a/man/kda2cytoscape.colorize.Rd b/man/kda2cytoscape.colorize.Rd
index 515720a..f98d927 100644
--- a/man/kda2cytoscape.colorize.Rd
+++ b/man/kda2cytoscape.colorize.Rd
@@ -33,10 +33,10 @@ colors will be assigned to that node (one color for each of these modules)
 }
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \examples{
 ## Trace module memberships for each KD and its neighbors
diff --git a/man/kda2cytoscape.colormap.Rd b/man/kda2cytoscape.colormap.Rd
index b3f9908..3ac3851 100644
--- a/man/kda2cytoscape.colormap.Rd
+++ b/man/kda2cytoscape.colormap.Rd
@@ -23,10 +23,10 @@ color.number = 5 ## let us assume we have 5 modules, assign 1 color to each:
 palette <- kda2cytoscape.colormap(color.number)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Zeyneb Kurt
diff --git a/man/kda2cytoscape.drivers.Rd b/man/kda2cytoscape.drivers.Rd
index 21487e8..4b7a50e 100644
--- a/man/kda2cytoscape.drivers.Rd
+++ b/man/kda2cytoscape.drivers.Rd
@@ -61,10 +61,10 @@ drivers <- kda2cytoscape.drivers(job.kda$results, modules, ndriv=2)
 unlink("Results", recursive = TRUE)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Zeyneb Kurt
diff --git a/man/kda2cytoscape.edges.Rd b/man/kda2cytoscape.edges.Rd
index 87bd269..f8018a5 100644
--- a/man/kda2cytoscape.edges.Rd
+++ b/man/kda2cytoscape.edges.Rd
@@ -65,10 +65,10 @@ job.kda$depth, job.kda$direction)
 unlink("Results", recursive = TRUE)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Zeyneb Kurt
diff --git a/man/kda2cytoscape.exec.Rd b/man/kda2cytoscape.exec.Rd
index c566d2f..54d7ced 100644
--- a/man/kda2cytoscape.exec.Rd
+++ b/man/kda2cytoscape.exec.Rd
@@ -89,10 +89,10 @@ job.kda$depth)
 unlink("Results", recursive = TRUE)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Zeyneb Kurt
diff --git a/man/kda2cytoscape.identify.Rd b/man/kda2cytoscape.identify.Rd
index 05aa05e..a0fa9ae 100644
--- a/man/kda2cytoscape.identify.Rd
+++ b/man/kda2cytoscape.identify.Rd
@@ -45,10 +45,10 @@ dd <- kda2cytoscape.identify(aa, "NODE", c("GeneA"))
 dd
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Zeyneb Kurt
diff --git a/man/kda2himmeli.Rd b/man/kda2himmeli.Rd
index cae9d65..e3dbde6 100644
--- a/man/kda2himmeli.Rd
+++ b/man/kda2himmeli.Rd
@@ -70,10 +70,10 @@ unlink("Results", recursive = TRUE)
 }
 
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda2himmeli.colorize.Rd b/man/kda2himmeli.colorize.Rd
index c3522bc..6761426 100644
--- a/man/kda2himmeli.colorize.Rd
+++ b/man/kda2himmeli.colorize.Rd
@@ -34,10 +34,10 @@ modules)
 }
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \examples{
 ## Trace module memberships for each KD
diff --git a/man/kda2himmeli.colormap.Rd b/man/kda2himmeli.colormap.Rd
index bef93e8..604437b 100644
--- a/man/kda2himmeli.colormap.Rd
+++ b/man/kda2himmeli.colormap.Rd
@@ -23,10 +23,10 @@ color.number = 5 ## let us assume we have 5 modules, assign 1 color to each:
 palette <- kda2himmeli.colormap(color.number)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda2himmeli.drivers.Rd b/man/kda2himmeli.drivers.Rd
index ae5c402..9cbd154 100644
--- a/man/kda2himmeli.drivers.Rd
+++ b/man/kda2himmeli.drivers.Rd
@@ -63,10 +63,10 @@ drivers <- kda2himmeli.drivers(job.kda$results, modules, ndriv=2)
 unlink("Results", recursive = TRUE)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda2himmeli.edges.Rd b/man/kda2himmeli.edges.Rd
index a4e405d..8f171f9 100644
--- a/man/kda2himmeli.edges.Rd
+++ b/man/kda2himmeli.edges.Rd
@@ -67,10 +67,10 @@ job.kda$depth, job.kda$direction)
 unlink("Results", recursive = TRUE)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda2himmeli.exec.Rd b/man/kda2himmeli.exec.Rd
index 1ba62d4..e03fbf2 100644
--- a/man/kda2himmeli.exec.Rd
+++ b/man/kda2himmeli.exec.Rd
@@ -101,10 +101,10 @@ tmp <- kda2himmeli.exec(job.kda, valdata, drivers[rows,], mods, palette)
 unlink("Results", recursive = TRUE)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/kda2himmeli.identify.Rd b/man/kda2himmeli.identify.Rd
index e234908..96581b4 100644
--- a/man/kda2himmeli.identify.Rd
+++ b/man/kda2himmeli.identify.Rd
@@ -45,10 +45,10 @@ dd <- kda2himmeli.identify(aa, "NODE", c("GeneA"))
 dd
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.analyze.Rd b/man/ssea.analyze.Rd
index ed48676..5a1d0e5 100644
--- a/man/ssea.analyze.Rd
+++ b/man/ssea.analyze.Rd
@@ -17,7 +17,7 @@ MSEA is performed with either gene-level or marker-level permutations
 based on Gaussian distribution. 
 }
 \usage{
-ssea.analyze(job)
+ssea.analyze(job, trim_start, trim_end)
 }
 \arguments{
 \item{job}{
@@ -29,6 +29,16 @@ of permutations \code{(job$nperm)} for the permutation test, and the
 database that uses indexed identities for modules, genes, and markers
 (e.g. loci) \code{(job$database)}.  
 }
+\item{trim_start}{percentile taken from the beginning for 
+trimming away a defined proportion of genes with significant trait 
+association to avoid signal inflation of null background in gene permutation.
+Default value is 0.002.
+}
+\item{trim_end}{percentile taken from the ending point for 
+trimming away a defined proportion of genes with significant trait 
+association to avoid signal inflation of null background in gene permutation.
+Default value is 0.998.
+}
 }
 \details{
 \code{\link{ssea.analyze}} associates the gene sets (pathways or 
@@ -41,6 +51,9 @@ loci) are calculated. Then, a Gaussian distribution based simulation is
 performed, by using the statistics of the observed scores (mean, std.dev.,
 etc.), to obtain the estimated enrichment scores, enrichment frequencies,
 and other statistics e.g. p-values for the pathways.
+\code{ssea.analyze} trims away a defined proportion of genes with 
+significant trait association to avoid signal inflation of null background 
+in gene permutation by using \code{trim_start} and \code{trim_end}.
 }
 \value{
 \item{job }{the updated data frame including results: indexed module 
@@ -71,7 +84,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -98,10 +111,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.analyze.observe.Rd b/man/ssea.analyze.observe.Rd
index 14b7587..ca255e0 100644
--- a/man/ssea.analyze.observe.Rd
+++ b/man/ssea.analyze.observe.Rd
@@ -56,7 +56,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -88,10 +88,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.analyze.randgenes.Rd b/man/ssea.analyze.randgenes.Rd
index 2d9c05a..88e4173 100644
--- a/man/ssea.analyze.randgenes.Rd
+++ b/man/ssea.analyze.randgenes.Rd
@@ -8,7 +8,7 @@ Estimate enrichment from randomized genes
 randomizing the genes from all modules (from database - db)
 }
 \usage{
-ssea.analyze.randgenes(db, targets)
+ssea.analyze.randgenes(db, targets, gene_sel)
 }
 \arguments{
 \item{db}{
@@ -28,7 +28,10 @@ each quantile point for each marker.
 expected: 1.0 - quantile points.
 }
 } 
-\item{targets}{all modules}
+\item{targets}{all modules}
+\item{gene_sel}{selected genes to be trimmed away to avoid signal inflation
+ of null background in gene permutation.
+}
 }
 \value{
 \item{scores }{randomly simulated enrichment scores}
@@ -55,7 +58,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -76,7 +79,37 @@ job.msea <- ssea.prepare(job.msea)
 job.msea <- ssea.control(job.msea)
 
 ## Observed enrichment scores.
-db <- job.msea$database
+db <- job.msea$database
+gene2loci <- db$gene2loci
+locus2row <- db$locus2row
+observed <- db$observed
+#Calcuate individual gene enrichment score
+trim_scores <- rep(NA, length(gene2loci))
+for(k in 1:length(trim_scores)) {
+  genes <- k
+  # Collect markers.
+  loci <- integer()
+  for(i in genes) 
+    loci <- c(loci, gene2loci[[i]])
+        
+  # Determine data rows.
+  loci <- unique(loci)
+  rows <- locus2row[loci]
+  nloci <- length(rows)
+        
+  # Calculate total counts.
+  e <- (nloci/length(locus2row))*colSums(observed)
+  o <- observed[rows,]
+  if(nloci > 1) o <- colSums(o)
+        
+  # Estimate enrichment.
+  trim_scores[k] <- ssea.analyze.statistic(o, e)
+}
+trim_start=0.002 # default
+trim_end=1-trim_start
+cutoff=as.numeric(quantile(trim_scores,probs=c(trim_start,trim_end)))
+gene_sel=which(trim_scores>cutoff[1]&trim_scores<cutoff[2])
+
 scores <- ssea.analyze.observe(db)
 nmods <- length(scores)
 
@@ -97,7 +130,7 @@ for(i in 1:nmods) scoresets[[i]] <- double()
 ## Simulate random scores.
 ## within a for loop: check capacity, find new statistics, update snull  
 ## distribution (simulated null distr.) by permuting genes
-snull <- ssea.analyze.randgenes(db, targets)
+snull <- ssea.analyze.randgenes(db, targets, gene_sel)
 
 ## Remove the temporary files used for the test:
 file.remove("subsetof.coexpr.modules.txt")
@@ -105,10 +138,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.analyze.randloci.Rd b/man/ssea.analyze.randloci.Rd
index 3504d38..77cab69 100644
--- a/man/ssea.analyze.randloci.Rd
+++ b/man/ssea.analyze.randloci.Rd
@@ -56,7 +56,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -106,10 +106,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.analyze.simulate.Rd b/man/ssea.analyze.simulate.Rd
index 87addb9..0957f4e 100644
--- a/man/ssea.analyze.simulate.Rd
+++ b/man/ssea.analyze.simulate.Rd
@@ -9,7 +9,7 @@ randomly permuting database with respect to the specified permutation
 type (either gene-level or marker-level).
 }
 \usage{
-ssea.analyze.simulate(db, observ, nperm, permtype)
+ssea.analyze.simulate(db, observ, nperm, permtype, trim_start, trim_end)
 }
 \arguments{
 \item{db}{
@@ -38,6 +38,16 @@ maximum nubmer of permutations (for simulation)
 \item{permtype}{
 permutation type (either gene or locus)
 }
+\item{trim_start}{percentile taken from the beginning for 
+trimming away a defined proportion of genes with significant trait 
+association to avoid signal inflation of null background in gene permutation.
+Default value is 0.002.
+}
+\item{trim_end}{percentile taken from the ending point for 
+trimming away a defined proportion of genes with significant trait 
+association to avoid signal inflation of null background in gene permutation.
+Default value is 0.998.
+}
 }
 \value{
 \item{scoresets }{simulated score lists for the statistically significant 
@@ -65,7 +75,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -91,8 +101,11 @@ scores <- ssea.analyze.observe(db)
 nmods <- length(scores)
 
 ## Simulated scores.
-nperm <- job.msea$nperm
-nullsets <- ssea.analyze.simulate(db, scores, nperm, job.msea$permtype)
+nperm <- job.msea$nperm
+trim_start=0.002 # default
+trim_end=1-trim_start
+nullsets <- ssea.analyze.simulate(db, scores, nperm, job.msea$permtype,
+trim_start, trim_end)
 
 ## Remove the temporary files used for the test:
 file.remove("subsetof.coexpr.modules.txt")
@@ -100,10 +113,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.analyze.statistic.Rd b/man/ssea.analyze.statistic.Rd
index bc64531..7b5f59f 100644
--- a/man/ssea.analyze.statistic.Rd
+++ b/man/ssea.analyze.statistic.Rd
@@ -32,10 +32,10 @@ e <- rnorm(1)
 z <- ssea.analyze.statistic(o, e)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.control.Rd b/man/ssea.control.Rd
index 69b05b0..561008d 100644
--- a/man/ssea.control.Rd
+++ b/man/ssea.control.Rd
@@ -61,7 +61,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -87,10 +87,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.finish.Rd b/man/ssea.finish.Rd
index 4fcf00c..80bc6b0 100644
--- a/man/ssea.finish.Rd
+++ b/man/ssea.finish.Rd
@@ -69,7 +69,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -97,10 +97,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.finish.details.Rd b/man/ssea.finish.details.Rd
index c997486..b65c423 100644
--- a/man/ssea.finish.details.Rd
+++ b/man/ssea.finish.details.Rd
@@ -52,7 +52,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -89,10 +89,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.finish.fdr.Rd b/man/ssea.finish.fdr.Rd
index 4ada3a6..bf442e0 100644
--- a/man/ssea.finish.fdr.Rd
+++ b/man/ssea.finish.fdr.Rd
@@ -58,7 +58,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -89,10 +89,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.finish.genes.Rd b/man/ssea.finish.genes.Rd
index 1a92742..70e85b3 100644
--- a/man/ssea.finish.genes.Rd
+++ b/man/ssea.finish.genes.Rd
@@ -56,7 +56,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -89,10 +89,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.meta.Rd b/man/ssea.meta.Rd
index 2f03dbb..20d05fc 100644
--- a/man/ssea.meta.Rd
+++ b/man/ssea.meta.Rd
@@ -88,10 +88,10 @@ meta.results <- ssea.meta(job.multiple.msea, job.multiple.msea[[1]]$label,
 job.multiple.msea[[1]]$folder)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.prepare.Rd b/man/ssea.prepare.Rd
index c418a49..63f08bf 100644
--- a/man/ssea.prepare.Rd
+++ b/man/ssea.prepare.Rd
@@ -78,7 +78,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -103,10 +103,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.prepare.counts.Rd b/man/ssea.prepare.counts.Rd
index 7f5df03..17eedba 100644
--- a/man/ssea.prepare.counts.Rd
+++ b/man/ssea.prepare.counts.Rd
@@ -47,7 +47,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -94,10 +94,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.prepare.structure.Rd b/man/ssea.prepare.structure.Rd
index b4e486d..842463e 100644
--- a/man/ssea.prepare.structure.Rd
+++ b/man/ssea.prepare.structure.Rd
@@ -55,7 +55,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -92,10 +92,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.start.Rd b/man/ssea.start.Rd
index 9093f83..9ab41df 100644
--- a/man/ssea.start.Rd
+++ b/man/ssea.start.Rd
@@ -95,10 +95,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.start.configure.Rd b/man/ssea.start.configure.Rd
index 06da67d..f8848b3 100644
--- a/man/ssea.start.configure.Rd
+++ b/man/ssea.start.configure.Rd
@@ -70,7 +70,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -95,10 +95,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.start.identify.Rd b/man/ssea.start.identify.Rd
index f4ff70b..1c14ba7 100644
--- a/man/ssea.start.identify.Rd
+++ b/man/ssea.start.identify.Rd
@@ -38,10 +38,10 @@ dd <- ssea.start.identify(aa, "NODE", c("GeneA"))
 dd
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea.start.relabel.Rd b/man/ssea.start.relabel.Rd
index 57dd51e..65da1d5 100644
--- a/man/ssea.start.relabel.Rd
+++ b/man/ssea.start.relabel.Rd
@@ -44,7 +44,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -101,10 +101,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea2kda.Rd b/man/ssea2kda.Rd
index 95be42b..690852d 100644
--- a/man/ssea2kda.Rd
+++ b/man/ssea2kda.Rd
@@ -120,10 +120,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea2kda.analyze.Rd b/man/ssea2kda.analyze.Rd
index d9ddf10..ed56688 100644
--- a/man/ssea2kda.analyze.Rd
+++ b/man/ssea2kda.analyze.Rd
@@ -52,7 +52,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -120,10 +120,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/ssea2kda.import.Rd b/man/ssea2kda.import.Rd
index 31ef35a..326f3d0 100644
--- a/man/ssea2kda.import.Rd
+++ b/man/ssea2kda.import.Rd
@@ -44,7 +44,7 @@ job.msea$nperm <- 100 ## default value is 20000
 moddata <- tool.read(job.msea$modfile)
 gendata <- tool.read(job.msea$genfile)
 mardata <- tool.read(job.msea$marfile)
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 gendata <- gendata[which(!is.na(match(gendata$GENE, 
@@ -80,10 +80,10 @@ file.remove("subsetof.genfile.txt")
 file.remove("subsetof.marfile.txt")
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/tool.aggregate.Rd b/man/tool.aggregate.Rd
index bff8110..998c247 100644
--- a/man/tool.aggregate.Rd
+++ b/man/tool.aggregate.Rd
@@ -40,10 +40,10 @@ cc <- tool.aggregate(aa$GENE)
 cc
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/tool.cluster.Rd b/man/tool.cluster.Rd
index f555153..73bfa44 100644
--- a/man/tool.cluster.Rd
+++ b/man/tool.cluster.Rd
@@ -37,7 +37,7 @@ moddata <- tool.read(system.file("extdata",
 "modules.mousecoexpr.liver.human.txt", package="Mergeomics"))
 
 ## let us cluster the first 10 modules in the module file:
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 ## Find clusters.
@@ -49,10 +49,10 @@ nnodes <- length(unique(clustdat$NODE))
 }
 
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/tool.cluster.static.Rd b/man/tool.cluster.static.Rd
index 9048f30..5dad05e 100644
--- a/man/tool.cluster.static.Rd
+++ b/man/tool.cluster.static.Rd
@@ -31,10 +31,10 @@ hlim <- max(tree$height)
 clusters <- tool.cluster.static(tree, hlim)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/tool.coalesce.Rd b/man/tool.coalesce.Rd
index 554cc55..5e77a11 100644
--- a/man/tool.coalesce.Rd
+++ b/man/tool.coalesce.Rd
@@ -38,7 +38,7 @@ moddata <- tool.read(system.file("extdata",
 
 ## let us find the overlapping ratio between first 10 modules in the file:
 ## to merge overlapping modules first collect member genes:
-mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
+mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
 10)]
 moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]
 
@@ -54,10 +54,10 @@ moddata <- moddata[,c("MODULE", "GENE", "OVERLAP")]
 moddata <- unique(moddata)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/tool.coalesce.exec.Rd b/man/tool.coalesce.exec.Rd
index bf82e2e..b7314b1 100644
--- a/man/tool.coalesce.exec.Rd
+++ b/man/tool.coalesce.exec.Rd
@@ -44,10 +44,10 @@ ncore <- length(members)
 res <- tool.coalesce.exec(members, modules, rcutoff, ncore)
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/tool.coalesce.find.Rd b/man/tool.coalesce.find.Rd
index d355c17..ee8c43e 100644
--- a/man/tool.coalesce.find.Rd
+++ b/man/tool.coalesce.find.Rd
@@ -47,10 +47,10 @@ res <- tool.coalesce.merge(clust, ncore)
 }
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/man/tool.coalesce.merge.Rd b/man/tool.coalesce.merge.Rd
index 89bfc34..6b18716 100644
--- a/man/tool.coalesce.merge.Rd
+++ b/man/tool.coalesce.merge.Rd
@@ -52,10 +52,10 @@ res <- tool.coalesce.merge(clust, ncore)
 }
 }
 \references{
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 }
 \author{
 Ville-Petteri Makinen 
diff --git a/vignettes/Mergeomics.Rnw b/vignettes/Mergeomics.Rnw
index 294180d..3426f00 100644
--- a/vignettes/Mergeomics.Rnw
+++ b/vignettes/Mergeomics.Rnw
@@ -44,10 +44,10 @@ xyang123 at ucla.edu
 
 If you use mergeomics in published research, please cite:
 
-Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B,
-Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics 
-resources to identify pathogenic perturbations to biological systems.
-bioRxiv doi: http://dx.doi.org/10.1101/036012
+Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, 
+Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X.
+Mergeomics: multidimensional data integration to identify pathogenic 
+perturbations to biological systems. BMC genomics. 2016;17(1):874.
 
 
 \tableofcontents

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-bioc-mergeomics.git



More information about the debian-med-commit mailing list