Back to Multiple platform build/check report for BioC 3.13
ABCDEFGHIJKLMNOPQ[R]STUVWXYZ

This page was generated on 2021-10-15 15:06:20 -0400 (Fri, 15 Oct 2021).

CHECK results for RUVSeq on tokay2

To the developers/maintainers of the RUVSeq package:
- Please allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/RUVSeq.git to
reflect on this report. See How and When does the builder pull? When will my changes propagate? here for more information.
- Make sure to use the following settings in order to reproduce any error or warning you see on this page.

raw results

Package 1657/2041HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
RUVSeq 1.26.0  (landing page)
Davide Risso
Snapshot Date: 2021-10-14 04:50:12 -0400 (Thu, 14 Oct 2021)
git_url: https://git.bioconductor.org/packages/RUVSeq
git_branch: RELEASE_3_13
git_last_commit: b6d90ae
git_last_commit_date: 2021-05-19 12:05:29 -0400 (Wed, 19 May 2021)
nebbiolo1Linux (Ubuntu 20.04.2 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
tokay2Windows Server 2012 R2 Standard / x64  OK    OK    OK    OK  UNNEEDED, same version is already published
machv2macOS 10.14.6 Mojave / x86_64  OK    OK    OK    OK  UNNEEDED, same version is already published

Summary

Package: RUVSeq
Version: 1.26.0
Command: C:\Users\biocbuild\bbs-3.13-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:RUVSeq.install-out.txt --library=C:\Users\biocbuild\bbs-3.13-bioc\R\library --no-vignettes --timings RUVSeq_1.26.0.tar.gz
StartedAt: 2021-10-15 04:59:43 -0400 (Fri, 15 Oct 2021)
EndedAt: 2021-10-15 05:06:20 -0400 (Fri, 15 Oct 2021)
EllapsedTime: 396.5 seconds
RetCode: 0
Status:   OK  
CheckDir: RUVSeq.Rcheck
Warnings: 0

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   C:\Users\biocbuild\bbs-3.13-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:RUVSeq.install-out.txt --library=C:\Users\biocbuild\bbs-3.13-bioc\R\library --no-vignettes --timings RUVSeq_1.26.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory 'C:/Users/biocbuild/bbs-3.13-bioc/meat/RUVSeq.Rcheck'
* using R version 4.1.1 (2021-08-10)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* using option '--no-vignettes'
* checking for file 'RUVSeq/DESCRIPTION' ... OK
* this is package 'RUVSeq' version '1.26.0'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'RUVSeq' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking 'build' directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* loading checks for arch 'i386'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
* loading checks for arch 'x64'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
residuals.DGEGLM : <anonymous>: no visible global function definition
  for 'poisson'
Undefined global functions or variables:
  poisson
Consider adding
  importFrom("stats", "poisson")
to your NAMESPACE file.
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking files in 'vignettes' ... OK
* checking examples ...
** running examples for arch 'i386' ... OK
** running examples for arch 'x64' ... OK
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
** running tests for arch 'i386' ...
  Running 'RUVg.R'
  Running 'RUVr.R'
  Running 'RUVs.R'
 OK
** running tests for arch 'x64' ...
  Running 'RUVg.R'
  Running 'RUVr.R'
  Running 'RUVs.R'
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in 'inst/doc' ... OK
* checking running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE

Status: 1 NOTE
See
  'C:/Users/biocbuild/bbs-3.13-bioc/meat/RUVSeq.Rcheck/00check.log'
for details.



Installation output

RUVSeq.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   C:\cygwin\bin\curl.exe -O http://155.52.207.165/BBS/3.13/bioc/src/contrib/RUVSeq_1.26.0.tar.gz && rm -rf RUVSeq.buildbin-libdir && mkdir RUVSeq.buildbin-libdir && C:\Users\biocbuild\bbs-3.13-bioc\R\bin\R.exe CMD INSTALL --merge-multiarch --build --library=RUVSeq.buildbin-libdir RUVSeq_1.26.0.tar.gz && C:\Users\biocbuild\bbs-3.13-bioc\R\bin\R.exe CMD INSTALL RUVSeq_1.26.0.zip && rm RUVSeq_1.26.0.tar.gz RUVSeq_1.26.0.zip
###
##############################################################################
##############################################################################


  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 15838  100 15838    0     0   132k      0 --:--:-- --:--:-- --:--:--  134k

install for i386

* installing *source* package 'RUVSeq' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'RUVSeq'
    finding HTML links ... done
    RUVSeq-package                          html  
    RUVg                                    html  
    finding level-2 HTML links ... done

    RUVr                                    html  
    RUVs                                    html  
    makeGroups                              html  
    residuals.DGEGLM                        html  
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path

install for x64

* installing *source* package 'RUVSeq' ...
** testing if installed package can be loaded
* MD5 sums
packaged installation of 'RUVSeq' as RUVSeq_1.26.0.zip
* DONE (RUVSeq)
* installing to library 'C:/Users/biocbuild/bbs-3.13-bioc/R/library'
package 'RUVSeq' successfully unpacked and MD5 sums checked

Tests output

RUVSeq.Rcheck/tests_i386/RUVg.Rout


R version 4.1.1 (2021-08-10) -- "Kick Things"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RUVSeq)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: EDASeq
Loading required package: ShortRead
Loading required package: BiocParallel
Loading required package: Biostrings
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    I, expand.grid, unname

Loading required package: IRanges

Attaching package: 'IRanges'

The following object is masked from 'package:grDevices':

    windows

Loading required package: XVector
Loading required package: GenomeInfoDb

Attaching package: 'Biostrings'

The following object is masked from 'package:base':

    strsplit

Loading required package: Rsamtools
Loading required package: GenomicRanges
Loading required package: GenomicAlignments
Loading required package: SummarizedExperiment
Loading required package: MatrixGenerics
Loading required package: matrixStats

Attaching package: 'matrixStats'

The following objects are masked from 'package:Biobase':

    anyMissing, rowMedians


Attaching package: 'MatrixGenerics'

The following objects are masked from 'package:matrixStats':

    colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
    colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
    colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
    colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
    colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
    colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
    colWeightedMeans, colWeightedMedians, colWeightedSds,
    colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
    rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
    rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
    rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
    rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
    rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
    rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
    rowWeightedSds, rowWeightedVars

The following object is masked from 'package:Biobase':

    rowMedians

Loading required package: edgeR
Loading required package: limma

Attaching package: 'limma'

The following object is masked from 'package:BiocGenerics':

    plotMA

> 
> mat <- matrix(data=rpois(100, lambda=10), ncol=10)
> rownames(mat) <- paste("gene", 1:10, sep="")
> 
> es <- newSeqExpressionSet(mat)
> 
> ## dimension of W
> ks <- 1:5
> 
> ## matrix
> r1 <- lapply(ks, function(k) RUVg(mat, 1:10, k))
> 
> print(sapply(r1, function(x) dim(x$W)))
     [,1] [,2] [,3] [,4] [,5]
[1,]   10   10   10   10   10
[2,]    1    2    3    4    5
> stopifnot(all(lapply(r1, function(x) dim(x$W)[2])==ks))
> 
> ## already logged data
> r1b <- lapply(ks, function(k) RUVg(log(mat+1), 1:10, k))
Warning messages:
1: In RUVg(log(mat + 1), 1:10, k) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
2: In RUVg(log(mat + 1), 1:10, k) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
3: In RUVg(log(mat + 1), 1:10, k) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
4: In RUVg(log(mat + 1), 1:10, k) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
5: In RUVg(log(mat + 1), 1:10, k) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
> r1c <- lapply(ks, function(k) RUVg(log(mat+1), 1:10, k, isLog=TRUE))
> r1d <- lapply(ks, function(k) RUVg(mat, 1:10, k, round=FALSE))
> 
> stopifnot(all(sapply(ks, function(i) all(r1[[i]]$W==r1c[[i]]$W))))
> stopifnot(all(sapply(ks, function(i) all(r1d[[i]]$W==r1c[[i]]$W))))
> 
> stopifnot(all(sapply(ks, function(i) all(log(r1d[[i]]$normalizedCounts+1)-r1c[[i]]$normalizedCounts<1e-8))))
> 
> ## SeqExpressionSet
> r2 <- lapply(ks, function(k) RUVg(es, rownames(es)[1:10], k))
> 
> print(sapply(r2, function(x) dim(pData(x))))
     [,1] [,2] [,3] [,4] [,5]
[1,]   10   10   10   10   10
[2,]    1    2    3    4    5
> stopifnot(all(lapply(r2, function(x) dim(pData(x))[2])==ks))
> 
> ## check handling of zeros
> mat <- matrix(data=rpois(100, lambda=2), ncol=10)
> rownames(mat) <- paste("gene", 1:10, sep="")
> r3 <- RUVg(mat, 1:10, k=1)
> print(table(mat==0))

FALSE  TRUE 
   89    11 
> print(table(r3$normalizedCounts==0))

FALSE  TRUE 
   93     7 
> 
> proc.time()
   user  system elapsed 
  10.81    1.15   11.93 

RUVSeq.Rcheck/tests_x64/RUVg.Rout


R version 4.1.1 (2021-08-10) -- "Kick Things"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RUVSeq)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: EDASeq
Loading required package: ShortRead
Loading required package: BiocParallel
Loading required package: Biostrings
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    I, expand.grid, unname

Loading required package: IRanges

Attaching package: 'IRanges'

The following object is masked from 'package:grDevices':

    windows

Loading required package: XVector
Loading required package: GenomeInfoDb

Attaching package: 'Biostrings'

The following object is masked from 'package:base':

    strsplit

Loading required package: Rsamtools
Loading required package: GenomicRanges
Loading required package: GenomicAlignments
Loading required package: SummarizedExperiment
Loading required package: MatrixGenerics
Loading required package: matrixStats

Attaching package: 'matrixStats'

The following objects are masked from 'package:Biobase':

    anyMissing, rowMedians


Attaching package: 'MatrixGenerics'

The following objects are masked from 'package:matrixStats':

    colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
    colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
    colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
    colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
    colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
    colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
    colWeightedMeans, colWeightedMedians, colWeightedSds,
    colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
    rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
    rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
    rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
    rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
    rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
    rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
    rowWeightedSds, rowWeightedVars

The following object is masked from 'package:Biobase':

    rowMedians

Loading required package: edgeR
Loading required package: limma

Attaching package: 'limma'

The following object is masked from 'package:BiocGenerics':

    plotMA

> 
> mat <- matrix(data=rpois(100, lambda=10), ncol=10)
> rownames(mat) <- paste("gene", 1:10, sep="")
> 
> es <- newSeqExpressionSet(mat)
> 
> ## dimension of W
> ks <- 1:5
> 
> ## matrix
> r1 <- lapply(ks, function(k) RUVg(mat, 1:10, k))
> 
> print(sapply(r1, function(x) dim(x$W)))
     [,1] [,2] [,3] [,4] [,5]
[1,]   10   10   10   10   10
[2,]    1    2    3    4    5
> stopifnot(all(lapply(r1, function(x) dim(x$W)[2])==ks))
> 
> ## already logged data
> r1b <- lapply(ks, function(k) RUVg(log(mat+1), 1:10, k))
Warning messages:
1: In RUVg(log(mat + 1), 1:10, k) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
2: In RUVg(log(mat + 1), 1:10, k) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
3: In RUVg(log(mat + 1), 1:10, k) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
4: In RUVg(log(mat + 1), 1:10, k) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
5: In RUVg(log(mat + 1), 1:10, k) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
> r1c <- lapply(ks, function(k) RUVg(log(mat+1), 1:10, k, isLog=TRUE))
> r1d <- lapply(ks, function(k) RUVg(mat, 1:10, k, round=FALSE))
> 
> stopifnot(all(sapply(ks, function(i) all(r1[[i]]$W==r1c[[i]]$W))))
> stopifnot(all(sapply(ks, function(i) all(r1d[[i]]$W==r1c[[i]]$W))))
> 
> stopifnot(all(sapply(ks, function(i) all(log(r1d[[i]]$normalizedCounts+1)-r1c[[i]]$normalizedCounts<1e-8))))
> 
> ## SeqExpressionSet
> r2 <- lapply(ks, function(k) RUVg(es, rownames(es)[1:10], k))
> 
> print(sapply(r2, function(x) dim(pData(x))))
     [,1] [,2] [,3] [,4] [,5]
[1,]   10   10   10   10   10
[2,]    1    2    3    4    5
> stopifnot(all(lapply(r2, function(x) dim(pData(x))[2])==ks))
> 
> ## check handling of zeros
> mat <- matrix(data=rpois(100, lambda=2), ncol=10)
> rownames(mat) <- paste("gene", 1:10, sep="")
> r3 <- RUVg(mat, 1:10, k=1)
> print(table(mat==0))

FALSE  TRUE 
   90    10 
> print(table(r3$normalizedCounts==0))

FALSE  TRUE 
   92     8 
> 
> proc.time()
   user  system elapsed 
  12.73    0.43   13.15 

RUVSeq.Rcheck/tests_i386/RUVr.Rout


R version 4.1.1 (2021-08-10) -- "Kick Things"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RUVSeq)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: EDASeq
Loading required package: ShortRead
Loading required package: BiocParallel
Loading required package: Biostrings
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    I, expand.grid, unname

Loading required package: IRanges

Attaching package: 'IRanges'

The following object is masked from 'package:grDevices':

    windows

Loading required package: XVector
Loading required package: GenomeInfoDb

Attaching package: 'Biostrings'

The following object is masked from 'package:base':

    strsplit

Loading required package: Rsamtools
Loading required package: GenomicRanges
Loading required package: GenomicAlignments
Loading required package: SummarizedExperiment
Loading required package: MatrixGenerics
Loading required package: matrixStats

Attaching package: 'matrixStats'

The following objects are masked from 'package:Biobase':

    anyMissing, rowMedians


Attaching package: 'MatrixGenerics'

The following objects are masked from 'package:matrixStats':

    colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
    colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
    colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
    colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
    colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
    colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
    colWeightedMeans, colWeightedMedians, colWeightedSds,
    colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
    rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
    rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
    rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
    rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
    rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
    rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
    rowWeightedSds, rowWeightedVars

The following object is masked from 'package:Biobase':

    rowMedians

Loading required package: edgeR
Loading required package: limma

Attaching package: 'limma'

The following object is masked from 'package:BiocGenerics':

    plotMA

> library(edgeR)
> 
> mat <- matrix(data=rpois(100, lambda=10), ncol=10)
> rownames(mat) <- paste("gene", 1:10, sep="")
> 
> es <- newSeqExpressionSet(mat)
> 
> ## compute edgeR residuals
> x <- as.factor(rep(c("Ctl", "Trt"), each=5))
> design <- model.matrix(~x)
> y <- DGEList(counts=mat, group=x)
> y <- calcNormFactors(y, method="upperquartile")
> y <- estimateGLMCommonDisp(y, design)
> y <- estimateGLMTagwiseDisp(y, design)
> 
> fit <- glmFit(y, design)
> res <- residuals(fit, type="deviance")
> 
> ## dimension of W
> ks <- 1:5
> 
> ## matrix
> r1 <- lapply(ks, function(k) RUVr(mat, 1:10, k, res))
> 
> print(sapply(r1, function(x) dim(x$W)))
     [,1] [,2] [,3] [,4] [,5]
[1,]   10   10   10   10   10
[2,]    1    2    3    4    5
> stopifnot(all(lapply(r1, function(x) dim(x$W)[2])==ks))
> 
> ## already logged data
> r1b <- lapply(ks, function(k) RUVr(log(mat+1), 1:10, k, res))
Warning messages:
1: In RUVr(log(mat + 1), 1:10, k, res) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
2: In RUVr(log(mat + 1), 1:10, k, res) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
3: In RUVr(log(mat + 1), 1:10, k, res) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
4: In RUVr(log(mat + 1), 1:10, k, res) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
5: In RUVr(log(mat + 1), 1:10, k, res) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
> r1c <- lapply(ks, function(k) RUVr(log(mat+1), 1:10, k, res, isLog=TRUE))
> r1d <- lapply(ks, function(k) RUVr(mat, 1:10, k, res, round=FALSE))
> 
> stopifnot(all(sapply(ks, function(i) all(r1[[i]]$W==r1c[[i]]$W))))
> stopifnot(all(sapply(ks, function(i) all(r1d[[i]]$W==r1c[[i]]$W))))
> 
> stopifnot(all(sapply(ks, function(i) all(log(r1d[[i]]$normalizedCounts+1)-r1c[[i]]$normalizedCounts<1e-8))))
> 
> ## SeqExpressionSet
> r2 <- lapply(ks, function(k) RUVr(es, rownames(es)[1:10], k, res))
> 
> print(sapply(r2, function(x) dim(pData(x))))
     [,1] [,2] [,3] [,4] [,5]
[1,]   10   10   10   10   10
[2,]    1    2    3    4    5
> stopifnot(all(lapply(r2, function(x) dim(pData(x))[2])==ks))
> 
> ## check handling of zeros
> mat <- matrix(data=rpois(100, lambda=2), ncol=10)
> rownames(mat) <- paste("gene", 1:10, sep="")
> r3 <- RUVr(mat, 1:10, k=1, res)
> print(table(mat==0))

FALSE  TRUE 
   86    14 
> print(table(r3$normalizedCounts==0))

FALSE  TRUE 
   86    14 
> 
> proc.time()
   user  system elapsed 
  11.23    1.09   12.29 

RUVSeq.Rcheck/tests_x64/RUVr.Rout


R version 4.1.1 (2021-08-10) -- "Kick Things"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RUVSeq)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: EDASeq
Loading required package: ShortRead
Loading required package: BiocParallel
Loading required package: Biostrings
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    I, expand.grid, unname

Loading required package: IRanges

Attaching package: 'IRanges'

The following object is masked from 'package:grDevices':

    windows

Loading required package: XVector
Loading required package: GenomeInfoDb

Attaching package: 'Biostrings'

The following object is masked from 'package:base':

    strsplit

Loading required package: Rsamtools
Loading required package: GenomicRanges
Loading required package: GenomicAlignments
Loading required package: SummarizedExperiment
Loading required package: MatrixGenerics
Loading required package: matrixStats

Attaching package: 'matrixStats'

The following objects are masked from 'package:Biobase':

    anyMissing, rowMedians


Attaching package: 'MatrixGenerics'

The following objects are masked from 'package:matrixStats':

    colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
    colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
    colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
    colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
    colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
    colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
    colWeightedMeans, colWeightedMedians, colWeightedSds,
    colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
    rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
    rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
    rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
    rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
    rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
    rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
    rowWeightedSds, rowWeightedVars

The following object is masked from 'package:Biobase':

    rowMedians

Loading required package: edgeR
Loading required package: limma

Attaching package: 'limma'

The following object is masked from 'package:BiocGenerics':

    plotMA

> library(edgeR)
> 
> mat <- matrix(data=rpois(100, lambda=10), ncol=10)
> rownames(mat) <- paste("gene", 1:10, sep="")
> 
> es <- newSeqExpressionSet(mat)
> 
> ## compute edgeR residuals
> x <- as.factor(rep(c("Ctl", "Trt"), each=5))
> design <- model.matrix(~x)
> y <- DGEList(counts=mat, group=x)
> y <- calcNormFactors(y, method="upperquartile")
> y <- estimateGLMCommonDisp(y, design)
> y <- estimateGLMTagwiseDisp(y, design)
> 
> fit <- glmFit(y, design)
> res <- residuals(fit, type="deviance")
> 
> ## dimension of W
> ks <- 1:5
> 
> ## matrix
> r1 <- lapply(ks, function(k) RUVr(mat, 1:10, k, res))
> 
> print(sapply(r1, function(x) dim(x$W)))
     [,1] [,2] [,3] [,4] [,5]
[1,]   10   10   10   10   10
[2,]    1    2    3    4    5
> stopifnot(all(lapply(r1, function(x) dim(x$W)[2])==ks))
> 
> ## already logged data
> r1b <- lapply(ks, function(k) RUVr(log(mat+1), 1:10, k, res))
Warning messages:
1: In RUVr(log(mat + 1), 1:10, k, res) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
2: In RUVr(log(mat + 1), 1:10, k, res) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
3: In RUVr(log(mat + 1), 1:10, k, res) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
4: In RUVr(log(mat + 1), 1:10, k, res) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
5: In RUVr(log(mat + 1), 1:10, k, res) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
> r1c <- lapply(ks, function(k) RUVr(log(mat+1), 1:10, k, res, isLog=TRUE))
> r1d <- lapply(ks, function(k) RUVr(mat, 1:10, k, res, round=FALSE))
> 
> stopifnot(all(sapply(ks, function(i) all(r1[[i]]$W==r1c[[i]]$W))))
> stopifnot(all(sapply(ks, function(i) all(r1d[[i]]$W==r1c[[i]]$W))))
> 
> stopifnot(all(sapply(ks, function(i) all(log(r1d[[i]]$normalizedCounts+1)-r1c[[i]]$normalizedCounts<1e-8))))
> 
> ## SeqExpressionSet
> r2 <- lapply(ks, function(k) RUVr(es, rownames(es)[1:10], k, res))
> 
> print(sapply(r2, function(x) dim(pData(x))))
     [,1] [,2] [,3] [,4] [,5]
[1,]   10   10   10   10   10
[2,]    1    2    3    4    5
> stopifnot(all(lapply(r2, function(x) dim(pData(x))[2])==ks))
> 
> ## check handling of zeros
> mat <- matrix(data=rpois(100, lambda=2), ncol=10)
> rownames(mat) <- paste("gene", 1:10, sep="")
> r3 <- RUVr(mat, 1:10, k=1, res)
> print(table(mat==0))

FALSE  TRUE 
   87    13 
> print(table(r3$normalizedCounts==0))

FALSE  TRUE 
   88    12 
> 
> proc.time()
   user  system elapsed 
  12.90    0.64   13.53 

RUVSeq.Rcheck/tests_i386/RUVs.Rout


R version 4.1.1 (2021-08-10) -- "Kick Things"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RUVSeq)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: EDASeq
Loading required package: ShortRead
Loading required package: BiocParallel
Loading required package: Biostrings
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    I, expand.grid, unname

Loading required package: IRanges

Attaching package: 'IRanges'

The following object is masked from 'package:grDevices':

    windows

Loading required package: XVector
Loading required package: GenomeInfoDb

Attaching package: 'Biostrings'

The following object is masked from 'package:base':

    strsplit

Loading required package: Rsamtools
Loading required package: GenomicRanges
Loading required package: GenomicAlignments
Loading required package: SummarizedExperiment
Loading required package: MatrixGenerics
Loading required package: matrixStats

Attaching package: 'matrixStats'

The following objects are masked from 'package:Biobase':

    anyMissing, rowMedians


Attaching package: 'MatrixGenerics'

The following objects are masked from 'package:matrixStats':

    colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
    colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
    colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
    colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
    colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
    colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
    colWeightedMeans, colWeightedMedians, colWeightedSds,
    colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
    rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
    rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
    rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
    rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
    rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
    rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
    rowWeightedSds, rowWeightedVars

The following object is masked from 'package:Biobase':

    rowMedians

Loading required package: edgeR
Loading required package: limma

Attaching package: 'limma'

The following object is masked from 'package:BiocGenerics':

    plotMA

> 
> mat <- matrix(data=rpois(100, lambda=10), ncol=10)
> rownames(mat) <- paste("gene", 1:10, sep="")
> 
> differences <- matrix(data=c(1:3, 4:6), byrow=TRUE, nrow=2)
> 
> es <- newSeqExpressionSet(mat)
> 
> ## dimension of W
> ks <- 1:4
> 
> ## matrix
> r1 <- lapply(ks, function(k) RUVs(mat, 1:10, k, differences))
> 
> print(sapply(r1, function(x) dim(x$W)))
     [,1] [,2] [,3] [,4]
[1,]   10   10   10   10
[2,]    1    2    3    4
> stopifnot(all(lapply(r1, function(x) dim(x$W)[2])==ks))
> 
> ## already logged data
> r1b <- lapply(ks, function(k) RUVs(log(mat+1), 1:10, k, differences))
Warning messages:
1: In RUVs(log(mat + 1), 1:10, k, differences) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
2: In RUVs(log(mat + 1), 1:10, k, differences) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
3: In RUVs(log(mat + 1), 1:10, k, differences) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
4: In RUVs(log(mat + 1), 1:10, k, differences) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
> r1c <- lapply(ks, function(k) RUVs(log(mat+1), 1:10, k, differences, isLog=TRUE))
> r1d <- lapply(ks, function(k) RUVs(mat, 1:10, k, differences, round=FALSE))
> 
> stopifnot(all(sapply(ks, function(i) all(r1[[i]]$W==r1c[[i]]$W))))
> stopifnot(all(sapply(ks, function(i) all(r1d[[i]]$W==r1c[[i]]$W))))
> 
> stopifnot(all(sapply(ks, function(i) all(log(r1d[[i]]$normalizedCounts+1)-r1c[[i]]$normalizedCounts<1e-8))))
> 
> ## SeqExpressionSet
> r2 <- lapply(ks, function(k) RUVs(es, rownames(es)[1:10], k, differences))
> 
> print(sapply(r2, function(x) dim(pData(x))))
     [,1] [,2] [,3] [,4]
[1,]   10   10   10   10
[2,]    1    2    3    4
> stopifnot(all(lapply(r2, function(x) dim(pData(x))[2])==ks))
> 
> ## check handling of zeros
> mat <- matrix(data=rpois(100, lambda=2), ncol=10)
> rownames(mat) <- paste("gene", 1:10, sep="")
> r3 <- RUVs(mat, 1:10, k=1, differences)
> print(table(mat==0))

FALSE  TRUE 
   85    15 
> print(table(r3$normalizedCounts==0))

FALSE  TRUE 
   55    45 
> 
> ## make groups
> factor1 <- rep(c("a", "b", "c"), each=3)
> factor2 <- c(rep("a", 4), rep("b", 2), rep("c", 3))
> factor3 <- rep(1:6, each=2)
> 
> makeGroups(factor1)
     [,1] [,2] [,3]
[1,]    1    2    3
[2,]    4    5    6
[3,]    7    8    9
> makeGroups(as.factor(factor1))
     [,1] [,2] [,3]
[1,]    1    2    3
[2,]    4    5    6
[3,]    7    8    9
> makeGroups(factor2)
     [,1] [,2] [,3] [,4]
[1,]    1    2    3    4
[2,]    5    6   -1   -1
[3,]    7    8    9   -1
> makeGroups(as.factor(factor2))
     [,1] [,2] [,3] [,4]
[1,]    1    2    3    4
[2,]    5    6   -1   -1
[3,]    7    8    9   -1
> makeGroups(factor3)
     [,1] [,2]
[1,]    1    2
[2,]    3    4
[3,]    5    6
[4,]    7    8
[5,]    9   10
[6,]   11   12
> makeGroups(as.factor(factor3))
     [,1] [,2]
[1,]    1    2
[2,]    3    4
[3,]    5    6
[4,]    7    8
[5,]    9   10
[6,]   11   12
> 
> 
> 
> proc.time()
   user  system elapsed 
  11.01    1.20   12.20 

RUVSeq.Rcheck/tests_x64/RUVs.Rout


R version 4.1.1 (2021-08-10) -- "Kick Things"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RUVSeq)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: EDASeq
Loading required package: ShortRead
Loading required package: BiocParallel
Loading required package: Biostrings
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    I, expand.grid, unname

Loading required package: IRanges

Attaching package: 'IRanges'

The following object is masked from 'package:grDevices':

    windows

Loading required package: XVector
Loading required package: GenomeInfoDb

Attaching package: 'Biostrings'

The following object is masked from 'package:base':

    strsplit

Loading required package: Rsamtools
Loading required package: GenomicRanges
Loading required package: GenomicAlignments
Loading required package: SummarizedExperiment
Loading required package: MatrixGenerics
Loading required package: matrixStats

Attaching package: 'matrixStats'

The following objects are masked from 'package:Biobase':

    anyMissing, rowMedians


Attaching package: 'MatrixGenerics'

The following objects are masked from 'package:matrixStats':

    colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
    colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
    colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
    colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
    colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
    colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
    colWeightedMeans, colWeightedMedians, colWeightedSds,
    colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
    rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
    rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
    rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
    rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
    rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
    rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
    rowWeightedSds, rowWeightedVars

The following object is masked from 'package:Biobase':

    rowMedians

Loading required package: edgeR
Loading required package: limma

Attaching package: 'limma'

The following object is masked from 'package:BiocGenerics':

    plotMA

> 
> mat <- matrix(data=rpois(100, lambda=10), ncol=10)
> rownames(mat) <- paste("gene", 1:10, sep="")
> 
> differences <- matrix(data=c(1:3, 4:6), byrow=TRUE, nrow=2)
> 
> es <- newSeqExpressionSet(mat)
> 
> ## dimension of W
> ks <- 1:4
> 
> ## matrix
> r1 <- lapply(ks, function(k) RUVs(mat, 1:10, k, differences))
> 
> print(sapply(r1, function(x) dim(x$W)))
     [,1] [,2] [,3] [,4]
[1,]   10   10   10   10
[2,]    1    2    3    4
> stopifnot(all(lapply(r1, function(x) dim(x$W)[2])==ks))
> 
> ## already logged data
> r1b <- lapply(ks, function(k) RUVs(log(mat+1), 1:10, k, differences))
Warning messages:
1: In RUVs(log(mat + 1), 1:10, k, differences) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
2: In RUVs(log(mat + 1), 1:10, k, differences) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
3: In RUVs(log(mat + 1), 1:10, k, differences) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
4: In RUVs(log(mat + 1), 1:10, k, differences) :
  The expression matrix does not contain counts.
Please, pass a matrix of counts (not logged) or set isLog to TRUE to skip the log transformation
> r1c <- lapply(ks, function(k) RUVs(log(mat+1), 1:10, k, differences, isLog=TRUE))
> r1d <- lapply(ks, function(k) RUVs(mat, 1:10, k, differences, round=FALSE))
> 
> stopifnot(all(sapply(ks, function(i) all(r1[[i]]$W==r1c[[i]]$W))))
> stopifnot(all(sapply(ks, function(i) all(r1d[[i]]$W==r1c[[i]]$W))))
> 
> stopifnot(all(sapply(ks, function(i) all(log(r1d[[i]]$normalizedCounts+1)-r1c[[i]]$normalizedCounts<1e-8))))
> 
> ## SeqExpressionSet
> r2 <- lapply(ks, function(k) RUVs(es, rownames(es)[1:10], k, differences))
> 
> print(sapply(r2, function(x) dim(pData(x))))
     [,1] [,2] [,3] [,4]
[1,]   10   10   10   10
[2,]    1    2    3    4
> stopifnot(all(lapply(r2, function(x) dim(pData(x))[2])==ks))
> 
> ## check handling of zeros
> mat <- matrix(data=rpois(100, lambda=2), ncol=10)
> rownames(mat) <- paste("gene", 1:10, sep="")
> r3 <- RUVs(mat, 1:10, k=1, differences)
> print(table(mat==0))

FALSE  TRUE 
   88    12 
> print(table(r3$normalizedCounts==0))

FALSE  TRUE 
   77    23 
> 
> ## make groups
> factor1 <- rep(c("a", "b", "c"), each=3)
> factor2 <- c(rep("a", 4), rep("b", 2), rep("c", 3))
> factor3 <- rep(1:6, each=2)
> 
> makeGroups(factor1)
     [,1] [,2] [,3]
[1,]    1    2    3
[2,]    4    5    6
[3,]    7    8    9
> makeGroups(as.factor(factor1))
     [,1] [,2] [,3]
[1,]    1    2    3
[2,]    4    5    6
[3,]    7    8    9
> makeGroups(factor2)
     [,1] [,2] [,3] [,4]
[1,]    1    2    3    4
[2,]    5    6   -1   -1
[3,]    7    8    9   -1
> makeGroups(as.factor(factor2))
     [,1] [,2] [,3] [,4]
[1,]    1    2    3    4
[2,]    5    6   -1   -1
[3,]    7    8    9   -1
> makeGroups(factor3)
     [,1] [,2]
[1,]    1    2
[2,]    3    4
[3,]    5    6
[4,]    7    8
[5,]    9   10
[6,]   11   12
> makeGroups(as.factor(factor3))
     [,1] [,2]
[1,]    1    2
[2,]    3    4
[3,]    5    6
[4,]    7    8
[5,]    9   10
[6,]   11   12
> 
> 
> 
> proc.time()
   user  system elapsed 
  13.03    0.62   13.64 

Example timings

RUVSeq.Rcheck/examples_i386/RUVSeq-Ex.timings

nameusersystemelapsed
RUVg0.720.060.83
RUVr1.600.051.64
RUVs0.200.020.22
makeGroups000
residuals.DGEGLM0.790.271.05

RUVSeq.Rcheck/examples_x64/RUVSeq-Ex.timings

nameusersystemelapsed
RUVg0.420.030.45
RUVr0.860.020.87
RUVs0.250.010.26
makeGroups000
residuals.DGEGLM0.840.020.86