Back to Multiple platform build/check report for BioC 3.12
ABC[D]EFGHIJKLMNOPQRSTUVWXYZ

CHECK report for diffHic on malbec1

This page was generated on 2021-05-06 12:27:20 -0400 (Thu, 06 May 2021).

To the developers/maintainers of the diffHic package:
Please make sure to use the following settings in order to reproduce any error or warning you see on this page.
Package 478/1974HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
diffHic 1.22.0  (landing page)
Aaron Lun
Snapshot Date: 2021-05-05 14:51:38 -0400 (Wed, 05 May 2021)
URL: https://git.bioconductor.org/packages/diffHic
Branch: RELEASE_3_12
Last Commit: db4e4f8
Last Changed Date: 2020-10-27 11:05:00 -0400 (Tue, 27 Oct 2020)
malbec1Linux (Ubuntu 18.04.5 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version exists in internal repository
tokay1Windows Server 2012 R2 Standard / x64  OK    OK    WARNINGS    OK  UNNEEDED, same version exists in internal repository
merida1macOS 10.14.6 Mojave / x86_64  OK    OK    OK    OK  UNNEEDED, same version exists in internal repository

Summary

Package: diffHic
Version: 1.22.0
Command: /home/biocbuild/bbs-3.12-bioc/R/bin/R CMD check --install=check:diffHic.install-out.txt --library=/home/biocbuild/bbs-3.12-bioc/R/library --no-vignettes --timings diffHic_1.22.0.tar.gz
StartedAt: 2021-05-06 00:57:27 -0400 (Thu, 06 May 2021)
EndedAt: 2021-05-06 01:05:27 -0400 (Thu, 06 May 2021)
EllapsedTime: 479.5 seconds
RetCode: 0
Status:   OK  
CheckDir: diffHic.Rcheck
Warnings: 0

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/biocbuild/bbs-3.12-bioc/R/bin/R CMD check --install=check:diffHic.install-out.txt --library=/home/biocbuild/bbs-3.12-bioc/R/library --no-vignettes --timings diffHic_1.22.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory ‘/home/biocbuild/bbs-3.12-bioc/meat/diffHic.Rcheck’
* using R version 4.0.5 (2021-03-31)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option ‘--no-vignettes’
* checking for file ‘diffHic/DESCRIPTION’ ... OK
* this is package ‘diffHic’ version ‘1.22.0’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘diffHic’ can be installed ... OK
* checking installed package size ... NOTE
  installed size is 11.6Mb
  sub-directories of 1Mb or more:
    doc    1.3Mb
    libs   9.0Mb
* 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
* 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 ... NOTE
GNU make is a SystemRequirements.
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking compiled code ... NOTE
Note: information on .o files is not available
File ‘/home/biocbuild/bbs-3.12-bioc/R/library/diffHic/libs/diffHic.so’:
  Found ‘__printf_chk’, possibly from ‘printf’ (C)
  Found ‘abort’, possibly from ‘abort’ (C)
  Found ‘exit’, possibly from ‘exit’ (C)
  Found ‘putchar’, possibly from ‘putchar’ (C)
  Found ‘puts’, possibly from ‘printf’ (C), ‘puts’ (C)
  Found ‘srand48’, possibly from ‘srand48’ (C)
  Found ‘stderr’, possibly from ‘stderr’ (C)
  Found ‘stdout’, possibly from ‘stdout’ (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 ... OK
Examples with CPU (user + system) or elapsed time > 5s
               user system elapsed
normalizeCNV 11.748  0.016  11.774
cutGenome     7.692  0.052   8.216
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘test-basic.R’
  Comparing ‘test-basic.Rout’ to ‘test-basic.Rout.save’ ...208,210d207
< Warning message:
< In (function (counts = matrix(0, 0, 0), lib.size = colSums(counts),  :
<   norm factors don't multiply to 1
  Running ‘testthat.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE

Status: 3 NOTEs
See
  ‘/home/biocbuild/bbs-3.12-bioc/meat/diffHic.Rcheck/00check.log’
for details.



Installation output

diffHic.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/biocbuild/bbs-3.12-bioc/R/bin/R CMD INSTALL diffHic
###
##############################################################################
##############################################################################


* installing to library ‘/home/biocbuild/bbs-3.12-bioc/R/library’
* installing *source* package ‘diffHic’ ...
** using staged installation
** libs
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c binner.cpp -o binner.o
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c check_input.cpp -o check_input.o
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c cluster_2d.cpp -o cluster_2d.o
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c count_background.cpp -o count_background.o
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c count_connect.cpp -o count_connect.o
count_connect.cpp: In function ‘SEXPREC* count_connect(SEXP, SEXP)’:
count_connect.cpp:57:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (size_t odex=0; odex < ncombos; ++odex) {
                         ~~~~~^~~~~~~~~
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c count_patch.cpp -o count_patch.o
count_patch.cpp: In function ‘SEXPREC* count_patch(SEXP, SEXP, SEXP, SEXP, SEXP)’:
count_patch.cpp:45:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (size_t vecdex=0; vecdex<ncombos; ++vecdex) {
                           ~~~~~~^~~~~~~~
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c directionality.cpp -o directionality.o
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c init.cpp -o init.o
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c iterative_correction.cpp -o iterative_correction.o
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c neighbors.cpp -o neighbors.o
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c pair_stats.cpp -o pair_stats.o
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c quadrant_bg.cpp -o quadrant_bg.o
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c report_hic_pairs.cpp -o report_hic_pairs.o
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c trended_filter.cpp -o trended_filter.o
g++ -std=gnu++11 -I"/home/biocbuild/bbs-3.12-bioc/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/zlibbioc/include' -I'/home/biocbuild/bbs-3.12-bioc/R/library/Rcpp/include' -I/usr/local/include   -fpic  -g -O2  -Wall -c utils.cpp -o utils.o
g++ -std=gnu++11 -shared -L/home/biocbuild/bbs-3.12-bioc/R/lib -L/usr/local/lib -o diffHic.so binner.o check_input.o cluster_2d.o count_background.o count_connect.o count_patch.o directionality.o init.o iterative_correction.o neighbors.o pair_stats.o quadrant_bg.o report_hic_pairs.o trended_filter.o utils.o /home/biocbuild/bbs-3.12-bioc/R/library/Rhtslib/usrlib/libhts.a -lcurl -L/home/biocbuild/bbs-3.12-bioc/R/lib -lR
installing to /home/biocbuild/bbs-3.12-bioc/R/library/00LOCK-diffHic/00new/diffHic/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
   ‘diffHic.Rnw’ 
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (diffHic)

Tests output

diffHic.Rcheck/tests/test-basic.Rout


R version 4.0.5 (2021-03-31) -- "Shake and Throw"
Copyright (C) 2021 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.

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.

> # These are just placeholders for the real things in inst/tests.
> 
> suppressWarnings(suppressPackageStartupMessages(require(diffHic)))
> 
> hic.file <- system.file("exdata", "hic_sort.bam", package="diffHic")
> cuts <- readRDS(system.file("exdata", "cuts.rds", package="diffHic"))
> param <- pairParam(fragments=cuts)
> 
> # Setting up the parameters
> fout <- "output.h5"
> preparePairs(hic.file, param, file=fout)
$pairs
   total   marked filtered   mapped 
      32        7        3       22 

$same.id
   dangling self.circle 
          4           1 

$singles
[1] 2

$chimeras
  total  mapped   multi invalid 
     12       8       7       5 

> head(getPairData(fout, param))
  length orientation insert
1     40           1     40
2     80           1     80
3     60           2     54
4     40           3    160
5     20           1     66
6     80           0    114
> 
> loadChromos(fout)
  anchor1 anchor2
1    chrA    chrA
2    chrB    chrA
3    chrB    chrB
> head(loadData(fout, "chrA", "chrA"))
  anchor1.id anchor2.id anchor1.pos anchor2.pos anchor1.len anchor2.len
1          2          1          49          14          -5          10
2          2          1          79           9         -10          10
3          2          1          65          21          10         -10
4          4          1         156           6         -10         -10
5          4          2         141          80          -5          10
6          4          2         154          50          10          10
> head(loadData(fout, "chrA", "chrB"))
  anchor1.id anchor2.id anchor1.pos anchor2.pos anchor1.len anchor2.len
1          5          2          19          44          10         -10
2          5          3          14         105          10         -10
3          6          1          65          19           5          10
4          6          2          24          90          -5           5
5          6          3          24         100          -5         -10
6          6          3          24          95          -5         -10
Warning message:
In value[[3L]](cond) : anchor definitions are reversed
> 
> # Loading the counts.
> data <- squareCounts(fout, param, width=50, filter=1)
> data
class: InteractionSet 
dim: 10 1 
metadata(2): param width
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(1): totals
type: ReverseStrictGInteractions
regions: 6
> 
> margins <- marginCounts(fout, param, width=50)
> margins
class: RangedSummarizedExperiment 
dim: 6 1 
metadata(1): param
assays(1): counts
rownames: NULL
rowData names(1): nfrags
colnames: NULL
colData names(1): totals
> totalCounts(fout, param)
[1] 17
> 
> regions <- GRanges("chrA", IRanges(c(1, 100, 150), c(20, 140, 160)))
> connectCounts(fout, param, regions=regions, filter=1L)
class: InteractionSet 
dim: 2 1 
metadata(1): param
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(1): totals
type: ReverseStrictGInteractions
regions: 3
> 
> # Checking some values.
> head(getArea(data))
[1] 2208 2304 2208 2208 3312 3174
> head(pairdist(data))
[1]  47 140  93  47  NA  NA
> 
> anchors(data, type="first")
GRanges object with 10 ranges and 1 metadata column:
       seqnames    ranges strand |    nfrags
          <Rle> <IRanges>  <Rle> | <integer>
   [1]     chrA     49-94      * |         1
   [2]     chrA   141-188      * |         1
   [3]     chrA   141-188      * |         1
   [4]     chrA   141-188      * |         1
   [5]     chrB      1-69      * |         2
   [6]     chrB      1-69      * |         2
   [7]     chrB      1-69      * |         2
   [8]     chrB      1-69      * |         2
   [9]     chrB     70-92      * |         1
  [10]     chrB     70-92      * |         1
  -------
  seqinfo: 2 sequences from an unspecified genome
> anchors(data, type="second")
GRanges object with 10 ranges and 1 metadata column:
       seqnames    ranges strand |    nfrags
          <Rle> <IRanges>  <Rle> | <integer>
   [1]     chrA      1-48      * |         1
   [2]     chrA      1-48      * |         1
   [3]     chrA     49-94      * |         1
   [4]     chrA    95-140      * |         1
   [5]     chrA      1-48      * |         1
   [6]     chrA     49-94      * |         1
   [7]     chrA    95-140      * |         1
   [8]     chrB      1-69      * |         2
   [9]     chrB      1-69      * |         2
  [10]     chrB     70-92      * |         1
  -------
  seqinfo: 2 sequences from an unspecified genome
> assay(data)
      [,1]
 [1,]    3
 [2,]    1
 [3,]    2
 [4,]    1
 [5,]    1
 [6,]    2
 [7,]    3
 [8,]    1
 [9,]    2
[10,]    1
> regions(data)
GRanges object with 6 ranges and 1 metadata column:
      seqnames    ranges strand |    nfrags
         <Rle> <IRanges>  <Rle> | <integer>
  [1]     chrA      1-48      * |         1
  [2]     chrA     49-94      * |         1
  [3]     chrA    95-140      * |         1
  [4]     chrA   141-188      * |         1
  [5]     chrB      1-69      * |         2
  [6]     chrB     70-92      * |         1
  -------
  seqinfo: 2 sequences from an unspecified genome
> 
> data$totals
[1] 17
> colData(data)
DataFrame with 1 row and 1 column
     totals
  <integer>
1        17
> metadata(data)
$param
Genome contains 7 restriction fragments across 2 chromosomes
No discard regions are specified
No limits on chromosomes for read extraction
No cap on the read pairs per pair of restriction fragments

$width
[1] 50

> 
> asDGEList(data)
An object of class "DGEList"
$counts
   Sample1
1        3
2        1
3        2
4        1
5        1
6        2
7        3
8        1
9        2
10       1

$samples
        group lib.size norm.factors
Sample1     1       17            1

> asDGEList(data, lib.size=20)$samples
        group lib.size norm.factors
Sample1     1       20            1
> asDGEList(data, norm.factors=2, group="a")$samples
        group lib.size norm.factors
Sample1     a       17            2
Warning message:
In (function (counts = matrix(0, 0, 0), lib.size = colSums(counts),  :
  norm factors don't multiply to 1
> 
> # Playing around with some bin counts.
> stuff <- correctedContact(data)
> head(stuff$truth)
[1] 1.517032e+04 6.123523e-01 6.123523e-01 8.162749e-01 2.041633e-01
[6] 2.041633e-01
> 
> data.large <- squareCounts(fout, param, width=100, filter=1)
> boxed <- boxPairs(larger=data.large, smaller=data)
> head(boxed$indices$larger)
[1] 1 2 3 4 5 6
> head(boxed$indices$smaller)
[1] 1 2 2 3 4 4
> 
> head(enrichedPairs(data))
class: InteractionSet 
dim: 6 1 
metadata(2): param width
assays(5): counts quadrant vertical horizontal surrounding
rownames: NULL
rowData names(4): N.quadrant N.vertical N.horizontal N.surrounding
colnames: NULL
colData names(1): totals
type: ReverseStrictGInteractions
regions: 6
> head(clusterPairs(data, tol=10)$indices[[1]])
[1] 1 2 2 2 3 3
> 
> # End.
> 
> unlink(fout)
> 
> proc.time()
   user  system elapsed 
 17.140   0.440  19.112 

diffHic.Rcheck/tests/test-basic.Rout.save


R version 3.5.0 Patched (2018-04-30 r74679) -- "Joy in Playing"
Copyright (C) 2018 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.

> # These are just placeholders for the real things in inst/tests.
> 
> suppressWarnings(suppressPackageStartupMessages(require(diffHic)))
> 
> hic.file <- system.file("exdata", "hic_sort.bam", package="diffHic")
> cuts <- readRDS(system.file("exdata", "cuts.rds", package="diffHic"))
> param <- pairParam(fragments=cuts)
> 
> # Setting up the parameters
> fout <- "output.h5"
> preparePairs(hic.file, param, file=fout)
$pairs
   total   marked filtered   mapped 
      32        7        3       22 

$same.id
   dangling self.circle 
          4           1 

$singles
[1] 2

$chimeras
  total  mapped   multi invalid 
     12       8       7       5 

> head(getPairData(fout, param))
  length orientation insert
1     40           1     40
2     80           1     80
3     60           2     54
4     40           3    160
5     20           1     66
6     80           0    114
> 
> loadChromos(fout)
  anchor1 anchor2
1    chrA    chrA
2    chrB    chrA
3    chrB    chrB
> head(loadData(fout, "chrA", "chrA"))
  anchor1.id anchor2.id anchor1.pos anchor2.pos anchor1.len anchor2.len
1          2          1          49          14          -5          10
2          2          1          79           9         -10          10
3          2          1          65          21          10         -10
4          4          1         156           6         -10         -10
5          4          2         141          80          -5          10
6          4          2         154          50          10          10
> head(loadData(fout, "chrA", "chrB"))
  anchor1.id anchor2.id anchor1.pos anchor2.pos anchor1.len anchor2.len
1          5          2          19          44          10         -10
2          5          3          14         105          10         -10
3          6          1          65          19           5          10
4          6          2          24          90          -5           5
5          6          3          24         100          -5         -10
6          6          3          24          95          -5         -10
Warning message:
In value[[3L]](cond) : anchor definitions are reversed
> 
> # Loading the counts.
> data <- squareCounts(fout, param, width=50, filter=1)
> data
class: InteractionSet 
dim: 10 1 
metadata(2): param width
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(1): totals
type: ReverseStrictGInteractions
regions: 6
> 
> margins <- marginCounts(fout, param, width=50)
> margins
class: RangedSummarizedExperiment 
dim: 6 1 
metadata(1): param
assays(1): counts
rownames: NULL
rowData names(1): nfrags
colnames: NULL
colData names(1): totals
> totalCounts(fout, param)
[1] 17
> 
> regions <- GRanges("chrA", IRanges(c(1, 100, 150), c(20, 140, 160)))
> connectCounts(fout, param, regions=regions, filter=1L)
class: InteractionSet 
dim: 2 1 
metadata(1): param
assays(1): counts
rownames: NULL
rowData names(0):
colnames: NULL
colData names(1): totals
type: ReverseStrictGInteractions
regions: 3
> 
> # Checking some values.
> head(getArea(data))
[1] 2208 2304 2208 2208 3312 3174
> head(pairdist(data))
[1]  47 140  93  47  NA  NA
> 
> anchors(data, type="first")
GRanges object with 10 ranges and 1 metadata column:
       seqnames    ranges strand |    nfrags
          <Rle> <IRanges>  <Rle> | <integer>
   [1]     chrA     49-94      * |         1
   [2]     chrA   141-188      * |         1
   [3]     chrA   141-188      * |         1
   [4]     chrA   141-188      * |         1
   [5]     chrB      1-69      * |         2
   [6]     chrB      1-69      * |         2
   [7]     chrB      1-69      * |         2
   [8]     chrB      1-69      * |         2
   [9]     chrB     70-92      * |         1
  [10]     chrB     70-92      * |         1
  -------
  seqinfo: 2 sequences from an unspecified genome
> anchors(data, type="second")
GRanges object with 10 ranges and 1 metadata column:
       seqnames    ranges strand |    nfrags
          <Rle> <IRanges>  <Rle> | <integer>
   [1]     chrA      1-48      * |         1
   [2]     chrA      1-48      * |         1
   [3]     chrA     49-94      * |         1
   [4]     chrA    95-140      * |         1
   [5]     chrA      1-48      * |         1
   [6]     chrA     49-94      * |         1
   [7]     chrA    95-140      * |         1
   [8]     chrB      1-69      * |         2
   [9]     chrB      1-69      * |         2
  [10]     chrB     70-92      * |         1
  -------
  seqinfo: 2 sequences from an unspecified genome
> assay(data)
      [,1]
 [1,]    3
 [2,]    1
 [3,]    2
 [4,]    1
 [5,]    1
 [6,]    2
 [7,]    3
 [8,]    1
 [9,]    2
[10,]    1
> regions(data)
GRanges object with 6 ranges and 1 metadata column:
      seqnames    ranges strand |    nfrags
         <Rle> <IRanges>  <Rle> | <integer>
  [1]     chrA      1-48      * |         1
  [2]     chrA     49-94      * |         1
  [3]     chrA    95-140      * |         1
  [4]     chrA   141-188      * |         1
  [5]     chrB      1-69      * |         2
  [6]     chrB     70-92      * |         1
  -------
  seqinfo: 2 sequences from an unspecified genome
> 
> data$totals
[1] 17
> colData(data)
DataFrame with 1 row and 1 column
     totals
  <integer>
1        17
> metadata(data)
$param
Genome contains 7 restriction fragments across 2 chromosomes
No discard regions are specified
No limits on chromosomes for read extraction
No cap on the read pairs per pair of restriction fragments

$width
[1] 50

> 
> asDGEList(data)
An object of class "DGEList"
$counts
   Sample1
1        3
2        1
3        2
4        1
5        1
6        2
7        3
8        1
9        2
10       1

$samples
        group lib.size norm.factors
Sample1     1       17            1

> asDGEList(data, lib.size=20)$samples
        group lib.size norm.factors
Sample1     1       20            1
> asDGEList(data, norm.factors=2, group="a")$samples
        group lib.size norm.factors
Sample1     a       17            2
> 
> # Playing around with some bin counts.
> stuff <- correctedContact(data)
> head(stuff$truth)
[1] 1.517032e+04 6.123523e-01 6.123523e-01 8.162749e-01 2.041633e-01
[6] 2.041633e-01
> 
> data.large <- squareCounts(fout, param, width=100, filter=1)
> boxed <- boxPairs(larger=data.large, smaller=data)
> head(boxed$indices$larger)
[1] 1 2 3 4 5 6
> head(boxed$indices$smaller)
[1] 1 2 2 3 4 4
> 
> head(enrichedPairs(data))
class: InteractionSet 
dim: 6 1 
metadata(2): param width
assays(5): counts quadrant vertical horizontal surrounding
rownames: NULL
rowData names(4): N.quadrant N.vertical N.horizontal N.surrounding
colnames: NULL
colData names(1): totals
type: ReverseStrictGInteractions
regions: 6
> head(clusterPairs(data, tol=10)$indices[[1]])
[1] 1 2 2 2 3 3
> 
> # End.
> 
> unlink(fout)
> 
> proc.time()
   user  system elapsed 
  5.571   0.168   5.757 

diffHic.Rcheck/tests/testthat.Rout


R version 4.0.5 (2021-03-31) -- "Shake and Throw"
Copyright (C) 2021 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.

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

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

> library(testthat)
> library(diffHic)
Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

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

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

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

    IQR, mad, sd, var, xtabs

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

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

Loading required package: S4Vectors

Attaching package: 'S4Vectors'

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

    expand.grid

Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: InteractionSet
Loading required package: SummarizedExperiment
Loading required package: MatrixGenerics
Loading required package: matrixStats

Attaching package: 'MatrixGenerics'

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

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

Loading required package: Biobase
Welcome to Bioconductor

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


Attaching package: 'Biobase'

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

    rowMedians

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

    anyMissing, rowMedians

> 
> test_check("diffHic")
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 427 ]
> 
> proc.time()
   user  system elapsed 
 72.544   0.792  75.122 

Example timings

diffHic.Rcheck/diffHic-Ex.timings

nameusersystemelapsed
DNaseHiC0.2600.0040.264
annotatePairs0.5800.0000.583
boxPairs0.7480.0680.818
clusterPairs1.3960.0001.527
compartmentalize0.8920.0120.906
connectCounts2.9320.0123.039
consolidatePairs0.6880.0000.687
correctedContact0.6560.0000.656
cutGenome7.6920.0528.216
diClusters2.5000.0002.499
diffHicUsersGuide0.0000.0000.001
domainDirections0.1440.0000.145
enrichedPairs0.4160.0000.417
extractPatch0.7600.0040.765
filterDiag0.1720.0080.181
filterPeaks0.3520.0000.352
filters0.4080.0000.411
getArea0.2720.0040.279
getPairData0.0760.0080.086
loadData0.0920.0000.090
marginCounts0.8160.0040.825
mergeCMs0.7200.0000.848
mergePairs0.2680.0000.270
neighborCounts0.1520.0000.154
normalizeCNV11.748 0.01611.774
pairParam0.1840.0000.185
plotDI1.8400.0001.839
plotPlaid2.1000.0042.106
preparePairs0.2160.0160.231
prunePairs0.3080.0000.306
readMTX2IntSet0.5320.0000.534
savePairs0.0800.0000.079
squareCounts0.8880.0120.906
totalCounts0.5320.0040.536