Back to Multiple platform build/check report for BioC 3.7
AB[C]DEFGHIJKLMNOPQRSTUVWXYZ

CHECK report for csaw on tokay2

This page was generated on 2018-10-17 08:39:29 -0400 (Wed, 17 Oct 2018).

Package 327/1561HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
csaw 1.14.1
Aaron Lun
Snapshot Date: 2018-10-15 16:45:08 -0400 (Mon, 15 Oct 2018)
URL: https://git.bioconductor.org/packages/csaw
Branch: RELEASE_3_7
Last Commit: 6ea86c7
Last Changed Date: 2018-05-31 19:24:04 -0400 (Thu, 31 May 2018)
malbec2 Linux (Ubuntu 16.04.1 LTS) / x86_64  OK  OK  OK UNNEEDED, same version exists in internal repository
tokay2 Windows Server 2012 R2 Standard / x64  OK  OK [ OK ] OK UNNEEDED, same version exists in internal repository
merida2 OS X 10.11.6 El Capitan / x86_64  OK  OK  OK  OK UNNEEDED, same version exists in internal repository

Summary

Package: csaw
Version: 1.14.1
Command: C:\Users\biocbuild\bbs-3.7-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:csaw.install-out.txt --library=C:\Users\biocbuild\bbs-3.7-bioc\R\library --no-vignettes --timings csaw_1.14.1.tar.gz
StartedAt: 2018-10-17 01:23:56 -0400 (Wed, 17 Oct 2018)
EndedAt: 2018-10-17 01:30:21 -0400 (Wed, 17 Oct 2018)
EllapsedTime: 385.6 seconds
RetCode: 0
Status:  OK  
CheckDir: csaw.Rcheck
Warnings: 0

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   C:\Users\biocbuild\bbs-3.7-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:csaw.install-out.txt --library=C:\Users\biocbuild\bbs-3.7-bioc\R\library --no-vignettes --timings csaw_1.14.1.tar.gz
###
##############################################################################
##############################################################################


* using log directory 'C:/Users/biocbuild/bbs-3.7-bioc/meat/csaw.Rcheck'
* using R version 3.5.1 Patched (2018-07-24 r75005)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* using option '--no-vignettes'
* checking for file 'csaw/DESCRIPTION' ... OK
* this is package 'csaw' version '1.14.1'
* 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 'csaw' can be installed ... OK
* checking installed package size ... NOTE
  installed size is  5.0Mb
  sub-directories of 1Mb or more:
    libs   2.9Mb
* 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 ... OK
* 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 line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking compiled code ... NOTE
Note: information on .o files for i386 is not available
Note: information on .o files for x64 is not available
File 'C:/Users/biocbuild/bbs-3.7-bioc/R/library/csaw/libs/i386/csaw.dll':
  Found '_exit', possibly from '_exit' (C)
  Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
  Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
  Found 'printf', possibly from 'printf' (C)
  Found 'putchar', possibly from 'putchar' (C)
  Found 'puts', possibly from 'printf' (C), 'puts' (C)

Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor use Fortran I/O
nor system RNGs. The detected symbols are linked into the code but
might come from libraries and not actually be called.

See 'Writing portable packages' in the 'Writing R Extensions' manual.
* checking installed files from 'inst/doc' ... OK
* checking files in 'vignettes' ... OK
* checking examples ...
** running examples for arch 'i386' ... OK
Examples with CPU or elapsed time > 5s
             user system elapsed
detailRanges 15.1   0.72   15.84
** running examples for arch 'x64' ... OK
Examples with CPU or elapsed time > 5s
              user system elapsed
detailRanges 13.71   0.51   14.26
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
** running tests for arch 'i386' ...
  Running 'test-basic.R'
  Comparing 'test-basic.Rout' to 'test-basic.Rout.save' ...45,49c45,49
<    [1]     chrA      1-50      *
<    [2]     chrA    51-100      *
<    [3]     chrA   101-150      *
<    [4]     chrA   151-200      *
<    [5]     chrA   201-250      *
---
>    [1]     chrA   [  1,  50]      *
>    [2]     chrA   [ 51, 100]      *
>    [3]     chrA   [101, 150]      *
>    [4]     chrA   [151, 200]      *
>    [5]     chrA   [201, 250]      *
51,55c51,55
<   [67]     chrC 1101-1150      *
<   [68]     chrC 1151-1200      *
<   [69]     chrC 1201-1250      *
<   [70]     chrC 1251-1300      *
<   [71]     chrC 1301-1345      *
---
>   [67]     chrC [1101, 1150]      *
>   [68]     chrC [1151, 1200]      *
>   [69]     chrC [1201, 1250]      *
>   [70]     chrC [1251, 1300]      *
>   [71]     chrC [1301, 1345]      *
74,78c74,78
<    [1]     chrA     1-500      *
<    [2]     chrA   201-700      *
<    [3]     chrA   401-900      *
<    [4]     chrA  601-1100      *
<    [5]     chrA  801-1298      *
---
>    [1]     chrA  [  1,  500]      *
>    [2]     chrA  [201,  700]      *
>    [3]     chrA  [401,  900]      *
>    [4]     chrA  [601, 1100]      *
>    [5]     chrA  [801, 1298]      *
80,84c80,84
<   [15]     chrC   401-900      *
<   [16]     chrC  601-1100      *
<   [17]     chrC  801-1300      *
<   [18]     chrC 1001-1345      *
<   [19]     chrC 1201-1345      *
---
>   [15]     chrC [ 401,  900]      *
>   [16]     chrC [ 601, 1100]      *
>   [17]     chrC [ 801, 1300]      *
>   [18]     chrC [1001, 1345]      *
>   [19]     chrC [1201, 1345]      *
119,124c119,124
<   [1]     chrA     1-100      *
<   [2]     chrA    51-150      *
<   [3]     chrA   101-200      *
<   [4]     chrA   151-200      *
<   [5]     chrB     1-100      *
<   [6]     chrB    51-100      *
---
>   [1]     chrA [  1, 100]      *
>   [2]     chrA [ 51, 150]      *
>   [3]     chrA [101, 200]      *
>   [4]     chrA [151, 200]      *
>   [5]     chrB [  1, 100]      *
>   [6]     chrB [ 51, 100]      *
141,145c141,145
<   [1]     chrA     1-100      *
<   [2]     chrA    51-150      *
<   [3]     chrA   101-200      *
<   [4]     chrB     1-100      *
<   [5]     chrB    51-100      *
---
>   [1]     chrA [  1, 100]      *
>   [2]     chrA [ 51, 150]      *
>   [3]     chrA [101, 200]      *
>   [4]     chrB [  1, 100]      *
>   [5]     chrB [ 51, 100]      *
163,168c163,168
<   [1]     chrA     1-100      *
<   [2]     chrA    51-150      *
<   [3]     chrA   101-200      *
<   [4]     chrA   151-200      *
<   [5]     chrB     1-100      *
<   [6]     chrB    51-100      *
---
>   [1]     chrA [  1, 100]      *
>   [2]     chrA [ 51, 150]      *
>   [3]     chrA [101, 200]      *
>   [4]     chrA [151, 200]      *
>   [5]     chrB [  1, 100]      *
>   [6]     chrB [ 51, 100]      *
240d239
< [W::bgzf_read_block] EOF marker is absent. The input is probably truncated
333,337c332,336
<    [1]     chrA      1-50      *
<    [2]     chrA    51-100      *
<    [3]     chrA   101-150      *
<    [4]     chrA   151-200      *
<    [5]     chrA   201-250      *
---
>    [1]     chrA   [  1,  50]      *
>    [2]     chrA   [ 51, 100]      *
>    [3]     chrA   [101, 150]      *
>    [4]     chrA   [151, 200]      *
>    [5]     chrA   [201, 250]      *
339,343c338,342
<   [67]     chrC 1101-1150      *
<   [68]     chrC 1151-1200      *
<   [69]     chrC 1201-1250      *
<   [70]     chrC 1251-1300      *
<   [71]     chrC 1301-1345      *
---
>   [67]     chrC [1101, 1150]      *
>   [68]     chrC [1151, 1200]      *
>   [69]     chrC [1201, 1250]      *
>   [70]     chrC [1251, 1300]      *
>   [71]     chrC [1301, 1345]      *
356,358c355,357
<   [1]     chrA    1-1298      *
<   [2]     chrB     1-870      *
<   [3]     chrC    1-1345      *
---
>   [1]     chrA [1, 1298]      *
>   [2]     chrB [1,  870]      *
>   [3]     chrC [1, 1345]      *
371,378c370,377
<   [1]     chrA     1-450      *
<   [2]     chrA   451-850      *
<   [3]     chrA  851-1298      *
<   [4]     chrB     1-450      *
<   [5]     chrB   451-870      *
<   [6]     chrC     1-450      *
<   [7]     chrC   451-900      *
<   [8]     chrC  901-1345      *
---
>   [1]     chrA [  1,  450]      *
>   [2]     chrA [451,  850]      *
>   [3]     chrA [851, 1298]      *
>   [4]     chrB [  1,  450]      *
>   [5]     chrB [451,  870]      *
>   [6]     chrC [  1,  450]      *
>   [7]     chrC [451,  900]      *
>   [8]     chrC [901, 1345]      *
393,397c392,396
<    [1]     chrA      1-50      *
<    [2]     chrA    51-150      *
<    [3]     chrA   151-200      *
<    [4]     chrA   201-350      *
<    [5]     chrA   351-450      *
---
>    [1]     chrA   [  1,  50]      *
>    [2]     chrA   [ 51, 150]      *
>    [3]     chrA   [151, 200]      *
>    [4]     chrA   [201, 350]      *
>    [5]     chrA   [351, 450]      *
399,403c398,402
<   [39]     chrC 1051-1100      *
<   [40]     chrC 1101-1150      *
<   [41]     chrC 1151-1250      *
<   [42]     chrC 1251-1300      *
<   [43]     chrC 1301-1345      *
---
>   [39]     chrC [1051, 1100]      *
>   [40]     chrC [1101, 1150]      *
>   [41]     chrC [1151, 1250]      *
>   [42]     chrC [1251, 1300]      *
>   [43]     chrC [1301, 1345]      *
472,476c471,475
<     [1]     chrA    94-103      +
<     [2]     chrA   106-115      +
<     [3]     chrA   120-129      +
<     [4]     chrA   120-129      +
<     [5]     chrA   129-138      +
---
>     [1]     chrA [ 94, 103]      +
>     [2]     chrA [106, 115]      +
>     [3]     chrA [120, 129]      +
>     [4]     chrA [120, 129]      +
>     [5]     chrA [129, 138]      +
478,482c477,481
<   [139]     chrA   467-476      -
<   [140]     chrA   482-491      -
<   [141]     chrA   490-499      -
<   [142]     chrA   491-500      -
<   [143]     chrA   499-508      -
---
>   [139]     chrA [467, 476]      -
>   [140]     chrA [482, 491]      -
>   [141]     chrA [490, 499]      -
>   [142]     chrA [491, 500]      -
>   [143]     chrA [499, 508]      -
489,493c488,492
<    [1]     chrA     43-52      +
<    [2]     chrA     51-60      +
<    [3]     chrA     57-66      +
<    [4]     chrA     62-71      +
<    [5]     chrA     63-72      +
---
>    [1]     chrA  [43, 52]      +
>    [2]     chrA  [51, 60]      +
>    [3]     chrA  [57, 66]      +
>    [4]     chrA  [62, 71]      +
>    [5]     chrA  [63, 72]      +
495,499c494,498
<   [23]     chrA     79-88      -
<   [24]     chrA     83-92      -
<   [25]     chrA     88-97      -
<   [26]     chrA     89-98      -
<   [27]     chrA    93-102      -
---
>   [23]     chrA [79,  88]      -
>   [24]     chrA [83,  92]      -
>   [25]     chrA [88,  97]      -
>   [26]     chrA [89,  98]      -
>   [27]     chrA [93, 102]      -
506,510c505,509
<    [1]     chrA     51-60      +
<    [2]     chrA     57-66      +
<    [3]     chrA     62-71      +
<    [4]     chrA     63-72      +
<    [5]     chrA     76-85      +
---
>    [1]     chrA  [51, 60]      +
>    [2]     chrA  [57, 66]      +
>    [3]     chrA  [62, 71]      +
>    [4]     chrA  [63, 72]      +
>    [5]     chrA  [76, 85]      +
512,516c511,515
<   [15]     chrA     79-88      -
<   [16]     chrA     79-88      -
<   [17]     chrA     88-97      -
<   [18]     chrA     89-98      -
<   [19]     chrA    93-102      -
---
>   [15]     chrA [79,  88]      -
>   [16]     chrA [79,  88]      -
>   [17]     chrA [88,  97]      -
>   [18]     chrA [89,  98]      -
>   [19]     chrA [93, 102]      -
523,525c522,524
<   [1]     chrB     50-79      *
<   [2]     chrB     90-99      *
<   [3]     chrB    99-100      *
---
>   [1]     chrB [50,  79]      *
>   [2]     chrB [90,  99]      *
>   [3]     chrB [99, 100]      *
532,535c531,534
<   [1]     chrB     75-84      +
<   [2]     chrB     90-99      +
<   [3]     chrB     70-79      -
<   [4]     chrB    99-100      -
---
>   [1]     chrB [75,  84]      +
>   [2]     chrB [90,  99]      +
>   [3]     chrB [70,  79]      -
>   [4]     chrB [99, 100]      -
 OK
** running tests for arch 'x64' ...
  Running 'test-basic.R'
  Comparing 'test-basic.Rout' to 'test-basic.Rout.save' ...45,49c45,49
<    [1]     chrA      1-50      *
<    [2]     chrA    51-100      *
<    [3]     chrA   101-150      *
<    [4]     chrA   151-200      *
<    [5]     chrA   201-250      *
---
>    [1]     chrA   [  1,  50]      *
>    [2]     chrA   [ 51, 100]      *
>    [3]     chrA   [101, 150]      *
>    [4]     chrA   [151, 200]      *
>    [5]     chrA   [201, 250]      *
51,55c51,55
<   [67]     chrC 1101-1150      *
<   [68]     chrC 1151-1200      *
<   [69]     chrC 1201-1250      *
<   [70]     chrC 1251-1300      *
<   [71]     chrC 1301-1345      *
---
>   [67]     chrC [1101, 1150]      *
>   [68]     chrC [1151, 1200]      *
>   [69]     chrC [1201, 1250]      *
>   [70]     chrC [1251, 1300]      *
>   [71]     chrC [1301, 1345]      *
74,78c74,78
<    [1]     chrA     1-500      *
<    [2]     chrA   201-700      *
<    [3]     chrA   401-900      *
<    [4]     chrA  601-1100      *
<    [5]     chrA  801-1298      *
---
>    [1]     chrA  [  1,  500]      *
>    [2]     chrA  [201,  700]      *
>    [3]     chrA  [401,  900]      *
>    [4]     chrA  [601, 1100]      *
>    [5]     chrA  [801, 1298]      *
80,84c80,84
<   [15]     chrC   401-900      *
<   [16]     chrC  601-1100      *
<   [17]     chrC  801-1300      *
<   [18]     chrC 1001-1345      *
<   [19]     chrC 1201-1345      *
---
>   [15]     chrC [ 401,  900]      *
>   [16]     chrC [ 601, 1100]      *
>   [17]     chrC [ 801, 1300]      *
>   [18]     chrC [1001, 1345]      *
>   [19]     chrC [1201, 1345]      *
119,124c119,124
<   [1]     chrA     1-100      *
<   [2]     chrA    51-150      *
<   [3]     chrA   101-200      *
<   [4]     chrA   151-200      *
<   [5]     chrB     1-100      *
<   [6]     chrB    51-100      *
---
>   [1]     chrA [  1, 100]      *
>   [2]     chrA [ 51, 150]      *
>   [3]     chrA [101, 200]      *
>   [4]     chrA [151, 200]      *
>   [5]     chrB [  1, 100]      *
>   [6]     chrB [ 51, 100]      *
141,145c141,145
<   [1]     chrA     1-100      *
<   [2]     chrA    51-150      *
<   [3]     chrA   101-200      *
<   [4]     chrB     1-100      *
<   [5]     chrB    51-100      *
---
>   [1]     chrA [  1, 100]      *
>   [2]     chrA [ 51, 150]      *
>   [3]     chrA [101, 200]      *
>   [4]     chrB [  1, 100]      *
>   [5]     chrB [ 51, 100]      *
163,168c163,168
<   [1]     chrA     1-100      *
<   [2]     chrA    51-150      *
<   [3]     chrA   101-200      *
<   [4]     chrA   151-200      *
<   [5]     chrB     1-100      *
<   [6]     chrB    51-100      *
---
>   [1]     chrA [  1, 100]      *
>   [2]     chrA [ 51, 150]      *
>   [3]     chrA [101, 200]      *
>   [4]     chrA [151, 200]      *
>   [5]     chrB [  1, 100]      *
>   [6]     chrB [ 51, 100]      *
240d239
< [W::bgzf_read_block] EOF marker is absent. The input is probably truncated
333,337c332,336
<    [1]     chrA      1-50      *
<    [2]     chrA    51-100      *
<    [3]     chrA   101-150      *
<    [4]     chrA   151-200      *
<    [5]     chrA   201-250      *
---
>    [1]     chrA   [  1,  50]      *
>    [2]     chrA   [ 51, 100]      *
>    [3]     chrA   [101, 150]      *
>    [4]     chrA   [151, 200]      *
>    [5]     chrA   [201, 250]      *
339,343c338,342
<   [67]     chrC 1101-1150      *
<   [68]     chrC 1151-1200      *
<   [69]     chrC 1201-1250      *
<   [70]     chrC 1251-1300      *
<   [71]     chrC 1301-1345      *
---
>   [67]     chrC [1101, 1150]      *
>   [68]     chrC [1151, 1200]      *
>   [69]     chrC [1201, 1250]      *
>   [70]     chrC [1251, 1300]      *
>   [71]     chrC [1301, 1345]      *
356,358c355,357
<   [1]     chrA    1-1298      *
<   [2]     chrB     1-870      *
<   [3]     chrC    1-1345      *
---
>   [1]     chrA [1, 1298]      *
>   [2]     chrB [1,  870]      *
>   [3]     chrC [1, 1345]      *
371,378c370,377
<   [1]     chrA     1-450      *
<   [2]     chrA   451-850      *
<   [3]     chrA  851-1298      *
<   [4]     chrB     1-450      *
<   [5]     chrB   451-870      *
<   [6]     chrC     1-450      *
<   [7]     chrC   451-900      *
<   [8]     chrC  901-1345      *
---
>   [1]     chrA [  1,  450]      *
>   [2]     chrA [451,  850]      *
>   [3]     chrA [851, 1298]      *
>   [4]     chrB [  1,  450]      *
>   [5]     chrB [451,  870]      *
>   [6]     chrC [  1,  450]      *
>   [7]     chrC [451,  900]      *
>   [8]     chrC [901, 1345]      *
393,397c392,396
<    [1]     chrA      1-50      *
<    [2]     chrA    51-150      *
<    [3]     chrA   151-200      *
<    [4]     chrA   201-350      *
<    [5]     chrA   351-450      *
---
>    [1]     chrA   [  1,  50]      *
>    [2]     chrA   [ 51, 150]      *
>    [3]     chrA   [151, 200]      *
>    [4]     chrA   [201, 350]      *
>    [5]     chrA   [351, 450]      *
399,403c398,402
<   [39]     chrC 1051-1100      *
<   [40]     chrC 1101-1150      *
<   [41]     chrC 1151-1250      *
<   [42]     chrC 1251-1300      *
<   [43]     chrC 1301-1345      *
---
>   [39]     chrC [1051, 1100]      *
>   [40]     chrC [1101, 1150]      *
>   [41]     chrC [1151, 1250]      *
>   [42]     chrC [1251, 1300]      *
>   [43]     chrC [1301, 1345]      *
472,476c471,475
<     [1]     chrA    94-103      +
<     [2]     chrA   106-115      +
<     [3]     chrA   120-129      +
<     [4]     chrA   120-129      +
<     [5]     chrA   129-138      +
---
>     [1]     chrA [ 94, 103]      +
>     [2]     chrA [106, 115]      +
>     [3]     chrA [120, 129]      +
>     [4]     chrA [120, 129]      +
>     [5]     chrA [129, 138]      +
478,482c477,481
<   [139]     chrA   467-476      -
<   [140]     chrA   482-491      -
<   [141]     chrA   490-499      -
<   [142]     chrA   491-500      -
<   [143]     chrA   499-508      -
---
>   [139]     chrA [467, 476]      -
>   [140]     chrA [482, 491]      -
>   [141]     chrA [490, 499]      -
>   [142]     chrA [491, 500]      -
>   [143]     chrA [499, 508]      -
489,493c488,492
<    [1]     chrA     43-52      +
<    [2]     chrA     51-60      +
<    [3]     chrA     57-66      +
<    [4]     chrA     62-71      +
<    [5]     chrA     63-72      +
---
>    [1]     chrA  [43, 52]      +
>    [2]     chrA  [51, 60]      +
>    [3]     chrA  [57, 66]      +
>    [4]     chrA  [62, 71]      +
>    [5]     chrA  [63, 72]      +
495,499c494,498
<   [23]     chrA     79-88      -
<   [24]     chrA     83-92      -
<   [25]     chrA     88-97      -
<   [26]     chrA     89-98      -
<   [27]     chrA    93-102      -
---
>   [23]     chrA [79,  88]      -
>   [24]     chrA [83,  92]      -
>   [25]     chrA [88,  97]      -
>   [26]     chrA [89,  98]      -
>   [27]     chrA [93, 102]      -
506,510c505,509
<    [1]     chrA     51-60      +
<    [2]     chrA     57-66      +
<    [3]     chrA     62-71      +
<    [4]     chrA     63-72      +
<    [5]     chrA     76-85      +
---
>    [1]     chrA  [51, 60]      +
>    [2]     chrA  [57, 66]      +
>    [3]     chrA  [62, 71]      +
>    [4]     chrA  [63, 72]      +
>    [5]     chrA  [76, 85]      +
512,516c511,515
<   [15]     chrA     79-88      -
<   [16]     chrA     79-88      -
<   [17]     chrA     88-97      -
<   [18]     chrA     89-98      -
<   [19]     chrA    93-102      -
---
>   [15]     chrA [79,  88]      -
>   [16]     chrA [79,  88]      -
>   [17]     chrA [88,  97]      -
>   [18]     chrA [89,  98]      -
>   [19]     chrA [93, 102]      -
523,525c522,524
<   [1]     chrB     50-79      *
<   [2]     chrB     90-99      *
<   [3]     chrB    99-100      *
---
>   [1]     chrB [50,  79]      *
>   [2]     chrB [90,  99]      *
>   [3]     chrB [99, 100]      *
532,535c531,534
<   [1]     chrB     75-84      +
<   [2]     chrB     90-99      +
<   [3]     chrB     70-79      -
<   [4]     chrB    99-100      -
---
>   [1]     chrB [75,  84]      +
>   [2]     chrB [90,  99]      +
>   [3]     chrB [70,  79]      -
>   [4]     chrB [99, 100]      -
 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: 2 NOTEs
See
  'C:/Users/biocbuild/bbs-3.7-bioc/meat/csaw.Rcheck/00check.log'
for details.



Installation output

csaw.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   C:\cygwin\bin\curl.exe -O https://malbec2.bioconductor.org/BBS/3.7/bioc/src/contrib/csaw_1.14.1.tar.gz && rm -rf csaw.buildbin-libdir && mkdir csaw.buildbin-libdir && C:\Users\biocbuild\bbs-3.7-bioc\R\bin\R.exe CMD INSTALL --merge-multiarch --build --library=csaw.buildbin-libdir csaw_1.14.1.tar.gz && C:\Users\biocbuild\bbs-3.7-bioc\R\bin\R.exe CMD INSTALL csaw_1.14.1.zip && rm csaw_1.14.1.tar.gz csaw_1.14.1.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  950k  100  950k    0     0  15.5M      0 --:--:-- --:--:-- --:--:-- 17.1M

install for i386

* installing *source* package 'csaw' ...
** libs
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c annotator.cpp -o annotator.o
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c bam_utils.cpp -o bam_utils.o
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c best_in_cluster.cpp -o best_in_cluster.o
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c check_bimodality.cpp -o check_bimodality.o
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c correlate_reads.cpp -o correlate_reads.o
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c find_maxima.cpp -o find_maxima.o
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c get_cluster_stats.cpp -o get_cluster_stats.o
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c get_profile.cpp -o get_profile.o
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c get_rle_counts.cpp -o get_rle_counts.o
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c init.cpp -o init.o
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c merge_windows.cpp -o merge_windows.o
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c pair_reads.cpp -o pair_reads.o
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c single_reads.cpp -o single_reads.o
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c utils.cpp -o utils.o
C:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o csaw.dll tmp.def annotator.o bam_utils.o best_in_cluster.o check_bimodality.o correlate_reads.o find_maxima.o get_cluster_stats.o get_profile.o get_rle_counts.o init.o merge_windows.o pair_reads.o single_reads.o utils.o -LC:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/usrlib/i386 -lhts -lz -lm -lws2_32 -lpthread -LC:/extsoft/lib/i386 -LC:/extsoft/lib -LC:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/bin/i386 -lR
installing to C:/Users/biocbuild/bbs-3.7-bioc/meat/csaw.buildbin-libdir/csaw/libs/i386
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'csaw'
    finding HTML links ... done
    SEmethods                               html  
    finding level-2 HTML links ... done

    checkBimodality                         html  
    clusterFDR                              html  
    clusterWindows                          html  
    combineTests                            html  
    consolidateClusters                     html  
    consolidateSizes                        html  
    correlateReads                          html  
    csawUsersGuide                          html  
    detailRanges                            html  
    empiricalFDR                            html  
    extractReads                            html  
    filterWindows                           html  
    findMaxima                              html  
    getBestTest                             html  
    getPESizes                              html  
    getWidths                               html  
    maximizeCcf                             html  
    mergeWindows                            html  
    mixedClusters                           html  
    normOffsets                             html  
    overlapStats                            html  
    profileSites                            html  
    readParam                               html  
    regionCounts                            html  
    scaledAverage                           html  
    strandedCounts                          html  
    upweightSummit                          html  
    windowCounts                            html  
    wwhm                                    html  
** building package indices
** installing vignettes
   'csaw.Rnw' 
** testing if installed package can be loaded
In R CMD INSTALL

install for x64

* installing *source* package 'csaw' ...
** libs
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c annotator.cpp -o annotator.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c bam_utils.cpp -o bam_utils.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c best_in_cluster.cpp -o best_in_cluster.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c check_bimodality.cpp -o check_bimodality.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c correlate_reads.cpp -o correlate_reads.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c find_maxima.cpp -o find_maxima.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c get_cluster_stats.cpp -o get_cluster_stats.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c get_profile.cpp -o get_profile.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c get_rle_counts.cpp -o get_rle_counts.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c init.cpp -o init.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c merge_windows.cpp -o merge_windows.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c pair_reads.cpp -o pair_reads.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c single_reads.cpp -o single_reads.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/include" -DNDEBUG  -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/zlibbioc/include" -I"C:/Users/biocbuild/bbs-3.7-bioc/R/library/Rcpp/include"   -I"C:/extsoft/include"     -O2 -Wall  -mtune=generic -c utils.cpp -o utils.o
C:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o csaw.dll tmp.def annotator.o bam_utils.o best_in_cluster.o check_bimodality.o correlate_reads.o find_maxima.o get_cluster_stats.o get_profile.o get_rle_counts.o init.o merge_windows.o pair_reads.o single_reads.o utils.o -LC:/Users/biocbuild/bbs-3.7-bioc/R/library/Rhtslib/usrlib/x64 -lhts -lz -lm -lws2_32 -lpthread -LC:/extsoft/lib/x64 -LC:/extsoft/lib -LC:/Users/BIOCBU˜1/BBS-3˜1.7-B/R/bin/x64 -lR
installing to C:/Users/biocbuild/bbs-3.7-bioc/meat/csaw.buildbin-libdir/csaw/libs/x64
** testing if installed package can be loaded
* MD5 sums
packaged installation of 'csaw' as csaw_1.14.1.zip
* DONE (csaw)
In R CMD INSTALL
In R CMD INSTALL
* installing to library 'C:/Users/biocbuild/bbs-3.7-bioc/R/library'
package 'csaw' successfully unpacked and MD5 sums checked
In R CMD INSTALL

Tests output

csaw.Rcheck/tests_i386/test-basic.Rout.save


R Under development (unstable) (2017-10-27 r73632) -- "Unsuffered Consequences"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (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.

  Natural language support but running in an English locale

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.

> # This is a testing stub that just provides a basic run-through of all the methods.
> # The real tests are located in inst/tests along with a Bash script for execution
> # and comparison. The separation into two folders is necessary to keep R CMD check
> # running with reasonable speed.
> 
> suppressWarnings(suppressPackageStartupMessages(require(csaw)))
> both.files <- system.file("exdata", c("rep1.bam", "rep2.bam"), package="csaw")
> pe.file <- system.file("exdata", "pet.bam", package="csaw")
> 
> # Checking data quality prior to counting.
> head(correlateReads(both.files))
[1] -0.0137654663  0.0005571408  0.0175021237 -0.0308470292 -0.0087488234
[6] -0.0120687468
> head(correlateReads(both.files, cross=FALSE))
[1]  1.0000000000 -0.0008601215  0.0170688852 -0.0475443596  0.0028128511
[6] -0.0030687197
> 
> getPESizes(pe.file)
$sizes
[1]  70  90  20 150  10  30  10   2

$diagnostics
  total.reads  mapped.reads        single mate.unmapped    unoriented 
           23            23             3             0             1 
    inter.chr 
            1 

> 
> # Trying to count some single-end data.
> data <- windowCounts(both.files, ext=100)
> head(assay(data))
     [,1] [,2]
[1,]   43   71
[2,]   57   89
[3,]   56  120
[4,]   53  141
[5,]   40  152
[6,]   59  135
> rowRanges(data)
GRanges object with 71 ranges and 0 metadata columns:
       seqnames       ranges strand
          <Rle>    <IRanges>  <Rle>
   [1]     chrA   [  1,  50]      *
   [2]     chrA   [ 51, 100]      *
   [3]     chrA   [101, 150]      *
   [4]     chrA   [151, 200]      *
   [5]     chrA   [201, 250]      *
   ...      ...          ...    ...
  [67]     chrC [1101, 1150]      *
  [68]     chrC [1151, 1200]      *
  [69]     chrC [1201, 1250]      *
  [70]     chrC [1251, 1300]      *
  [71]     chrC [1301, 1345]      *
  -------
  seqinfo: 3 sequences from an unspecified genome
> data$totals
[1] 1349 3291
> 
> data <- windowCounts(both.files, width=500, spacing=200)
> head(assay(data))
     [,1] [,2]
[1,]  204  455
[2,]  195  510
[3,]  186  483
[4,]  200  501
[5,]  187  468
[6,]  127  311
> rowRanges(data)
GRanges object with 19 ranges and 0 metadata columns:
       seqnames       ranges strand
          <Rle>    <IRanges>  <Rle>
   [1]     chrA  [  1,  500]      *
   [2]     chrA  [201,  700]      *
   [3]     chrA  [401,  900]      *
   [4]     chrA  [601, 1100]      *
   [5]     chrA  [801, 1298]      *
   ...      ...          ...    ...
  [15]     chrC [ 401,  900]      *
  [16]     chrC [ 601, 1100]      *
  [17]     chrC [ 801, 1300]      *
  [18]     chrC [1001, 1345]      *
  [19]     chrC [1201, 1345]      *
  -------
  seqinfo: 3 sequences from an unspecified genome
> data$totals
[1] 1349 3291
> 
> data <- windowCounts(both.files, ext=100, param=readParam(minq=100))
> data$totals
[1]  914 2152
> data <- windowCounts(both.files, ext=100, param=readParam(dedup=TRUE))
> data$totals
[1] 1056 2582
> data <- windowCounts(both.files, ext=100, param=readParam(discard=GRanges("chrA", IRanges(50, 500))))
> data$totals
[1] 1186 2916
> data <- windowCounts(both.files, ext=100, param=readParam(restrict="chrA"))
> data$totals
[1]  451 1093
> 
> # Trying to count some paired-end data.
> out <- windowCounts(pe.file, param=readParam(pe="both"), width=100, filter=1L)
> assay(out)
     [,1]
[1,]    3
[2,]    4
[3,]    2
[4,]    1
[5,]    4
[6,]    3
> out$totals
[1] 8
> rowRanges(out)
GRanges object with 6 ranges and 0 metadata columns:
      seqnames     ranges strand
         <Rle>  <IRanges>  <Rle>
  [1]     chrA [  1, 100]      *
  [2]     chrA [ 51, 150]      *
  [3]     chrA [101, 200]      *
  [4]     chrA [151, 200]      *
  [5]     chrB [  1, 100]      *
  [6]     chrB [ 51, 100]      *
  -------
  seqinfo: 2 sequences from an unspecified genome
> out <- windowCounts(pe.file, param=readParam(pe="both", max.frag=100), width=100, filter=1L)
> assay(out)
     [,1]
[1,]    2
[2,]    3
[3,]    1
[4,]    4
[5,]    3
> out$totals
[1] 7
> rowRanges(out)
GRanges object with 5 ranges and 0 metadata columns:
      seqnames     ranges strand
         <Rle>  <IRanges>  <Rle>
  [1]     chrA [  1, 100]      *
  [2]     chrA [ 51, 150]      *
  [3]     chrA [101, 200]      *
  [4]     chrB [  1, 100]      *
  [5]     chrB [ 51, 100]      *
  -------
  seqinfo: 2 sequences from an unspecified genome
> out <- windowCounts(pe.file, param=readParam(pe="first"), width=100, filter=1L)
> assay(out)
     [,1]
[1,]    3
[2,]    4
[3,]    4
[4,]    2
[5,]    6
[6,]    6
> out$totals
[1] 10
> rowRanges(out)
GRanges object with 6 ranges and 0 metadata columns:
      seqnames     ranges strand
         <Rle>  <IRanges>  <Rle>
  [1]     chrA [  1, 100]      *
  [2]     chrA [ 51, 150]      *
  [3]     chrA [101, 200]      *
  [4]     chrA [151, 200]      *
  [5]     chrB [  1, 100]      *
  [6]     chrB [ 51, 100]      *
  -------
  seqinfo: 2 sequences from an unspecified genome
> 
> # Trying to convert it to a DGEList.
> asDGEList(data)
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1      451            1
Sample2     1     1093            1

> asDGEList(data, lib.size=c(10, 10))
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1       10            1
Sample2     1       10            1

> asDGEList(data, norm=c(1,2))
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1      451            1
Sample2     1     1093            2

> 
> temp <- data 
> temp$totals <- NULL 
> asDGEList(temp) # Should spit out a warning.
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1     1293            1
Sample2     1     3142            1

Warning message:
In .local(object, ...) :
  library sizes not found in 'totals', setting to NULL
> 
> # Running some basic normalization.
> data <- windowCounts(both.files, ext=100, param=readParam(minq=100, dedup=TRUE))
> 
> normOffsets(assay(data), lib.size=data$totals)
[1] 1.001197 0.998804
> normOffsets(assay(data), lib.size=data$totals, logratioTrim=.2)
[1] 1.003816 0.996199
> normOffsets(assay(data), lib.size=data$totals, method="RLE")
[1] 1.0037890 0.9962253
> normOffsets(data)
class: RangedSummarizedExperiment 
dim: 71 2 
metadata(6): spacing width ... param final.ext
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(5): bam.files totals ext rlen norm.factors
> normOffsets(data, logratioTrim=0.1)
class: RangedSummarizedExperiment 
dim: 71 2 
metadata(6): spacing width ... param final.ext
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(5): bam.files totals ext rlen norm.factors
> normOffsets(data, method="upperquartile")
class: RangedSummarizedExperiment 
dim: 71 2 
metadata(6): spacing width ... param final.ext
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(5): bam.files totals ext rlen norm.factors
> 
> head(normOffsets(assay(data), lib.size=data$totals, type="loess"))
           [,1]      [,2]
[1,] -0.4047876 0.4047876
[2,] -0.4328410 0.4328410
[3,] -0.3864553 0.3864553
[4,] -0.4101296 0.4101296
[5,] -0.3788945 0.3788945
[6,] -0.3514597 0.3514597
> head(normOffsets(assay(data), lib.size=data$totals, type="loess", span=0.7))
           [,1]      [,2]
[1,] -0.4297765 0.4297765
[2,] -0.4391936 0.4391936
[3,] -0.3867962 0.3867962
[4,] -0.4215479 0.4215479
[5,] -0.3858107 0.3858107
[6,] -0.3915074 0.3915074
> head(normOffsets(data, type="loess"))
class: RangedSummarizedExperiment 
dim: 6 2 
metadata(6): spacing width ... param final.ext
assays(2): counts offset
rownames: NULL
rowData names(0):
colnames: NULL
colData names(4): bam.files totals ext rlen
> head(normOffsets(data, type="loess", span=0.5))
class: RangedSummarizedExperiment 
dim: 6 2 
metadata(6): spacing width ... param final.ext
assays(2): counts offset
rownames: NULL
rowData names(0):
colnames: NULL
colData names(4): bam.files totals ext rlen
> 
> # Assuming someone went around and pulled out some p-values for everybody.
> set.seed(128145-19238)
> nr <- nrow(data)
> tabled <- data.frame(logFC=rnorm(nr), logCPM=rnorm(nr), PValue=rbeta(nr, 1, 2))
> weighting <- rgamma(nr, 2, 1)
> 
> mergeWindows(rowRanges(data), -1)
$id
 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
[26] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
[51] 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71

$region
GRanges object with 71 ranges and 0 metadata columns:
       seqnames       ranges strand
          <Rle>    <IRanges>  <Rle>
   [1]     chrA   [  1,  50]      *
   [2]     chrA   [ 51, 100]      *
   [3]     chrA   [101, 150]      *
   [4]     chrA   [151, 200]      *
   [5]     chrA   [201, 250]      *
   ...      ...          ...    ...
  [67]     chrC [1101, 1150]      *
  [68]     chrC [1151, 1200]      *
  [69]     chrC [1201, 1250]      *
  [70]     chrC [1251, 1300]      *
  [71]     chrC [1301, 1345]      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> mergeWindows(rowRanges(data), 100)
$id
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
[39] 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

$region
GRanges object with 3 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrA [1, 1298]      *
  [2]     chrB [1,  870]      *
  [3]     chrC [1, 1345]      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> mergeWindows(rowRanges(data), 100, max.width=500)
$id
 [1] 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 5 5 5
[39] 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8

$region
GRanges object with 8 ranges and 0 metadata columns:
      seqnames      ranges strand
         <Rle>   <IRanges>  <Rle>
  [1]     chrA [  1,  450]      *
  [2]     chrA [451,  850]      *
  [3]     chrA [851, 1298]      *
  [4]     chrB [  1,  450]      *
  [5]     chrB [451,  870]      *
  [6]     chrC [  1,  450]      *
  [7]     chrC [451,  900]      *
  [8]     chrC [901, 1345]      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> merged <- mergeWindows(rowRanges(data), 100, sign=tabled$logFC > 0)
> merged
$id
 [1]  1  2  2  3  4  4  4  5  5  6  7  8  9  9  9  9 10 10 11 12 13 14 15 15 15
[26] 15 16 17 18 18 18 18 18 19 19 20 21 22 23 24 24 25 25 26 27 28 29 29 30 30
[51] 31 31 31 31 32 33 34 34 34 34 35 36 37 37 38 39 40 41 41 42 43

$region
GRanges object with 43 ranges and 0 metadata columns:
       seqnames       ranges strand
          <Rle>    <IRanges>  <Rle>
   [1]     chrA   [  1,  50]      *
   [2]     chrA   [ 51, 150]      *
   [3]     chrA   [151, 200]      *
   [4]     chrA   [201, 350]      *
   [5]     chrA   [351, 450]      *
   ...      ...          ...    ...
  [39]     chrC [1051, 1100]      *
  [40]     chrC [1101, 1150]      *
  [41]     chrC [1151, 1250]      *
  [42]     chrC [1251, 1300]      *
  [43]     chrC [1301, 1345]      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> 
> head(combineTests(merged$id, tabled))
  nWindows logFC.up logFC.down     PValue       FDR direction
1        1        0          0 0.46328451 0.5622769        up
2        2        0          0 0.79272727 0.8116017      down
3        1        1          0 0.27967201 0.5047602        up
4        3        0          1 0.08956765 0.4125151      down
5        2        1          0 0.28172663 0.5047602        up
6        1        0          1 0.01949563 0.4125151      down
> head(combineTests(merged$id, tabled, weight=weighting))
  nWindows logFC.up logFC.down     PValue       FDR direction
1        1        0          0 0.46328451 0.5622769        up
2        2        0          0 0.79272727 0.8116017      down
3        1        1          0 0.27967201 0.5228651        up
4        3        0          1 0.04669873 0.4255938      down
5        2        1          0 0.24536526 0.4795776        up
6        1        0          1 0.01949563 0.3373185      down
> 
> head(getBestTest(merged$id, tabled))
  best       logFC      logCPM     PValue       FDR
1    1  0.21317827  0.53648572 0.46328451 0.5783419
2    3 -0.24872062 -0.73322697 1.00000000 1.0000000
3    4  1.41995983 -0.91833741 0.27967201 0.5047602
4    5 -0.01753979  1.78172679 0.08956765 0.4442470
5    9  0.21512818  1.42847478 0.28172663 0.5047602
6   10 -1.10068046 -0.09313516 0.01949563 0.4442470
> head(getBestTest(merged$id, tabled, weight=weighting))
  best       logFC      logCPM     PValue       FDR
1    1  0.21317827  0.53648572 0.46328451 0.5783419
2    2 -0.41696325  1.60566251 1.00000000 1.0000000
3    4  1.41995983 -0.91833741 0.27967201 0.5228651
4    5 -0.01753979  1.78172679 0.04669873 0.4255938
5    9  0.21512818  1.42847478 0.24536526 0.4795776
6   10 -1.10068046 -0.09313516 0.01949563 0.3373185
> head(getBestTest(merged$id, tabled, by.pval=FALSE))
  best       logFC      logCPM     PValue       FDR
1    1  0.21317827  0.53648572 0.46328451 0.5622769
2    2 -0.41696325  1.60566251 0.79272727 0.8116017
3    4  1.41995983 -0.91833741 0.27967201 0.5228651
4    5 -0.01753979  1.78172679 0.02985588 0.2567606
5    9  0.21512818  1.42847478 0.14086332 0.4038082
6   10 -1.10068046 -0.09313516 0.01949563 0.2567606
> 
> # Pulling out some diagnostics.
> suppressPackageStartupMessages(require(org.Mm.eg.db))
> suppressPackageStartupMessages(require(TxDb.Mmusculus.UCSC.mm10.knownGene))
> 
> current <- readRDS(system.file("exdata", "exrange.rds", package="csaw"))
> output <- detailRanges(current, TxDb.Mmusculus.UCSC.mm10.knownGene, org.Mm.eg.db)
> head(output$overlap)
[1] "Nrxn3|8|+"         ""                  ""                 
[4] "1700007G11Rik|I|+" "Mannr|2|+"         ""                 
> head(output$right)
[1] "Nrxn3|9|+[3846]" "Rprm|1|-[2293]"  ""                ""               
[5] ""                ""               
> head(output$left)
[1] ""                        ""                       
[3] ""                        "1700007G11Rik|5|+[2890]"
[5] ""                        ""                       
> 
> # Pulling out some reads. 
> extractReads(both.files[1], GRanges("chrA", IRanges(100, 500)))
GRanges object with 143 ranges and 0 metadata columns:
        seqnames     ranges strand
           <Rle>  <IRanges>  <Rle>
    [1]     chrA [ 94, 103]      +
    [2]     chrA [106, 115]      +
    [3]     chrA [120, 129]      +
    [4]     chrA [120, 129]      +
    [5]     chrA [129, 138]      +
    ...      ...        ...    ...
  [139]     chrA [467, 476]      -
  [140]     chrA [482, 491]      -
  [141]     chrA [490, 499]      -
  [142]     chrA [491, 500]      -
  [143]     chrA [499, 508]      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(both.files[1], GRanges("chrA", IRanges(50, 100)))
GRanges object with 27 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA  [43, 52]      +
   [2]     chrA  [51, 60]      +
   [3]     chrA  [57, 66]      +
   [4]     chrA  [62, 71]      +
   [5]     chrA  [63, 72]      +
   ...      ...       ...    ...
  [23]     chrA [79,  88]      -
  [24]     chrA [83,  92]      -
  [25]     chrA [88,  97]      -
  [26]     chrA [89,  98]      -
  [27]     chrA [93, 102]      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(both.files[1], GRanges("chrA", IRanges(50, 100)), param=readParam(dedup=TRUE))
GRanges object with 19 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA  [51, 60]      +
   [2]     chrA  [57, 66]      +
   [3]     chrA  [62, 71]      +
   [4]     chrA  [63, 72]      +
   [5]     chrA  [76, 85]      +
   ...      ...       ...    ...
  [15]     chrA [79,  88]      -
  [16]     chrA [79,  88]      -
  [17]     chrA [88,  97]      -
  [18]     chrA [89,  98]      -
  [19]     chrA [93, 102]      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(pe.file, GRanges("chrB", IRanges(50, 100)), param=readParam(pe="both"))
GRanges object with 3 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrB [50,  79]      *
  [2]     chrB [90,  99]      *
  [3]     chrB [99, 100]      *
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(pe.file, GRanges("chrB", IRanges(50, 100)), param=readParam(pe="second"))
GRanges object with 4 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrB [75,  84]      +
  [2]     chrB [90,  99]      +
  [3]     chrB [70,  79]      -
  [4]     chrB [99, 100]      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> 
> 
> proc.time()
   user  system elapsed 
 14.644   0.204  14.849 

csaw.Rcheck/tests_x64/test-basic.Rout.save


R Under development (unstable) (2017-10-27 r73632) -- "Unsuffered Consequences"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (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.

  Natural language support but running in an English locale

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.

> # This is a testing stub that just provides a basic run-through of all the methods.
> # The real tests are located in inst/tests along with a Bash script for execution
> # and comparison. The separation into two folders is necessary to keep R CMD check
> # running with reasonable speed.
> 
> suppressWarnings(suppressPackageStartupMessages(require(csaw)))
> both.files <- system.file("exdata", c("rep1.bam", "rep2.bam"), package="csaw")
> pe.file <- system.file("exdata", "pet.bam", package="csaw")
> 
> # Checking data quality prior to counting.
> head(correlateReads(both.files))
[1] -0.0137654663  0.0005571408  0.0175021237 -0.0308470292 -0.0087488234
[6] -0.0120687468
> head(correlateReads(both.files, cross=FALSE))
[1]  1.0000000000 -0.0008601215  0.0170688852 -0.0475443596  0.0028128511
[6] -0.0030687197
> 
> getPESizes(pe.file)
$sizes
[1]  70  90  20 150  10  30  10   2

$diagnostics
  total.reads  mapped.reads        single mate.unmapped    unoriented 
           23            23             3             0             1 
    inter.chr 
            1 

> 
> # Trying to count some single-end data.
> data <- windowCounts(both.files, ext=100)
> head(assay(data))
     [,1] [,2]
[1,]   43   71
[2,]   57   89
[3,]   56  120
[4,]   53  141
[5,]   40  152
[6,]   59  135
> rowRanges(data)
GRanges object with 71 ranges and 0 metadata columns:
       seqnames       ranges strand
          <Rle>    <IRanges>  <Rle>
   [1]     chrA   [  1,  50]      *
   [2]     chrA   [ 51, 100]      *
   [3]     chrA   [101, 150]      *
   [4]     chrA   [151, 200]      *
   [5]     chrA   [201, 250]      *
   ...      ...          ...    ...
  [67]     chrC [1101, 1150]      *
  [68]     chrC [1151, 1200]      *
  [69]     chrC [1201, 1250]      *
  [70]     chrC [1251, 1300]      *
  [71]     chrC [1301, 1345]      *
  -------
  seqinfo: 3 sequences from an unspecified genome
> data$totals
[1] 1349 3291
> 
> data <- windowCounts(both.files, width=500, spacing=200)
> head(assay(data))
     [,1] [,2]
[1,]  204  455
[2,]  195  510
[3,]  186  483
[4,]  200  501
[5,]  187  468
[6,]  127  311
> rowRanges(data)
GRanges object with 19 ranges and 0 metadata columns:
       seqnames       ranges strand
          <Rle>    <IRanges>  <Rle>
   [1]     chrA  [  1,  500]      *
   [2]     chrA  [201,  700]      *
   [3]     chrA  [401,  900]      *
   [4]     chrA  [601, 1100]      *
   [5]     chrA  [801, 1298]      *
   ...      ...          ...    ...
  [15]     chrC [ 401,  900]      *
  [16]     chrC [ 601, 1100]      *
  [17]     chrC [ 801, 1300]      *
  [18]     chrC [1001, 1345]      *
  [19]     chrC [1201, 1345]      *
  -------
  seqinfo: 3 sequences from an unspecified genome
> data$totals
[1] 1349 3291
> 
> data <- windowCounts(both.files, ext=100, param=readParam(minq=100))
> data$totals
[1]  914 2152
> data <- windowCounts(both.files, ext=100, param=readParam(dedup=TRUE))
> data$totals
[1] 1056 2582
> data <- windowCounts(both.files, ext=100, param=readParam(discard=GRanges("chrA", IRanges(50, 500))))
> data$totals
[1] 1186 2916
> data <- windowCounts(both.files, ext=100, param=readParam(restrict="chrA"))
> data$totals
[1]  451 1093
> 
> # Trying to count some paired-end data.
> out <- windowCounts(pe.file, param=readParam(pe="both"), width=100, filter=1L)
> assay(out)
     [,1]
[1,]    3
[2,]    4
[3,]    2
[4,]    1
[5,]    4
[6,]    3
> out$totals
[1] 8
> rowRanges(out)
GRanges object with 6 ranges and 0 metadata columns:
      seqnames     ranges strand
         <Rle>  <IRanges>  <Rle>
  [1]     chrA [  1, 100]      *
  [2]     chrA [ 51, 150]      *
  [3]     chrA [101, 200]      *
  [4]     chrA [151, 200]      *
  [5]     chrB [  1, 100]      *
  [6]     chrB [ 51, 100]      *
  -------
  seqinfo: 2 sequences from an unspecified genome
> out <- windowCounts(pe.file, param=readParam(pe="both", max.frag=100), width=100, filter=1L)
> assay(out)
     [,1]
[1,]    2
[2,]    3
[3,]    1
[4,]    4
[5,]    3
> out$totals
[1] 7
> rowRanges(out)
GRanges object with 5 ranges and 0 metadata columns:
      seqnames     ranges strand
         <Rle>  <IRanges>  <Rle>
  [1]     chrA [  1, 100]      *
  [2]     chrA [ 51, 150]      *
  [3]     chrA [101, 200]      *
  [4]     chrB [  1, 100]      *
  [5]     chrB [ 51, 100]      *
  -------
  seqinfo: 2 sequences from an unspecified genome
> out <- windowCounts(pe.file, param=readParam(pe="first"), width=100, filter=1L)
> assay(out)
     [,1]
[1,]    3
[2,]    4
[3,]    4
[4,]    2
[5,]    6
[6,]    6
> out$totals
[1] 10
> rowRanges(out)
GRanges object with 6 ranges and 0 metadata columns:
      seqnames     ranges strand
         <Rle>  <IRanges>  <Rle>
  [1]     chrA [  1, 100]      *
  [2]     chrA [ 51, 150]      *
  [3]     chrA [101, 200]      *
  [4]     chrA [151, 200]      *
  [5]     chrB [  1, 100]      *
  [6]     chrB [ 51, 100]      *
  -------
  seqinfo: 2 sequences from an unspecified genome
> 
> # Trying to convert it to a DGEList.
> asDGEList(data)
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1      451            1
Sample2     1     1093            1

> asDGEList(data, lib.size=c(10, 10))
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1       10            1
Sample2     1       10            1

> asDGEList(data, norm=c(1,2))
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1      451            1
Sample2     1     1093            2

> 
> temp <- data 
> temp$totals <- NULL 
> asDGEList(temp) # Should spit out a warning.
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1     1293            1
Sample2     1     3142            1

Warning message:
In .local(object, ...) :
  library sizes not found in 'totals', setting to NULL
> 
> # Running some basic normalization.
> data <- windowCounts(both.files, ext=100, param=readParam(minq=100, dedup=TRUE))
> 
> normOffsets(assay(data), lib.size=data$totals)
[1] 1.001197 0.998804
> normOffsets(assay(data), lib.size=data$totals, logratioTrim=.2)
[1] 1.003816 0.996199
> normOffsets(assay(data), lib.size=data$totals, method="RLE")
[1] 1.0037890 0.9962253
> normOffsets(data)
class: RangedSummarizedExperiment 
dim: 71 2 
metadata(6): spacing width ... param final.ext
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(5): bam.files totals ext rlen norm.factors
> normOffsets(data, logratioTrim=0.1)
class: RangedSummarizedExperiment 
dim: 71 2 
metadata(6): spacing width ... param final.ext
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(5): bam.files totals ext rlen norm.factors
> normOffsets(data, method="upperquartile")
class: RangedSummarizedExperiment 
dim: 71 2 
metadata(6): spacing width ... param final.ext
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(5): bam.files totals ext rlen norm.factors
> 
> head(normOffsets(assay(data), lib.size=data$totals, type="loess"))
           [,1]      [,2]
[1,] -0.4047876 0.4047876
[2,] -0.4328410 0.4328410
[3,] -0.3864553 0.3864553
[4,] -0.4101296 0.4101296
[5,] -0.3788945 0.3788945
[6,] -0.3514597 0.3514597
> head(normOffsets(assay(data), lib.size=data$totals, type="loess", span=0.7))
           [,1]      [,2]
[1,] -0.4297765 0.4297765
[2,] -0.4391936 0.4391936
[3,] -0.3867962 0.3867962
[4,] -0.4215479 0.4215479
[5,] -0.3858107 0.3858107
[6,] -0.3915074 0.3915074
> head(normOffsets(data, type="loess"))
class: RangedSummarizedExperiment 
dim: 6 2 
metadata(6): spacing width ... param final.ext
assays(2): counts offset
rownames: NULL
rowData names(0):
colnames: NULL
colData names(4): bam.files totals ext rlen
> head(normOffsets(data, type="loess", span=0.5))
class: RangedSummarizedExperiment 
dim: 6 2 
metadata(6): spacing width ... param final.ext
assays(2): counts offset
rownames: NULL
rowData names(0):
colnames: NULL
colData names(4): bam.files totals ext rlen
> 
> # Assuming someone went around and pulled out some p-values for everybody.
> set.seed(128145-19238)
> nr <- nrow(data)
> tabled <- data.frame(logFC=rnorm(nr), logCPM=rnorm(nr), PValue=rbeta(nr, 1, 2))
> weighting <- rgamma(nr, 2, 1)
> 
> mergeWindows(rowRanges(data), -1)
$id
 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
[26] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
[51] 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71

$region
GRanges object with 71 ranges and 0 metadata columns:
       seqnames       ranges strand
          <Rle>    <IRanges>  <Rle>
   [1]     chrA   [  1,  50]      *
   [2]     chrA   [ 51, 100]      *
   [3]     chrA   [101, 150]      *
   [4]     chrA   [151, 200]      *
   [5]     chrA   [201, 250]      *
   ...      ...          ...    ...
  [67]     chrC [1101, 1150]      *
  [68]     chrC [1151, 1200]      *
  [69]     chrC [1201, 1250]      *
  [70]     chrC [1251, 1300]      *
  [71]     chrC [1301, 1345]      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> mergeWindows(rowRanges(data), 100)
$id
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
[39] 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

$region
GRanges object with 3 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrA [1, 1298]      *
  [2]     chrB [1,  870]      *
  [3]     chrC [1, 1345]      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> mergeWindows(rowRanges(data), 100, max.width=500)
$id
 [1] 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 5 5 5
[39] 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8

$region
GRanges object with 8 ranges and 0 metadata columns:
      seqnames      ranges strand
         <Rle>   <IRanges>  <Rle>
  [1]     chrA [  1,  450]      *
  [2]     chrA [451,  850]      *
  [3]     chrA [851, 1298]      *
  [4]     chrB [  1,  450]      *
  [5]     chrB [451,  870]      *
  [6]     chrC [  1,  450]      *
  [7]     chrC [451,  900]      *
  [8]     chrC [901, 1345]      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> merged <- mergeWindows(rowRanges(data), 100, sign=tabled$logFC > 0)
> merged
$id
 [1]  1  2  2  3  4  4  4  5  5  6  7  8  9  9  9  9 10 10 11 12 13 14 15 15 15
[26] 15 16 17 18 18 18 18 18 19 19 20 21 22 23 24 24 25 25 26 27 28 29 29 30 30
[51] 31 31 31 31 32 33 34 34 34 34 35 36 37 37 38 39 40 41 41 42 43

$region
GRanges object with 43 ranges and 0 metadata columns:
       seqnames       ranges strand
          <Rle>    <IRanges>  <Rle>
   [1]     chrA   [  1,  50]      *
   [2]     chrA   [ 51, 150]      *
   [3]     chrA   [151, 200]      *
   [4]     chrA   [201, 350]      *
   [5]     chrA   [351, 450]      *
   ...      ...          ...    ...
  [39]     chrC [1051, 1100]      *
  [40]     chrC [1101, 1150]      *
  [41]     chrC [1151, 1250]      *
  [42]     chrC [1251, 1300]      *
  [43]     chrC [1301, 1345]      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> 
> head(combineTests(merged$id, tabled))
  nWindows logFC.up logFC.down     PValue       FDR direction
1        1        0          0 0.46328451 0.5622769        up
2        2        0          0 0.79272727 0.8116017      down
3        1        1          0 0.27967201 0.5047602        up
4        3        0          1 0.08956765 0.4125151      down
5        2        1          0 0.28172663 0.5047602        up
6        1        0          1 0.01949563 0.4125151      down
> head(combineTests(merged$id, tabled, weight=weighting))
  nWindows logFC.up logFC.down     PValue       FDR direction
1        1        0          0 0.46328451 0.5622769        up
2        2        0          0 0.79272727 0.8116017      down
3        1        1          0 0.27967201 0.5228651        up
4        3        0          1 0.04669873 0.4255938      down
5        2        1          0 0.24536526 0.4795776        up
6        1        0          1 0.01949563 0.3373185      down
> 
> head(getBestTest(merged$id, tabled))
  best       logFC      logCPM     PValue       FDR
1    1  0.21317827  0.53648572 0.46328451 0.5783419
2    3 -0.24872062 -0.73322697 1.00000000 1.0000000
3    4  1.41995983 -0.91833741 0.27967201 0.5047602
4    5 -0.01753979  1.78172679 0.08956765 0.4442470
5    9  0.21512818  1.42847478 0.28172663 0.5047602
6   10 -1.10068046 -0.09313516 0.01949563 0.4442470
> head(getBestTest(merged$id, tabled, weight=weighting))
  best       logFC      logCPM     PValue       FDR
1    1  0.21317827  0.53648572 0.46328451 0.5783419
2    2 -0.41696325  1.60566251 1.00000000 1.0000000
3    4  1.41995983 -0.91833741 0.27967201 0.5228651
4    5 -0.01753979  1.78172679 0.04669873 0.4255938
5    9  0.21512818  1.42847478 0.24536526 0.4795776
6   10 -1.10068046 -0.09313516 0.01949563 0.3373185
> head(getBestTest(merged$id, tabled, by.pval=FALSE))
  best       logFC      logCPM     PValue       FDR
1    1  0.21317827  0.53648572 0.46328451 0.5622769
2    2 -0.41696325  1.60566251 0.79272727 0.8116017
3    4  1.41995983 -0.91833741 0.27967201 0.5228651
4    5 -0.01753979  1.78172679 0.02985588 0.2567606
5    9  0.21512818  1.42847478 0.14086332 0.4038082
6   10 -1.10068046 -0.09313516 0.01949563 0.2567606
> 
> # Pulling out some diagnostics.
> suppressPackageStartupMessages(require(org.Mm.eg.db))
> suppressPackageStartupMessages(require(TxDb.Mmusculus.UCSC.mm10.knownGene))
> 
> current <- readRDS(system.file("exdata", "exrange.rds", package="csaw"))
> output <- detailRanges(current, TxDb.Mmusculus.UCSC.mm10.knownGene, org.Mm.eg.db)
> head(output$overlap)
[1] "Nrxn3|8|+"         ""                  ""                 
[4] "1700007G11Rik|I|+" "Mannr|2|+"         ""                 
> head(output$right)
[1] "Nrxn3|9|+[3846]" "Rprm|1|-[2293]"  ""                ""               
[5] ""                ""               
> head(output$left)
[1] ""                        ""                       
[3] ""                        "1700007G11Rik|5|+[2890]"
[5] ""                        ""                       
> 
> # Pulling out some reads. 
> extractReads(both.files[1], GRanges("chrA", IRanges(100, 500)))
GRanges object with 143 ranges and 0 metadata columns:
        seqnames     ranges strand
           <Rle>  <IRanges>  <Rle>
    [1]     chrA [ 94, 103]      +
    [2]     chrA [106, 115]      +
    [3]     chrA [120, 129]      +
    [4]     chrA [120, 129]      +
    [5]     chrA [129, 138]      +
    ...      ...        ...    ...
  [139]     chrA [467, 476]      -
  [140]     chrA [482, 491]      -
  [141]     chrA [490, 499]      -
  [142]     chrA [491, 500]      -
  [143]     chrA [499, 508]      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(both.files[1], GRanges("chrA", IRanges(50, 100)))
GRanges object with 27 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA  [43, 52]      +
   [2]     chrA  [51, 60]      +
   [3]     chrA  [57, 66]      +
   [4]     chrA  [62, 71]      +
   [5]     chrA  [63, 72]      +
   ...      ...       ...    ...
  [23]     chrA [79,  88]      -
  [24]     chrA [83,  92]      -
  [25]     chrA [88,  97]      -
  [26]     chrA [89,  98]      -
  [27]     chrA [93, 102]      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(both.files[1], GRanges("chrA", IRanges(50, 100)), param=readParam(dedup=TRUE))
GRanges object with 19 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA  [51, 60]      +
   [2]     chrA  [57, 66]      +
   [3]     chrA  [62, 71]      +
   [4]     chrA  [63, 72]      +
   [5]     chrA  [76, 85]      +
   ...      ...       ...    ...
  [15]     chrA [79,  88]      -
  [16]     chrA [79,  88]      -
  [17]     chrA [88,  97]      -
  [18]     chrA [89,  98]      -
  [19]     chrA [93, 102]      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(pe.file, GRanges("chrB", IRanges(50, 100)), param=readParam(pe="both"))
GRanges object with 3 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrB [50,  79]      *
  [2]     chrB [90,  99]      *
  [3]     chrB [99, 100]      *
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(pe.file, GRanges("chrB", IRanges(50, 100)), param=readParam(pe="second"))
GRanges object with 4 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrB [75,  84]      +
  [2]     chrB [90,  99]      +
  [3]     chrB [70,  79]      -
  [4]     chrB [99, 100]      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> 
> 
> proc.time()
   user  system elapsed 
 14.644   0.204  14.849 

csaw.Rcheck/tests_i386/test-basic.Rout


R version 3.5.1 Patched (2018-07-24 r75005) -- "Feather Spray"
Copyright (C) 2018 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.

> # This is a testing stub that just provides a basic run-through of all the methods.
> # The real tests are located in inst/tests along with a Bash script for execution
> # and comparison. The separation into two folders is necessary to keep R CMD check
> # running with reasonable speed.
> 
> suppressWarnings(suppressPackageStartupMessages(require(csaw)))
> both.files <- system.file("exdata", c("rep1.bam", "rep2.bam"), package="csaw")
> pe.file <- system.file("exdata", "pet.bam", package="csaw")
> 
> # Checking data quality prior to counting.
> head(correlateReads(both.files))
[1] -0.0137654663  0.0005571408  0.0175021237 -0.0308470292 -0.0087488234
[6] -0.0120687468
> head(correlateReads(both.files, cross=FALSE))
[1]  1.0000000000 -0.0008601215  0.0170688852 -0.0475443596  0.0028128511
[6] -0.0030687197
> 
> getPESizes(pe.file)
$sizes
[1]  70  90  20 150  10  30  10   2

$diagnostics
  total.reads  mapped.reads        single mate.unmapped    unoriented 
           23            23             3             0             1 
    inter.chr 
            1 

> 
> # Trying to count some single-end data.
> data <- windowCounts(both.files, ext=100)
> head(assay(data))
     [,1] [,2]
[1,]   43   71
[2,]   57   89
[3,]   56  120
[4,]   53  141
[5,]   40  152
[6,]   59  135
> rowRanges(data)
GRanges object with 71 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA      1-50      *
   [2]     chrA    51-100      *
   [3]     chrA   101-150      *
   [4]     chrA   151-200      *
   [5]     chrA   201-250      *
   ...      ...       ...    ...
  [67]     chrC 1101-1150      *
  [68]     chrC 1151-1200      *
  [69]     chrC 1201-1250      *
  [70]     chrC 1251-1300      *
  [71]     chrC 1301-1345      *
  -------
  seqinfo: 3 sequences from an unspecified genome
> data$totals
[1] 1349 3291
> 
> data <- windowCounts(both.files, width=500, spacing=200)
> head(assay(data))
     [,1] [,2]
[1,]  204  455
[2,]  195  510
[3,]  186  483
[4,]  200  501
[5,]  187  468
[6,]  127  311
> rowRanges(data)
GRanges object with 19 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA     1-500      *
   [2]     chrA   201-700      *
   [3]     chrA   401-900      *
   [4]     chrA  601-1100      *
   [5]     chrA  801-1298      *
   ...      ...       ...    ...
  [15]     chrC   401-900      *
  [16]     chrC  601-1100      *
  [17]     chrC  801-1300      *
  [18]     chrC 1001-1345      *
  [19]     chrC 1201-1345      *
  -------
  seqinfo: 3 sequences from an unspecified genome
> data$totals
[1] 1349 3291
> 
> data <- windowCounts(both.files, ext=100, param=readParam(minq=100))
> data$totals
[1]  914 2152
> data <- windowCounts(both.files, ext=100, param=readParam(dedup=TRUE))
> data$totals
[1] 1056 2582
> data <- windowCounts(both.files, ext=100, param=readParam(discard=GRanges("chrA", IRanges(50, 500))))
> data$totals
[1] 1186 2916
> data <- windowCounts(both.files, ext=100, param=readParam(restrict="chrA"))
> data$totals
[1]  451 1093
> 
> # Trying to count some paired-end data.
> out <- windowCounts(pe.file, param=readParam(pe="both"), width=100, filter=1L)
> assay(out)
     [,1]
[1,]    3
[2,]    4
[3,]    2
[4,]    1
[5,]    4
[6,]    3
> out$totals
[1] 8
> rowRanges(out)
GRanges object with 6 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrA     1-100      *
  [2]     chrA    51-150      *
  [3]     chrA   101-200      *
  [4]     chrA   151-200      *
  [5]     chrB     1-100      *
  [6]     chrB    51-100      *
  -------
  seqinfo: 2 sequences from an unspecified genome
> out <- windowCounts(pe.file, param=readParam(pe="both", max.frag=100), width=100, filter=1L)
> assay(out)
     [,1]
[1,]    2
[2,]    3
[3,]    1
[4,]    4
[5,]    3
> out$totals
[1] 7
> rowRanges(out)
GRanges object with 5 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrA     1-100      *
  [2]     chrA    51-150      *
  [3]     chrA   101-200      *
  [4]     chrB     1-100      *
  [5]     chrB    51-100      *
  -------
  seqinfo: 2 sequences from an unspecified genome
> out <- windowCounts(pe.file, param=readParam(pe="first"), width=100, filter=1L)
> assay(out)
     [,1]
[1,]    3
[2,]    4
[3,]    4
[4,]    2
[5,]    6
[6,]    6
> out$totals
[1] 10
> rowRanges(out)
GRanges object with 6 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrA     1-100      *
  [2]     chrA    51-150      *
  [3]     chrA   101-200      *
  [4]     chrA   151-200      *
  [5]     chrB     1-100      *
  [6]     chrB    51-100      *
  -------
  seqinfo: 2 sequences from an unspecified genome
> 
> # Trying to convert it to a DGEList.
> asDGEList(data)
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1      451            1
Sample2     1     1093            1

> asDGEList(data, lib.size=c(10, 10))
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1       10            1
Sample2     1       10            1

> asDGEList(data, norm=c(1,2))
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1      451            1
Sample2     1     1093            2

> 
> temp <- data 
> temp$totals <- NULL 
> asDGEList(temp) # Should spit out a warning.
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1     1293            1
Sample2     1     3142            1

[W::bgzf_read_block] EOF marker is absent. The input is probably truncated
Warning message:
In .local(object, ...) :
  library sizes not found in 'totals', setting to NULL
> 
> # Running some basic normalization.
> data <- windowCounts(both.files, ext=100, param=readParam(minq=100, dedup=TRUE))
> 
> normOffsets(assay(data), lib.size=data$totals)
[1] 1.001197 0.998804
> normOffsets(assay(data), lib.size=data$totals, logratioTrim=.2)
[1] 1.003816 0.996199
> normOffsets(assay(data), lib.size=data$totals, method="RLE")
[1] 1.0037890 0.9962253
> normOffsets(data)
class: RangedSummarizedExperiment 
dim: 71 2 
metadata(6): spacing width ... param final.ext
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(5): bam.files totals ext rlen norm.factors
> normOffsets(data, logratioTrim=0.1)
class: RangedSummarizedExperiment 
dim: 71 2 
metadata(6): spacing width ... param final.ext
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(5): bam.files totals ext rlen norm.factors
> normOffsets(data, method="upperquartile")
class: RangedSummarizedExperiment 
dim: 71 2 
metadata(6): spacing width ... param final.ext
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(5): bam.files totals ext rlen norm.factors
> 
> head(normOffsets(assay(data), lib.size=data$totals, type="loess"))
           [,1]      [,2]
[1,] -0.4047876 0.4047876
[2,] -0.4328410 0.4328410
[3,] -0.3864553 0.3864553
[4,] -0.4101296 0.4101296
[5,] -0.3788945 0.3788945
[6,] -0.3514597 0.3514597
> head(normOffsets(assay(data), lib.size=data$totals, type="loess", span=0.7))
           [,1]      [,2]
[1,] -0.4297765 0.4297765
[2,] -0.4391936 0.4391936
[3,] -0.3867962 0.3867962
[4,] -0.4215479 0.4215479
[5,] -0.3858107 0.3858107
[6,] -0.3915074 0.3915074
> head(normOffsets(data, type="loess"))
class: RangedSummarizedExperiment 
dim: 6 2 
metadata(6): spacing width ... param final.ext
assays(2): counts offset
rownames: NULL
rowData names(0):
colnames: NULL
colData names(4): bam.files totals ext rlen
> head(normOffsets(data, type="loess", span=0.5))
class: RangedSummarizedExperiment 
dim: 6 2 
metadata(6): spacing width ... param final.ext
assays(2): counts offset
rownames: NULL
rowData names(0):
colnames: NULL
colData names(4): bam.files totals ext rlen
> 
> # Assuming someone went around and pulled out some p-values for everybody.
> set.seed(128145-19238)
> nr <- nrow(data)
> tabled <- data.frame(logFC=rnorm(nr), logCPM=rnorm(nr), PValue=rbeta(nr, 1, 2))
> weighting <- rgamma(nr, 2, 1)
> 
> mergeWindows(rowRanges(data), -1)
$id
 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
[26] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
[51] 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71

$region
GRanges object with 71 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA      1-50      *
   [2]     chrA    51-100      *
   [3]     chrA   101-150      *
   [4]     chrA   151-200      *
   [5]     chrA   201-250      *
   ...      ...       ...    ...
  [67]     chrC 1101-1150      *
  [68]     chrC 1151-1200      *
  [69]     chrC 1201-1250      *
  [70]     chrC 1251-1300      *
  [71]     chrC 1301-1345      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> mergeWindows(rowRanges(data), 100)
$id
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
[39] 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

$region
GRanges object with 3 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrA    1-1298      *
  [2]     chrB     1-870      *
  [3]     chrC    1-1345      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> mergeWindows(rowRanges(data), 100, max.width=500)
$id
 [1] 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 5 5 5
[39] 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8

$region
GRanges object with 8 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrA     1-450      *
  [2]     chrA   451-850      *
  [3]     chrA  851-1298      *
  [4]     chrB     1-450      *
  [5]     chrB   451-870      *
  [6]     chrC     1-450      *
  [7]     chrC   451-900      *
  [8]     chrC  901-1345      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> merged <- mergeWindows(rowRanges(data), 100, sign=tabled$logFC > 0)
> merged
$id
 [1]  1  2  2  3  4  4  4  5  5  6  7  8  9  9  9  9 10 10 11 12 13 14 15 15 15
[26] 15 16 17 18 18 18 18 18 19 19 20 21 22 23 24 24 25 25 26 27 28 29 29 30 30
[51] 31 31 31 31 32 33 34 34 34 34 35 36 37 37 38 39 40 41 41 42 43

$region
GRanges object with 43 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA      1-50      *
   [2]     chrA    51-150      *
   [3]     chrA   151-200      *
   [4]     chrA   201-350      *
   [5]     chrA   351-450      *
   ...      ...       ...    ...
  [39]     chrC 1051-1100      *
  [40]     chrC 1101-1150      *
  [41]     chrC 1151-1250      *
  [42]     chrC 1251-1300      *
  [43]     chrC 1301-1345      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> 
> head(combineTests(merged$id, tabled))
  nWindows logFC.up logFC.down     PValue       FDR direction
1        1        0          0 0.46328451 0.5622769        up
2        2        0          0 0.79272727 0.8116017      down
3        1        1          0 0.27967201 0.5047602        up
4        3        0          1 0.08956765 0.4125151      down
5        2        1          0 0.28172663 0.5047602        up
6        1        0          1 0.01949563 0.4125151      down
> head(combineTests(merged$id, tabled, weight=weighting))
  nWindows logFC.up logFC.down     PValue       FDR direction
1        1        0          0 0.46328451 0.5622769        up
2        2        0          0 0.79272727 0.8116017      down
3        1        1          0 0.27967201 0.5228651        up
4        3        0          1 0.04669873 0.4255938      down
5        2        1          0 0.24536526 0.4795776        up
6        1        0          1 0.01949563 0.3373185      down
> 
> head(getBestTest(merged$id, tabled))
  best       logFC      logCPM     PValue       FDR
1    1  0.21317827  0.53648572 0.46328451 0.5783419
2    3 -0.24872062 -0.73322697 1.00000000 1.0000000
3    4  1.41995983 -0.91833741 0.27967201 0.5047602
4    5 -0.01753979  1.78172679 0.08956765 0.4442470
5    9  0.21512818  1.42847478 0.28172663 0.5047602
6   10 -1.10068046 -0.09313516 0.01949563 0.4442470
> head(getBestTest(merged$id, tabled, weight=weighting))
  best       logFC      logCPM     PValue       FDR
1    1  0.21317827  0.53648572 0.46328451 0.5783419
2    2 -0.41696325  1.60566251 1.00000000 1.0000000
3    4  1.41995983 -0.91833741 0.27967201 0.5228651
4    5 -0.01753979  1.78172679 0.04669873 0.4255938
5    9  0.21512818  1.42847478 0.24536526 0.4795776
6   10 -1.10068046 -0.09313516 0.01949563 0.3373185
> head(getBestTest(merged$id, tabled, by.pval=FALSE))
  best       logFC      logCPM     PValue       FDR
1    1  0.21317827  0.53648572 0.46328451 0.5622769
2    2 -0.41696325  1.60566251 0.79272727 0.8116017
3    4  1.41995983 -0.91833741 0.27967201 0.5228651
4    5 -0.01753979  1.78172679 0.02985588 0.2567606
5    9  0.21512818  1.42847478 0.14086332 0.4038082
6   10 -1.10068046 -0.09313516 0.01949563 0.2567606
> 
> # Pulling out some diagnostics.
> suppressPackageStartupMessages(require(org.Mm.eg.db))
> suppressPackageStartupMessages(require(TxDb.Mmusculus.UCSC.mm10.knownGene))
> 
> current <- readRDS(system.file("exdata", "exrange.rds", package="csaw"))
> output <- detailRanges(current, TxDb.Mmusculus.UCSC.mm10.knownGene, org.Mm.eg.db)
> head(output$overlap)
[1] "Nrxn3|8|+"         ""                  ""                 
[4] "1700007G11Rik|I|+" "Mannr|2|+"         ""                 
> head(output$right)
[1] "Nrxn3|9|+[3846]" "Rprm|1|-[2293]"  ""                ""               
[5] ""                ""               
> head(output$left)
[1] ""                        ""                       
[3] ""                        "1700007G11Rik|5|+[2890]"
[5] ""                        ""                       
> 
> # Pulling out some reads. 
> extractReads(both.files[1], GRanges("chrA", IRanges(100, 500)))
GRanges object with 143 ranges and 0 metadata columns:
        seqnames    ranges strand
           <Rle> <IRanges>  <Rle>
    [1]     chrA    94-103      +
    [2]     chrA   106-115      +
    [3]     chrA   120-129      +
    [4]     chrA   120-129      +
    [5]     chrA   129-138      +
    ...      ...       ...    ...
  [139]     chrA   467-476      -
  [140]     chrA   482-491      -
  [141]     chrA   490-499      -
  [142]     chrA   491-500      -
  [143]     chrA   499-508      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(both.files[1], GRanges("chrA", IRanges(50, 100)))
GRanges object with 27 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA     43-52      +
   [2]     chrA     51-60      +
   [3]     chrA     57-66      +
   [4]     chrA     62-71      +
   [5]     chrA     63-72      +
   ...      ...       ...    ...
  [23]     chrA     79-88      -
  [24]     chrA     83-92      -
  [25]     chrA     88-97      -
  [26]     chrA     89-98      -
  [27]     chrA    93-102      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(both.files[1], GRanges("chrA", IRanges(50, 100)), param=readParam(dedup=TRUE))
GRanges object with 19 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA     51-60      +
   [2]     chrA     57-66      +
   [3]     chrA     62-71      +
   [4]     chrA     63-72      +
   [5]     chrA     76-85      +
   ...      ...       ...    ...
  [15]     chrA     79-88      -
  [16]     chrA     79-88      -
  [17]     chrA     88-97      -
  [18]     chrA     89-98      -
  [19]     chrA    93-102      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(pe.file, GRanges("chrB", IRanges(50, 100)), param=readParam(pe="both"))
GRanges object with 3 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrB     50-79      *
  [2]     chrB     90-99      *
  [3]     chrB    99-100      *
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(pe.file, GRanges("chrB", IRanges(50, 100)), param=readParam(pe="second"))
GRanges object with 4 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrB     75-84      +
  [2]     chrB     90-99      +
  [3]     chrB     70-79      -
  [4]     chrB    99-100      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> 
> 
> proc.time()
   user  system elapsed 
  17.82    1.17   19.00 

csaw.Rcheck/tests_x64/test-basic.Rout


R version 3.5.1 Patched (2018-07-24 r75005) -- "Feather Spray"
Copyright (C) 2018 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.

> # This is a testing stub that just provides a basic run-through of all the methods.
> # The real tests are located in inst/tests along with a Bash script for execution
> # and comparison. The separation into two folders is necessary to keep R CMD check
> # running with reasonable speed.
> 
> suppressWarnings(suppressPackageStartupMessages(require(csaw)))
> both.files <- system.file("exdata", c("rep1.bam", "rep2.bam"), package="csaw")
> pe.file <- system.file("exdata", "pet.bam", package="csaw")
> 
> # Checking data quality prior to counting.
> head(correlateReads(both.files))
[1] -0.0137654663  0.0005571408  0.0175021237 -0.0308470292 -0.0087488234
[6] -0.0120687468
> head(correlateReads(both.files, cross=FALSE))
[1]  1.0000000000 -0.0008601215  0.0170688852 -0.0475443596  0.0028128511
[6] -0.0030687197
> 
> getPESizes(pe.file)
$sizes
[1]  70  90  20 150  10  30  10   2

$diagnostics
  total.reads  mapped.reads        single mate.unmapped    unoriented 
           23            23             3             0             1 
    inter.chr 
            1 

> 
> # Trying to count some single-end data.
> data <- windowCounts(both.files, ext=100)
> head(assay(data))
     [,1] [,2]
[1,]   43   71
[2,]   57   89
[3,]   56  120
[4,]   53  141
[5,]   40  152
[6,]   59  135
> rowRanges(data)
GRanges object with 71 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA      1-50      *
   [2]     chrA    51-100      *
   [3]     chrA   101-150      *
   [4]     chrA   151-200      *
   [5]     chrA   201-250      *
   ...      ...       ...    ...
  [67]     chrC 1101-1150      *
  [68]     chrC 1151-1200      *
  [69]     chrC 1201-1250      *
  [70]     chrC 1251-1300      *
  [71]     chrC 1301-1345      *
  -------
  seqinfo: 3 sequences from an unspecified genome
> data$totals
[1] 1349 3291
> 
> data <- windowCounts(both.files, width=500, spacing=200)
> head(assay(data))
     [,1] [,2]
[1,]  204  455
[2,]  195  510
[3,]  186  483
[4,]  200  501
[5,]  187  468
[6,]  127  311
> rowRanges(data)
GRanges object with 19 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA     1-500      *
   [2]     chrA   201-700      *
   [3]     chrA   401-900      *
   [4]     chrA  601-1100      *
   [5]     chrA  801-1298      *
   ...      ...       ...    ...
  [15]     chrC   401-900      *
  [16]     chrC  601-1100      *
  [17]     chrC  801-1300      *
  [18]     chrC 1001-1345      *
  [19]     chrC 1201-1345      *
  -------
  seqinfo: 3 sequences from an unspecified genome
> data$totals
[1] 1349 3291
> 
> data <- windowCounts(both.files, ext=100, param=readParam(minq=100))
> data$totals
[1]  914 2152
> data <- windowCounts(both.files, ext=100, param=readParam(dedup=TRUE))
> data$totals
[1] 1056 2582
> data <- windowCounts(both.files, ext=100, param=readParam(discard=GRanges("chrA", IRanges(50, 500))))
> data$totals
[1] 1186 2916
> data <- windowCounts(both.files, ext=100, param=readParam(restrict="chrA"))
> data$totals
[1]  451 1093
> 
> # Trying to count some paired-end data.
> out <- windowCounts(pe.file, param=readParam(pe="both"), width=100, filter=1L)
> assay(out)
     [,1]
[1,]    3
[2,]    4
[3,]    2
[4,]    1
[5,]    4
[6,]    3
> out$totals
[1] 8
> rowRanges(out)
GRanges object with 6 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrA     1-100      *
  [2]     chrA    51-150      *
  [3]     chrA   101-200      *
  [4]     chrA   151-200      *
  [5]     chrB     1-100      *
  [6]     chrB    51-100      *
  -------
  seqinfo: 2 sequences from an unspecified genome
> out <- windowCounts(pe.file, param=readParam(pe="both", max.frag=100), width=100, filter=1L)
> assay(out)
     [,1]
[1,]    2
[2,]    3
[3,]    1
[4,]    4
[5,]    3
> out$totals
[1] 7
> rowRanges(out)
GRanges object with 5 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrA     1-100      *
  [2]     chrA    51-150      *
  [3]     chrA   101-200      *
  [4]     chrB     1-100      *
  [5]     chrB    51-100      *
  -------
  seqinfo: 2 sequences from an unspecified genome
> out <- windowCounts(pe.file, param=readParam(pe="first"), width=100, filter=1L)
> assay(out)
     [,1]
[1,]    3
[2,]    4
[3,]    4
[4,]    2
[5,]    6
[6,]    6
> out$totals
[1] 10
> rowRanges(out)
GRanges object with 6 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrA     1-100      *
  [2]     chrA    51-150      *
  [3]     chrA   101-200      *
  [4]     chrA   151-200      *
  [5]     chrB     1-100      *
  [6]     chrB    51-100      *
  -------
  seqinfo: 2 sequences from an unspecified genome
> 
> # Trying to convert it to a DGEList.
> asDGEList(data)
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1      451            1
Sample2     1     1093            1

> asDGEList(data, lib.size=c(10, 10))
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1       10            1
Sample2     1       10            1

> asDGEList(data, norm=c(1,2))
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1      451            1
Sample2     1     1093            2

> 
> temp <- data 
> temp$totals <- NULL 
> asDGEList(temp) # Should spit out a warning.
An object of class "DGEList"
$counts
  Sample1 Sample2
1      43      71
2      57      89
3      56     120
4      53     141
5      40     152
21 more rows ...

$samples
        group lib.size norm.factors
Sample1     1     1293            1
Sample2     1     3142            1

[W::bgzf_read_block] EOF marker is absent. The input is probably truncated
Warning message:
In .local(object, ...) :
  library sizes not found in 'totals', setting to NULL
> 
> # Running some basic normalization.
> data <- windowCounts(both.files, ext=100, param=readParam(minq=100, dedup=TRUE))
> 
> normOffsets(assay(data), lib.size=data$totals)
[1] 1.001197 0.998804
> normOffsets(assay(data), lib.size=data$totals, logratioTrim=.2)
[1] 1.003816 0.996199
> normOffsets(assay(data), lib.size=data$totals, method="RLE")
[1] 1.0037890 0.9962253
> normOffsets(data)
class: RangedSummarizedExperiment 
dim: 71 2 
metadata(6): spacing width ... param final.ext
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(5): bam.files totals ext rlen norm.factors
> normOffsets(data, logratioTrim=0.1)
class: RangedSummarizedExperiment 
dim: 71 2 
metadata(6): spacing width ... param final.ext
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(5): bam.files totals ext rlen norm.factors
> normOffsets(data, method="upperquartile")
class: RangedSummarizedExperiment 
dim: 71 2 
metadata(6): spacing width ... param final.ext
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(5): bam.files totals ext rlen norm.factors
> 
> head(normOffsets(assay(data), lib.size=data$totals, type="loess"))
           [,1]      [,2]
[1,] -0.4047876 0.4047876
[2,] -0.4328410 0.4328410
[3,] -0.3864553 0.3864553
[4,] -0.4101296 0.4101296
[5,] -0.3788945 0.3788945
[6,] -0.3514597 0.3514597
> head(normOffsets(assay(data), lib.size=data$totals, type="loess", span=0.7))
           [,1]      [,2]
[1,] -0.4297765 0.4297765
[2,] -0.4391936 0.4391936
[3,] -0.3867962 0.3867962
[4,] -0.4215479 0.4215479
[5,] -0.3858107 0.3858107
[6,] -0.3915074 0.3915074
> head(normOffsets(data, type="loess"))
class: RangedSummarizedExperiment 
dim: 6 2 
metadata(6): spacing width ... param final.ext
assays(2): counts offset
rownames: NULL
rowData names(0):
colnames: NULL
colData names(4): bam.files totals ext rlen
> head(normOffsets(data, type="loess", span=0.5))
class: RangedSummarizedExperiment 
dim: 6 2 
metadata(6): spacing width ... param final.ext
assays(2): counts offset
rownames: NULL
rowData names(0):
colnames: NULL
colData names(4): bam.files totals ext rlen
> 
> # Assuming someone went around and pulled out some p-values for everybody.
> set.seed(128145-19238)
> nr <- nrow(data)
> tabled <- data.frame(logFC=rnorm(nr), logCPM=rnorm(nr), PValue=rbeta(nr, 1, 2))
> weighting <- rgamma(nr, 2, 1)
> 
> mergeWindows(rowRanges(data), -1)
$id
 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
[26] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
[51] 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71

$region
GRanges object with 71 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA      1-50      *
   [2]     chrA    51-100      *
   [3]     chrA   101-150      *
   [4]     chrA   151-200      *
   [5]     chrA   201-250      *
   ...      ...       ...    ...
  [67]     chrC 1101-1150      *
  [68]     chrC 1151-1200      *
  [69]     chrC 1201-1250      *
  [70]     chrC 1251-1300      *
  [71]     chrC 1301-1345      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> mergeWindows(rowRanges(data), 100)
$id
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
[39] 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

$region
GRanges object with 3 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrA    1-1298      *
  [2]     chrB     1-870      *
  [3]     chrC    1-1345      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> mergeWindows(rowRanges(data), 100, max.width=500)
$id
 [1] 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 5 5 5
[39] 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8

$region
GRanges object with 8 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrA     1-450      *
  [2]     chrA   451-850      *
  [3]     chrA  851-1298      *
  [4]     chrB     1-450      *
  [5]     chrB   451-870      *
  [6]     chrC     1-450      *
  [7]     chrC   451-900      *
  [8]     chrC  901-1345      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> merged <- mergeWindows(rowRanges(data), 100, sign=tabled$logFC > 0)
> merged
$id
 [1]  1  2  2  3  4  4  4  5  5  6  7  8  9  9  9  9 10 10 11 12 13 14 15 15 15
[26] 15 16 17 18 18 18 18 18 19 19 20 21 22 23 24 24 25 25 26 27 28 29 29 30 30
[51] 31 31 31 31 32 33 34 34 34 34 35 36 37 37 38 39 40 41 41 42 43

$region
GRanges object with 43 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA      1-50      *
   [2]     chrA    51-150      *
   [3]     chrA   151-200      *
   [4]     chrA   201-350      *
   [5]     chrA   351-450      *
   ...      ...       ...    ...
  [39]     chrC 1051-1100      *
  [40]     chrC 1101-1150      *
  [41]     chrC 1151-1250      *
  [42]     chrC 1251-1300      *
  [43]     chrC 1301-1345      *
  -------
  seqinfo: 3 sequences from an unspecified genome

> 
> head(combineTests(merged$id, tabled))
  nWindows logFC.up logFC.down     PValue       FDR direction
1        1        0          0 0.46328451 0.5622769        up
2        2        0          0 0.79272727 0.8116017      down
3        1        1          0 0.27967201 0.5047602        up
4        3        0          1 0.08956765 0.4125151      down
5        2        1          0 0.28172663 0.5047602        up
6        1        0          1 0.01949563 0.4125151      down
> head(combineTests(merged$id, tabled, weight=weighting))
  nWindows logFC.up logFC.down     PValue       FDR direction
1        1        0          0 0.46328451 0.5622769        up
2        2        0          0 0.79272727 0.8116017      down
3        1        1          0 0.27967201 0.5228651        up
4        3        0          1 0.04669873 0.4255938      down
5        2        1          0 0.24536526 0.4795776        up
6        1        0          1 0.01949563 0.3373185      down
> 
> head(getBestTest(merged$id, tabled))
  best       logFC      logCPM     PValue       FDR
1    1  0.21317827  0.53648572 0.46328451 0.5783419
2    3 -0.24872062 -0.73322697 1.00000000 1.0000000
3    4  1.41995983 -0.91833741 0.27967201 0.5047602
4    5 -0.01753979  1.78172679 0.08956765 0.4442470
5    9  0.21512818  1.42847478 0.28172663 0.5047602
6   10 -1.10068046 -0.09313516 0.01949563 0.4442470
> head(getBestTest(merged$id, tabled, weight=weighting))
  best       logFC      logCPM     PValue       FDR
1    1  0.21317827  0.53648572 0.46328451 0.5783419
2    2 -0.41696325  1.60566251 1.00000000 1.0000000
3    4  1.41995983 -0.91833741 0.27967201 0.5228651
4    5 -0.01753979  1.78172679 0.04669873 0.4255938
5    9  0.21512818  1.42847478 0.24536526 0.4795776
6   10 -1.10068046 -0.09313516 0.01949563 0.3373185
> head(getBestTest(merged$id, tabled, by.pval=FALSE))
  best       logFC      logCPM     PValue       FDR
1    1  0.21317827  0.53648572 0.46328451 0.5622769
2    2 -0.41696325  1.60566251 0.79272727 0.8116017
3    4  1.41995983 -0.91833741 0.27967201 0.5228651
4    5 -0.01753979  1.78172679 0.02985588 0.2567606
5    9  0.21512818  1.42847478 0.14086332 0.4038082
6   10 -1.10068046 -0.09313516 0.01949563 0.2567606
> 
> # Pulling out some diagnostics.
> suppressPackageStartupMessages(require(org.Mm.eg.db))
> suppressPackageStartupMessages(require(TxDb.Mmusculus.UCSC.mm10.knownGene))
> 
> current <- readRDS(system.file("exdata", "exrange.rds", package="csaw"))
> output <- detailRanges(current, TxDb.Mmusculus.UCSC.mm10.knownGene, org.Mm.eg.db)
> head(output$overlap)
[1] "Nrxn3|8|+"         ""                  ""                 
[4] "1700007G11Rik|I|+" "Mannr|2|+"         ""                 
> head(output$right)
[1] "Nrxn3|9|+[3846]" "Rprm|1|-[2293]"  ""                ""               
[5] ""                ""               
> head(output$left)
[1] ""                        ""                       
[3] ""                        "1700007G11Rik|5|+[2890]"
[5] ""                        ""                       
> 
> # Pulling out some reads. 
> extractReads(both.files[1], GRanges("chrA", IRanges(100, 500)))
GRanges object with 143 ranges and 0 metadata columns:
        seqnames    ranges strand
           <Rle> <IRanges>  <Rle>
    [1]     chrA    94-103      +
    [2]     chrA   106-115      +
    [3]     chrA   120-129      +
    [4]     chrA   120-129      +
    [5]     chrA   129-138      +
    ...      ...       ...    ...
  [139]     chrA   467-476      -
  [140]     chrA   482-491      -
  [141]     chrA   490-499      -
  [142]     chrA   491-500      -
  [143]     chrA   499-508      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(both.files[1], GRanges("chrA", IRanges(50, 100)))
GRanges object with 27 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA     43-52      +
   [2]     chrA     51-60      +
   [3]     chrA     57-66      +
   [4]     chrA     62-71      +
   [5]     chrA     63-72      +
   ...      ...       ...    ...
  [23]     chrA     79-88      -
  [24]     chrA     83-92      -
  [25]     chrA     88-97      -
  [26]     chrA     89-98      -
  [27]     chrA    93-102      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(both.files[1], GRanges("chrA", IRanges(50, 100)), param=readParam(dedup=TRUE))
GRanges object with 19 ranges and 0 metadata columns:
       seqnames    ranges strand
          <Rle> <IRanges>  <Rle>
   [1]     chrA     51-60      +
   [2]     chrA     57-66      +
   [3]     chrA     62-71      +
   [4]     chrA     63-72      +
   [5]     chrA     76-85      +
   ...      ...       ...    ...
  [15]     chrA     79-88      -
  [16]     chrA     79-88      -
  [17]     chrA     88-97      -
  [18]     chrA     89-98      -
  [19]     chrA    93-102      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(pe.file, GRanges("chrB", IRanges(50, 100)), param=readParam(pe="both"))
GRanges object with 3 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrB     50-79      *
  [2]     chrB     90-99      *
  [3]     chrB    99-100      *
  -------
  seqinfo: 1 sequence from an unspecified genome
> extractReads(pe.file, GRanges("chrB", IRanges(50, 100)), param=readParam(pe="second"))
GRanges object with 4 ranges and 0 metadata columns:
      seqnames    ranges strand
         <Rle> <IRanges>  <Rle>
  [1]     chrB     75-84      +
  [2]     chrB     90-99      +
  [3]     chrB     70-79      -
  [4]     chrB    99-100      -
  -------
  seqinfo: 1 sequence from an unspecified genome
> 
> 
> proc.time()
   user  system elapsed 
  23.45    0.78   24.23 

Example timings

csaw.Rcheck/examples_i386/csaw-Ex.timings

nameusersystemelapsed
SEmethods0.570.040.75
checkBimodality0.340.000.35
clusterFDR0.640.000.64
clusterWindows1.360.001.36
combineTests0.030.000.03
consolidateClusters2.240.012.25
consolidateSizes0.550.000.55
correlateReads0.150.000.16
csawUsersGuide000
detailRanges15.10 0.7215.84
empiricalFDR0.010.000.02
extractReads1.140.161.29
filterWindows0.880.171.05
findMaxima0.20.00.2
getBestTest0.020.000.02
getPESizes0.170.000.18
getWidths0.640.020.65
maximizeCcf000
mergeWindows0.110.000.11
mixedClusters0.020.000.01
normOffsets0.440.000.44
overlapStats0.260.000.27
profileSites0.670.030.70
readParam0.030.000.03
regionCounts0.340.000.34
scaledAverage0.580.000.58
strandedCounts2.380.022.39
upweightSummit000
windowCounts1.010.021.03
wwhm0.100.010.11

csaw.Rcheck/examples_x64/csaw-Ex.timings

nameusersystemelapsed
SEmethods0.560.010.63
checkBimodality1.220.031.28
clusterFDR1.130.051.18
clusterWindows2.420.082.50
combineTests0.030.000.03
consolidateClusters3.360.003.43
consolidateSizes1.080.001.08
correlateReads0.230.000.24
csawUsersGuide000
detailRanges13.71 0.5114.26
empiricalFDR0.010.000.02
extractReads0.660.000.65
filterWindows0.620.020.65
findMaxima0.130.000.12
getBestTest0.010.000.02
getPESizes0.130.000.12
getWidths0.470.000.47
maximizeCcf000
mergeWindows0.040.000.05
mixedClusters000
normOffsets0.280.000.28
overlapStats0.200.000.21
profileSites0.790.030.81
readParam0.040.000.05
regionCounts0.440.000.43
scaledAverage0.750.000.75
strandedCounts2.410.032.44
upweightSummit0.010.000.02
windowCounts0.850.020.86
wwhm0.060.000.06