Back to Multiple platform build/check report for BioC 3.19:   simplified   long
ABCDEF[G]HIJKLMNOPQRSTUVWXYZ

This page was generated on 2024-02-18 02:28:36 -0500 (Sun, 18 Feb 2024).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo1Linux (Ubuntu 22.04.3 LTS)x86_64R Under development (unstable) (2024-01-16 r85808) -- "Unsuffered Consequences" 4657
palomino3Windows Server 2022 Datacenterx64R Under development (unstable) (2024-01-14 r85805 ucrt) -- "Unsuffered Consequences" 4397
merida1macOS 12.7.1 Montereyx86_64R Under development (unstable) (2024-01-16 r85808) -- "Unsuffered Consequences" 4424
kunpeng2Linux (openEuler 22.03 LTS-SP1)aarch64R Under development (unstable) (2024-01-16 r85812) -- "Unsuffered Consequences" 4400
Click on any hostname to see more info about the system (e.g. compilers)      (*) as reported by 'uname -p', except on Windows and Mac OS X

Package 879/2244HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
goSorensen 1.5.0  (landing page)
Pablo Flores
Snapshot Date: 2024-02-16 14:10:20 -0500 (Fri, 16 Feb 2024)
git_url: https://git.bioconductor.org/packages/goSorensen
git_branch: devel
git_last_commit: 0658a3a
git_last_commit_date: 2023-10-24 11:43:20 -0500 (Tue, 24 Oct 2023)
nebbiolo1Linux (Ubuntu 22.04.3 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
palomino3Windows Server 2022 Datacenter / x64  OK    OK    OK    OK  UNNEEDED, same version is already published
merida1macOS 12.7.1 Monterey / x86_64  OK    OK    TIMEOUT    OK  
kunpeng2Linux (openEuler 22.03 LTS-SP1) / aarch64  OK    OK    OK  

CHECK results for goSorensen on merida1


To the developers/maintainers of the goSorensen package:
- Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/goSorensen.git to reflect on this report. See Troubleshooting Build Report for more information.
- Use the following Renviron settings to reproduce errors and warnings.
- If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information.

raw results


Summary

Package: goSorensen
Version: 1.5.0
Command: /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:goSorensen.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings goSorensen_1.5.0.tar.gz
StartedAt: 2024-02-17 04:45:36 -0500 (Sat, 17 Feb 2024)
EndedAt: 2024-02-17 05:25:36 -0500 (Sat, 17 Feb 2024)
EllapsedTime: 2400.0 seconds
RetCode: None
Status:   TIMEOUT  
CheckDir: goSorensen.Rcheck
Warnings: NA

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:goSorensen.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings goSorensen_1.5.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory ‘/Users/biocbuild/bbs-3.19-bioc/meat/goSorensen.Rcheck’
* using R Under development (unstable) (2024-01-16 r85808)
* using platform: x86_64-apple-darwin20
* R was compiled by
    Apple clang version 14.0.0 (clang-1400.0.29.202)
    GNU Fortran (GCC) 12.2.0
* running under: macOS Monterey 12.7.1
* using session charset: UTF-8
* using option ‘--no-vignettes’
* checking for file ‘goSorensen/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘goSorensen’ version ‘1.5.0’
* package encoding: UTF-8
* 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 ‘goSorensen’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* 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 contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
Examples with CPU (user + system) or elapsed time > 5s
                     user system  elapsed
hclustThreshold  1540.332 85.092 1915.797
buildEnrichTable   33.566  3.326   41.137
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘test_gosorensen_funcs.R’

Installation output

goSorensen.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL goSorensen
###
##############################################################################
##############################################################################


* installing to library ‘/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library’
* installing *source* package ‘goSorensen’ ...
** using staged installation
** R
** data
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (goSorensen)

Tests output

goSorensen.Rcheck/tests/test_gosorensen_funcs.Rout


R Under development (unstable) (2024-01-16 r85808) -- "Unsuffered Consequences"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin20

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(goSorensen)



Attaching package: 'goSorensen'

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

    upgrade

> 
> # A contingency table of GO terms mutual enrichment
> # between gene lists "atlas" and "sanger":
> data(tab_atlas.sanger_BP3)
> tab_atlas.sanger_BP3
                 Enriched in sanger
Enriched in atlas TRUE FALSE
            TRUE    38    31
            FALSE    2   452
> ?tab_atlas.sanger_BP3
tab_atlas.sanger_BP3        package:goSorensen         R Documentation

_C_r_o_s_s-_t_a_b_u_l_a_t_i_o_n _o_f _e_n_r_i_c_h_e_d _G_O _i_t_e_m_s _a_t _l_e_v_e_l _3 _o_f _o_n_t_o_l_o_g_y _B_P _i_n _t_w_o
_g_e_n_e _l_i_s_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     From the "Cancer gene list" of Bushman Lab, a collection of gene
     lists related with cancer, for gene lists "Atlas" and "Sanger",
     this dataset is the cross-tabulation of all GO items of ontology
     BP at level 3 which are: Enriched in both lists, enriched in
     sanger but not in atlas, non-enriched in sanger but enriched in
     atlas and non-enriched in both lists. Take it just as an
     illustrative example, non up-to-date for changes in the gene lists
     or changes in the GO. The present version was obtained under
     Bioconductor 3.17.

_U_s_a_g_e:

     data(tab_atlas.sanger_BP3)
     
_F_o_r_m_a_t:

     An object of class "table" representing a 2x2 contingency table.

_S_o_u_r_c_e:

     <http://www.bushmanlab.org/links/genelists>


> class(tab_atlas.sanger_BP3)
[1] "table"
> 
> # Sorensen-Dice dissimilarity on this contingency table:
> ?dSorensen
dSorensen              package:goSorensen              R Documentation

_C_o_m_p_u_t_a_t_i_o_n _o_f _t_h_e _S_o_r_e_n_s_e_n-_D_i_c_e _d_i_s_s_i_m_i_l_a_r_i_t_y

_D_e_s_c_r_i_p_t_i_o_n:

     Computation of the Sorensen-Dice dissimilarity

_U_s_a_g_e:

     dSorensen(x, ...)
     
     ## S3 method for class 'table'
     dSorensen(x, check.table = TRUE, ...)
     
     ## S3 method for class 'matrix'
     dSorensen(x, check.table = TRUE, ...)
     
     ## S3 method for class 'numeric'
     dSorensen(x, check.table = TRUE, ...)
     
     ## S3 method for class 'character'
     dSorensen(x, y, check.table = TRUE, ...)
     
     ## S3 method for class 'list'
     dSorensen(x, check.table = TRUE, ...)
     
     ## S3 method for class 'tableList'
     dSorensen(x, check.table = TRUE, ...)
     
_A_r_g_u_m_e_n_t_s:

       x: either an object of class "table", "matrix" or "numeric"
          representing a 2x2 contingency table, or a "character" vector
          (a set of gene identifiers) or "list" or "tableList" object.
          See the details section for more information.

     ...: extra parameters for function 'buildEnrichTable'.

check.table: Boolean. If TRUE (default), argument 'x' is checked to
          adequately represent a 2x2 contingency table, by means of
          function 'nice2x2Table'.

       y: an object of class "character" representing a vector of valid
          gene identifiers.

_D_e_t_a_i_l_s:

     Given a 2x2 arrangement of frequencies (either implemented as a
     "table", a "matrix" or a "numeric" object):

       n11   n01 
       n10  n00, 
      
     this function computes the Sorensen-Dice dissimilarity

                   { n_10 + n_01}/{2 n_11 + n_10 + n_01}.               
     
     The subindex '11' corresponds to those GO items enriched in both
     lists, '01' to items enriched in the second list but not in the
     first one, '10' to items enriched in the first list but not
     enriched in the second one and '00' corresponds to those GO items
     non enriched in both gene lists, i.e., to the double negatives, a
     value which is ignored in the computations.

     In the "numeric" interface, if 'length(x) >= 3', the values are
     interpreted as

     (n_11, n_01, n_10, n_00), always in this order and discarding
     extra values if necessary. The result is correct, regardless the
     frequencies being absolute or relative.

     If 'x' is an object of class "character", then 'x' (and 'y') must
     represent two "character" vectors of valid gene identifiers. Then
     the dissimilarity between lists 'x' and 'y' is computed, after
     internally summarizing them as a 2x2 contingency table of joint
     enrichment. This last operation is performed by function
     'buildEnrichTable' and "valid gene identifiers" stands for the
     coherency of these gene identifiers with the arguments
     'geneUniverse' and 'orgPackg' of 'buildEnrichTable', passed by the
     ellipsis argument '...' in 'dSorensen'.

     If 'x' is an object of class "list", the argument must be a list
     of "character" vectors, each one representing a gene list
     (character identifiers). Then, all pairwise dissimilarities
     between these gene lists are computed.

     If 'x' is an object of class "tableList", the Sorensen-Dice
     dissimilarity is computed over each one of these tables. Given k
     gene lists (i.e. "character" vectors of gene identifiers) l1, l2,
     ..., lk, an object of class "tableList" (typically constructed by
     a call to function 'buildEnrichTable') is a list of lists of
     contingency tables t(i,j) generated from each pair of gene lists i
     and j, with the following structure:

     $l2

     $l2$l1$t(2,1)

     $l3

     $l3$l1$t(3,1), $l3$l2$t(3,2)

     ...

     $lk

     $lk$l1$t(k,1), $lk$l2$t(k,2), ..., $lk$l(k-1)t(k,k-1)

_V_a_l_u_e:

     In the "table", "matrix", "numeric" and "character" interfaces,
     the value of the Sorensen-Dice dissimilarity. In the "list" and
     "tableList" interfaces, the symmetric matrix of all pairwise
     Sorensen-Dice dissimilarities.

_M_e_t_h_o_d_s (_b_y _c_l_a_s_s):

        • 'dSorensen(table)': S3 method for class "table"

        • 'dSorensen(matrix)': S3 method for class "matrix"

        • 'dSorensen(numeric)': S3 method for class "numeric"

        • 'dSorensen(character)': S3 method for class "character"

        • 'dSorensen(list)': S3 method for class "list"

        • 'dSorensen(tableList)': S3 method for class "tableList"

_S_e_e _A_l_s_o:

     'buildEnrichTable' for constructing contingency tables of mutual
     enrichment, 'nice2x2Table' for checking contingency tables
     validity, 'seSorensen' for computing the standard error of the
     dissimilarity, 'duppSorensen' for the upper limit of a one-sided
     confidence interval of the dissimilarity, 'equivTestSorensen' for
     an equivalence test.

_E_x_a_m_p_l_e_s:

     # Gene lists 'atlas' and 'sanger' in 'allOncoGeneLists' dataset. Table of joint enrichment
     # of GO items in ontology BP at level 3.
     data(tab_atlas.sanger_BP3)
     tab_atlas.sanger_BP3
     ?tab_atlas.sanger_BP3
     dSorensen(tab_atlas.sanger_BP3)
     
     # Table represented as a vector:
     conti4 <- c(56, 1, 30, 471)
     dSorensen(conti4)
     # or as a plain matrix:
     dSorensen(matrix(conti4, nrow = 2))
     
     # This function is also appropriate for proportions:
     dSorensen(conti4 / sum(conti4))
     
     conti3 <- c(56, 1, 30)
     dSorensen(conti3)
     
     # Sorensen-Dice dissimilarity from scratch, directly from two gene lists:
     # (These examples may be considerably time consuming due to many enrichment
     # tests to build the contingency tables of mutual enrichment)
     # data(pbtGeneLists)
     # ?pbtGeneLists
     # data(humanEntrezIDs)
     # (Time consuming, building the table requires many enrichment tests:)
     # dSorensen(pbtGeneLists[[2]], pbtGeneLists[[4]],
     #           onto = "CC", GOLevel = 3,
     #           geneUniverse = humanEntrezIDs, orgPackg = "org.Hs.eg.db")
     # Essentially, the above code makes the same as:
     # tab.IRITD3vsKT1 <- buildEnrichTable(pbtGeneLists[[2]], pbtGeneLists[[4]],
     #                                     onto = "CC", GOLevel = 3,
     #                                     geneUniverse = humanEntrezIDs, orgPackg = "org.Hs.eg.db")
     # dSorensen(tab.IRITD3vsKT1)
     # (Quite time consuming, all pairwise dissimilarities:)
     # dSorensen(pbtGeneLists,
     #           onto = "CC", GOLevel = 3,
     #           geneUniverse = humanEntrezIDs, orgPackg = "org.Hs.eg.db")
     

> dSorensen(tab_atlas.sanger_BP3)
[1] 0.3027523
> 
> # Standard error of this Sorensen-Dice dissimilarity estimate:
> ?seSorensen
seSorensen             package:goSorensen              R Documentation

_S_t_a_n_d_a_r_d _e_r_r_o_r _o_f _t_h_e _s_a_m_p_l_e _S_o_r_e_n_s_e_n-_D_i_c_e _d_i_s_s_i_m_i_l_a_r_i_t_y, _a_s_y_m_p_t_o_t_i_c
_a_p_p_r_o_a_c_h

_D_e_s_c_r_i_p_t_i_o_n:

     Standard error of the sample Sorensen-Dice dissimilarity,
     asymptotic approach

_U_s_a_g_e:

     seSorensen(x, ...)
     
     ## S3 method for class 'table'
     seSorensen(x, check.table = TRUE, ...)
     
     ## S3 method for class 'matrix'
     seSorensen(x, check.table = TRUE, ...)
     
     ## S3 method for class 'numeric'
     seSorensen(x, check.table = TRUE, ...)
     
     ## S3 method for class 'character'
     seSorensen(x, y, check.table = TRUE, ...)
     
     ## S3 method for class 'list'
     seSorensen(x, check.table = TRUE, ...)
     
     ## S3 method for class 'tableList'
     seSorensen(x, check.table = TRUE, ...)
     
_A_r_g_u_m_e_n_t_s:

       x: either an object of class "table", "matrix" or "numeric"
          representing a 2x2 contingency table, or a "character" (a set
          of gene identifiers) or "list" or "tableList" object. See the
          details section for more information.

     ...: extra parameters for function 'buildEnrichTable'.

check.table: Boolean. If TRUE (default), argument 'x' is checked to
          adequately represent a 2x2 contingency table. This checking
          is performed by means of function 'nice2x2Table'.

       y: an object of class "character" representing a vector of gene
          identifiers.

_D_e_t_a_i_l_s:

     This function computes the standard error estimate of the sample
     Sorensen-Dice dissimilarity, given a 2x2 arrangement of
     frequencies (either implemented as a "table", a "matrix" or a
     "numeric" object):

       n11   n10 
       n01  n00, 
      
     The subindex '11' corresponds to those GO items enriched in both
     lists, '01' to items enriched in the second list but not in the
     first one, '10' to items enriched in the first list but not
     enriched in the second one and '00' corresponds to those GO items
     non enriched in both gene lists, i.e., to the double negatives, a
     value which is ignored in the computations.

     In the "numeric" interface, if 'length(x) >= 3', the values are
     interpreted as

     (n_11, n_01, n_10), always in this order.

     If 'x' is an object of class "character", then 'x' (and 'y') must
     represent two "character" vectors of valid gene identifiers. Then
     the standard error for the dissimilarity between lists 'x' and 'y'
     is computed, after internally summarizing them as a 2x2
     contingency table of joint enrichment. This last operation is
     performed by function 'buildEnrichTable' and "valid gene
     identifiers" stands for the coherency of these gene identifiers
     with the arguments 'geneUniverse' and 'orgPackg' of
     'buildEnrichTable', passed by the ellipsis argument '...' in
     'seSorensen'.

     In the "list" interface, the argument must be a list of
     "character" vectors, each one representing a gene list (character
     identifiers). Then, all pairwise standard errors of the
     dissimilarity between these gene lists are computed.

     If 'x' is an object of class "tableList", the standard error of
     the Sorensen-Dice dissimilarity estimate is computed over each one
     of these tables. Given k gene lists (i.e. "character" vectors of
     gene identifiers) l1, l2, ..., lk, an object of class "tableList"
     (typically constructed by a call to function 'buildEnrichTable')
     is a list of lists of contingency tables t(i,j) generated from
     each pair of gene lists i and j, with the following structure:

     $l2

     $l2$l1$t(2,1)

     $l3

     $l3$l1$t(3,1), $l3$l2$t(3,2)

     ...

     $lk

     $lk$l1$t(k,1), $lk$l2$t(k,2), ..., $lk$l(k-1)t(k,k-1)

_V_a_l_u_e:

     In the "table", "matrix", "numeric" and "character" interfaces,
     the value of the standard error of the Sorensen-Dice dissimilarity
     estimate. In the "list" and "tableList" interfaces, the symmetric
     matrix of all standard error dissimilarity estimates.

_M_e_t_h_o_d_s (_b_y _c_l_a_s_s):

        • 'seSorensen(table)': S3 method for class "table"

        • 'seSorensen(matrix)': S3 method for class "matrix"

        • 'seSorensen(numeric)': S3 method for class "numeric"

        • 'seSorensen(character)': S3 method for class "character"

        • 'seSorensen(list)': S3 method for class "list"

        • 'seSorensen(tableList)': S3 method for class "tableList"

_S_e_e _A_l_s_o:

     'buildEnrichTable' for constructing contingency tables of mutual
     enrichment, 'nice2x2Table' for checking the validity of enrichment
     contingency tables, 'dSorensen' for computing the Sorensen-Dice
     dissimilarity, 'duppSorensen' for the upper limit of a one-sided
     confidence interval of the dissimilarity, 'equivTestSorensen' for
     an equivalence test.

_E_x_a_m_p_l_e_s:

     # Gene lists 'atlas' and 'sanger' in 'Cangenes' dataset. Table of joint enrichment
     # of GO items in ontology BP at level 3.
     data(tab_atlas.sanger_BP3)
     tab_atlas.sanger_BP3
     dSorensen(tab_atlas.sanger_BP3)
     seSorensen(tab_atlas.sanger_BP3)
     
     # Contingency table as a numeric vector:
     seSorensen(c(56, 1, 30, 47))
     seSorensen(c(56, 1, 30))
     
     # (These examples may be considerably time consuming due to many enrichment
     # tests to build the contingency tables of mutual enrichment)
     # ?pbtGeneLists
     # Standard error of the sample Sorensen-Dice dissimilarity, directly from
     # two gene lists, from scratch:
     # seSorensen(pbtGeneLists[[2]], pbtGeneLists[[4]],
     #            onto = "CC", GOLevel = 5,
     #            geneUniverse = humanEntrezIDs, orgPackg = "org.Hs.eg.db")
     # Essentially, the above code makes the same as:
     # tab.IRITD3vsKT1 <- buildEnrichTable(pbtGeneLists[[2]], pbtGeneLists[[4]],
     #                                     onto = "CC", GOLevel = 5,
     #                                     geneUniverse = humanEntrezIDs, orgPackg = "org.Hs.eg.db")
     # tab.IRITD3vsKT1
     # seSorensen(tab.IRITD3vsKT1)
     
     # All pairwise standard errors (quite time consuming):
     # seSorensen(pbtGeneLists,
     #            onto = "CC", GOLevel = 5,
     #            geneUniverse = humanEntrezIDs, orgPackg = "org.Hs.eg.db")
     

> seSorensen(tab_atlas.sanger_BP3)
[1] 0.05058655
> 
> # Upper 95% confidence limit for the Sorensen-Dice dissimilarity:
> ?duppSorensen
duppSorensen            package:goSorensen             R Documentation

_U_p_p_e_r _l_i_m_i_t _o_f _a _o_n_e-_s_i_d_e_d _c_o_n_f_i_d_e_n_c_e _i_n_t_e_r_v_a_l (_0, _d_U_p_p] _f_o_r _t_h_e
_S_o_r_e_n_s_e_n-_D_i_c_e _d_i_s_s_i_m_i_l_a_r_i_t_y

_D_e_s_c_r_i_p_t_i_o_n:

     Upper limit of a one-sided confidence interval (0, dUpp] for the
     Sorensen-Dice dissimilarity

_U_s_a_g_e:

     duppSorensen(x, ...)
     
     ## S3 method for class 'table'
     duppSorensen(
       x,
       dis = dSorensen.table(x, check.table = FALSE),
       se = seSorensen.table(x, check.table = FALSE),
       conf.level = 0.95,
       z.conf.level = qnorm(1 - conf.level),
       boot = FALSE,
       nboot = 10000,
       check.table = TRUE,
       ...
     )
     
     ## S3 method for class 'matrix'
     duppSorensen(
       x,
       dis = dSorensen.matrix(x, check.table = FALSE),
       se = seSorensen.matrix(x, check.table = FALSE),
       conf.level = 0.95,
       z.conf.level = qnorm(1 - conf.level),
       boot = FALSE,
       nboot = 10000,
       check.table = TRUE,
       ...
     )
     
     ## S3 method for class 'numeric'
     duppSorensen(
       x,
       dis = dSorensen.numeric(x, check.table = FALSE),
       se = seSorensen.numeric(x, check.table = FALSE),
       conf.level = 0.95,
       z.conf.level = qnorm(1 - conf.level),
       boot = FALSE,
       nboot = 10000,
       check.table = TRUE,
       ...
     )
     
     ## S3 method for class 'character'
     duppSorensen(
       x,
       y,
       conf.level = 0.95,
       boot = FALSE,
       nboot = 10000,
       check.table = TRUE,
       ...
     )
     
     ## S3 method for class 'list'
     duppSorensen(
       x,
       conf.level = 0.95,
       boot = FALSE,
       nboot = 10000,
       check.table = TRUE,
       ...
     )
     
     ## S3 method for class 'tableList'
     duppSorensen(
       x,
       conf.level = 0.95,
       boot = FALSE,
       nboot = 10000,
       check.table = TRUE,
       ...
     )
     
_A_r_g_u_m_e_n_t_s:

       x: either an object of class "table", "matrix" or "numeric"
          representing a 2x2 contingency table, or a "character" (a set
          of gene identifiers) or "list" or "tableList" object. See the
          details section for more information.

     ...: additional arguments for function 'buildEnrichTable'.

     dis: Sorensen-Dice dissimilarity value. Only required to speed
          computations if this value is known in advance.

      se: standard error estimate of the sample dissimilarity. Only
          required to speed computations if this value is known in
          advance.

conf.level: confidence level of the one-sided confidence interval, a
          numeric value between 0 and 1.

z.conf.level: standard normal (or bootstrap, see arguments below)
          distribution quantile at the '1 - conf.level' value. Only
          required to speed computations if this value is known in
          advance. Then, the argument 'conf.level' is ignored.

    boot: boolean. If TRUE, 'z.conf.level' is computed by means of a
          bootstrap approach instead of the asymptotic normal approach.
          Defaults to FALSE.

   nboot: numeric, number of initially planned bootstrap replicates.
          Ignored if 'boot == FALSE'. Defaults to 10000.

check.table: Boolean. If TRUE (default), argument 'x' is checked to
          adequately represent a 2x2 contingency table. This checking
          is performed by means of function 'nice2x2Table'.

       y: an object of class "character" representing a vector of gene
          identifiers.

_D_e_t_a_i_l_s:

     This function computes the upper limit of a one-sided confidence
     interval for the Sorensen-Dice dissimilarity, given a 2x2
     arrangement of frequencies (either implemented as a "table", a
     "matrix" or a "numeric" object):

       n11   n01 
       n10  n00, 
      
     The subindex '11' corresponds to those GO items enriched in both
     lists, '01' to items enriched in the second list but not in the
     first one, '10' to items enriched in the first list but not
     enriched in the second one and '00' corresponds to those GO items
     non enriched in both gene lists, i.e., to the double negatives, a
     value which is ignored in the computations, except if 'boot ==
     TRUE'.

     In the "numeric" interface, if 'length(x) >= 4', the values are
     interpreted as

     (n_11, n_01, n_10, n_00), always in this order and discarding
     extra values if necessary.

     Arguments 'dis', 'se' and 'z.conf.level' are not required. If
     known in advance (e.g., as a consequence of previous computations
     with the same data), providing its value may speed the
     computations.

     By default, 'z.conf.level' corresponds to the 1 - conf.level
     quantile of a standard normal N(0,1) distribution, as the
     studentized statistic (^d - d) / ^se) is asymptotically N(0,1). In
     the studentized statistic, d stands for the "true" Sorensen-Dice
     dissimilarity, ^d to its sample estimate and ^se for the estimate
     of its standard error. In fact, the normal is its limiting
     distribution but, for finite samples, the true sampling
     distribution may present departures from normality (mainly with
     some inflation in the left tail). The bootstrap method provides a
     better approximation to the true sampling distribution. In the
     bootstrap approach, 'nboot' new bootstrap contingency tables are
     generated from a multinomial distribution with parameters 'size ='
     n11 + n01 + n10 + n00 and probabilities %. Sometimes, some of
     these generated tables may present so low frequencies of
     enrichment that make them unable for Sorensen-Dice computations.
     As a consequence, the number of effective bootstrap samples may be
     lower than the number of initially planned bootstrap samples
     'nboot'. Computing in advance the value of argument 'z.conf.level'
     may be a way to cope with these departures from normality, by
     means of a more adequate quantile function. Alternatively, if
     'boot == TRUE', a bootstrap quantile is internally computed.

     If 'x' is an object of class "character", then 'x' (and 'y') must
     represent two "character" vectors of valid gene identifiers. Then
     the confidence interval for the dissimilarity between lists 'x'
     and 'y' is computed, after internally summarizing them as a 2x2
     contingency table of joint enrichment. This last operation is
     performed by function 'buildEnrichTable' and "valid gene
     identifiers" stands for the coherency of these gene identifiers
     with the arguments 'geneUniverse' and 'orgPackg' of
     'buildEnrichTable', passed by the ellipsis argument '...' in
     'dUppSorensen'.

     In the "list" interface, the argument must be a list of
     "character" vectors, each one representing a gene list (character
     identifiers). Then, all pairwise upper limits of the dissimilarity
     between these gene lists are computed.

     In the "tableList" interface, the upper limits are computed over
     each one of these tables. Given gene lists (i.e. "character"
     vectors of gene identifiers) l1, l2, ..., lk, an object of class
     "tableList" (typically constructed by a call to function
     'buildEnrichTable') is a list of lists of contingency tables
     t(i,j) generated from each pair of gene lists i and j, with the
     following structure:

     $l2

     $l2$l1$t(2,1)

     $l3

     $l3$l1$t(3,1), $l3$l2$t(3,2)

     ...

     $lk

     $lk$l1$t(k,1), $lk$l2$t(k,2), ..., $lk$l(k-1)t(k,k-1)

_V_a_l_u_e:

     In the "table", "matrix", "numeric" and "character" interfaces,
     the value of the Upper limit of the confidence interval for the
     Sorensen-Dice dissimilarity. When 'boot == TRUE', this result also
     haves a an extra attribute: "eff.nboot" which corresponds to the
     number of effective bootstrap replicats, see the details section.
     In the "list" and "tableList" interfaces, the result is the
     symmetric matrix of all pairwise upper limits.

_M_e_t_h_o_d_s (_b_y _c_l_a_s_s):

        • 'duppSorensen(table)': S3 method for class "table"

        • 'duppSorensen(matrix)': S3 method for class "matrix"

        • 'duppSorensen(numeric)': S3 method for class "numeric"

        • 'duppSorensen(character)': S3 method for class "character"

        • 'duppSorensen(list)': S3 method for class "list"

        • 'duppSorensen(tableList)': S3 method for class "tableList"

_S_e_e _A_l_s_o:

     'buildEnrichTable' for constructing contingency tables of mutual
     enrichment, 'nice2x2Table' for checking contingency tables
     validity, 'dSorensen' for computing the Sorensen-Dice
     dissimilarity, 'seSorensen' for computing the standard error of
     the dissimilarity, 'equivTestSorensen' for an equivalence test.

_E_x_a_m_p_l_e_s:

     # Gene lists 'atlas' and 'sanger' in 'Cangenes' dataset. Table of joint enrichment
     # of GO items in ontology BP at level 3.
     data(tab_atlas.sanger_BP3)
     ?tab_atlas.sanger_BP3
     duppSorensen(tab_atlas.sanger_BP3)
     dSorensen(tab_atlas.sanger_BP3) + qnorm(0.95) * seSorensen(tab_atlas.sanger_BP3)
     # Using the bootstrap approximation instead of the normal approximation to
     # the sampling distribution of (^d - d) / se(^d):
     duppSorensen(tab_atlas.sanger_BP3, boot = TRUE)
     
     # Contingency table as a numeric vector:
     duppSorensen(c(56, 1, 30, 47))
     duppSorensen(c(56, 1, 30))
     
     # Upper confidence limit for the Sorensen-Dice dissimilarity, from scratch,
     # directly from two gene lists:
     # (These examples may be considerably time consuming due to many enrichment
     # tests to build the contingency tables of mutual enrichment)
     # data(pbtGeneLists)
     # ?pbtGeneLists
     # data(humanEntrezIDs)
     # duppSorensen(pbtGeneLists[[2]], pbtGeneLists[[4]],
     #              onto = "CC", GOLevel = 5,
     #              geneUniverse = humanEntrezIDs, orgPackg = "org.Hs.eg.db")
     # Even more time consuming (all pairwise values):
     # duppSorensen(pbtGeneLists,
     #              onto = "CC", GOLevel = 5,
     #              geneUniverse = humanEntrezIDs, orgPackg = "org.Hs.eg.db")
     

> duppSorensen(tab_atlas.sanger_BP3)
[1] 0.3859598
> # This confidence limit is based on an assimptotic normal N(0,1)
> # approximation to the distribution of (dSampl - d) / se, where
> # dSampl stands for the sample dissimilarity, d for the true dissimilarity
> # and se for the sample dissimilarity standard error estimate.
> 
> # Upper confidence limit but using a Student's t instead of a N(0,1)
> # (just as an example, not recommended -no theoretical justification)
> df <- sum(tab_atlas.sanger_BP3[1:3]) - 2
> duppSorensen(tab_atlas.sanger_BP3, z.conf.level = qt(1 - 0.95, df))
[1] 0.3870921
> 
> # Upper confidence limit but using a bootstrap approximation
> # to the sampling distribution, instead of a N(0,1)
> set.seed(123)
> duppSorensen(tab_atlas.sanger_BP3, boot = TRUE)
[1] 0.3941622
attr(,"eff.nboot")
[1] 10000
> 
> # Some computations on diverse data structures:
> badConti <- as.table(matrix(c(501, 27, 36, 12, 43, 15, 0, 0, 0),
+                             nrow = 3, ncol = 3,
+                             dimnames = list(c("a1","a2","a3"),
+                                             c("b1", "b2","b3"))))
> tryCatch(nice2x2Table(badConti), error = function(e) {return(e)})
<simpleError in nice2x2Table.table(badConti): Not a 2x2 table>
> 
> incompleteConti <- badConti[1,1:min(2,ncol(badConti)), drop = FALSE]
> incompleteConti
    b1  b2
a1 501  12
> tryCatch(nice2x2Table(incompleteConti), error = function(e) {return(e)})
<simpleError in nice2x2Table.table(incompleteConti): Not a 2x2 table>
> 
> contiAsVector <- c(32, 21, 81, 1439)
> nice2x2Table(contiAsVector)
[1] TRUE
> contiAsVector.mat <- matrix(contiAsVector, nrow = 2)
> contiAsVector.mat
     [,1] [,2]
[1,]   32   81
[2,]   21 1439
> contiAsVectorLen3 <- c(32, 21, 81)
> nice2x2Table(contiAsVectorLen3)
[1] TRUE
> 
> tryCatch(dSorensen(badConti), error = function(e) {return(e)})
<simpleError in nice2x2Table.table(x): Not a 2x2 table>
> 
> # Apparently, the next order works fine, but returns a wrong value!
> dSorensen(badConti, check.table = FALSE)
[1] 0.05915493
> 
> tryCatch(dSorensen(incompleteConti), error = function(e) {return(e)})
<simpleError in nice2x2Table.table(x): Not a 2x2 table>
> dSorensen(contiAsVector)
[1] 0.6144578
> dSorensen(contiAsVector.mat)
[1] 0.6144578
> dSorensen(contiAsVectorLen3)
[1] 0.6144578
> dSorensen(contiAsVectorLen3, check.table = FALSE)
[1] 0.6144578
> dSorensen(c(0,0,0,45))
[1] NaN
> 
> tryCatch(seSorensen(badConti), error = function(e) {return(e)})
<simpleError in nice2x2Table.table(x): Not a 2x2 table>
> tryCatch(seSorensen(incompleteConti), error = function(e) {return(e)})
<simpleError in nice2x2Table.table(x): Not a 2x2 table>
> seSorensen(contiAsVector)
[1] 0.04818012
> seSorensen(contiAsVector.mat)
[1] 0.04818012
> seSorensen(contiAsVectorLen3)
[1] 0.04818012
> seSorensen(contiAsVectorLen3, check.table = FALSE)
[1] 0.04818012
> tryCatch(seSorensen(contiAsVectorLen3, check.table = "not"), error = function(e) {return(e)})
<simpleError in seSorensen.numeric(contiAsVectorLen3, check.table = "not"): Argument 'check.table' must be logical>
> seSorensen(c(0,0,0,45))
[1] NaN
> 
> tryCatch(duppSorensen(badConti), error = function(e) {return(e)})
<simpleError in nice2x2Table.table(x): Not a 2x2 table>
> tryCatch(duppSorensen(incompleteConti), error = function(e) {return(e)})
<simpleError in nice2x2Table.table(x): Not a 2x2 table>
> duppSorensen(contiAsVector)
[1] 0.6937071
> duppSorensen(contiAsVector.mat)
[1] 0.6937071
> set.seed(123)
> duppSorensen(contiAsVector, boot = TRUE)
[1] 0.6922658
attr(,"eff.nboot")
[1] 10000
> set.seed(123)
> duppSorensen(contiAsVector.mat, boot = TRUE)
[1] 0.6922658
attr(,"eff.nboot")
[1] 10000
> duppSorensen(contiAsVectorLen3)
[1] 0.6937071
> # Bootstrapping requires full contingency tables (4 values)
> set.seed(123)
> tryCatch(duppSorensen(contiAsVectorLen3, boot = TRUE), error = function(e) {return(e)})
<simpleError in duppSorensen.numeric(contiAsVectorLen3, boot = TRUE): Bootstraping requires a numeric vector of 4 frequencies>
> duppSorensen(c(0,0,0,45))
[1] NaN
> 
> # Equivalence test, H0: d >= d0 vs  H1: d < d0 (d0 = 0.4444)
> ?equivTestSorensen
equivTestSorensen          package:goSorensen          R Documentation

_E_q_u_i_v_a_l_e_n_c_e _t_e_s_t _b_a_s_e_d _o_n _t_h_e _S_o_r_e_n_s_e_n-_D_i_c_e _d_i_s_s_i_m_i_l_a_r_i_t_y

_D_e_s_c_r_i_p_t_i_o_n:

     Equivalence test based on the Sorensen-Dice dissimilarity,
     computed either by an asymptotic normal approach or by a bootstrap
     approach.

_U_s_a_g_e:

     equivTestSorensen(x, ...)
     
     ## S3 method for class 'table'
     equivTestSorensen(
       x,
       d0 = 1/(1 + 1.25),
       conf.level = 0.95,
       boot = FALSE,
       nboot = 10000,
       check.table = TRUE,
       ...
     )
     
     ## S3 method for class 'matrix'
     equivTestSorensen(
       x,
       d0 = 1/(1 + 1.25),
       conf.level = 0.95,
       boot = FALSE,
       nboot = 10000,
       check.table = TRUE,
       ...
     )
     
     ## S3 method for class 'numeric'
     equivTestSorensen(
       x,
       d0 = 1/(1 + 1.25),
       conf.level = 0.95,
       boot = FALSE,
       nboot = 10000,
       check.table = TRUE,
       ...
     )
     
     ## S3 method for class 'character'
     equivTestSorensen(
       x,
       y,
       d0 = 1/(1 + 1.25),
       conf.level = 0.95,
       boot = FALSE,
       nboot = 10000,
       check.table = TRUE,
       ...
     )
     
     ## S3 method for class 'list'
     equivTestSorensen(
       x,
       d0 = 1/(1 + 1.25),
       conf.level = 0.95,
       boot = FALSE,
       nboot = 10000,
       check.table = TRUE,
       ...
     )
     
     ## S3 method for class 'tableList'
     equivTestSorensen(
       x,
       d0 = 1/(1 + 1.25),
       conf.level = 0.95,
       boot = FALSE,
       nboot = 10000,
       check.table = TRUE,
       ...
     )
     
_A_r_g_u_m_e_n_t_s:

       x: either an object of class "table", "matrix", "numeric",
          "character", "list" or "tableList". See the details section
          for more information.

     ...: extra parameters for function 'buildEnrichTable'.

      d0: equivalence threshold for the Sorensen-Dice dissimilarity, d.
          The null hypothesis states that d >= d0, i.e., inequivalence
          between the compared gene lists and the alternative that d <
          d0, i.e., equivalence or dissimilarity irrelevance (up to a
          level d0).

conf.level: confidence level of the one-sided confidence interval, a
          value between 0 and 1.

    boot: boolean. If TRUE, the confidence interval and the test
          p-value are computed by means of a bootstrap approach instead
          of the asymptotic normal approach. Defaults to FALSE.

   nboot: numeric, number of initially planned bootstrap replicates.
          Ignored if 'boot == FALSE'. Defaults to 10000.

check.table: Boolean. If TRUE (default), argument 'x' is checked to
          adequately represent a 2x2 contingency table (or an aggregate
          of them) or gene lists producing a correct table. This
          checking is performed by means of function 'nice2x2Table'.

       y: an object of class "character" representing a list of gene
          identifiers.

_D_e_t_a_i_l_s:

     This function computes either the normal asymptotic or the
     bootstrap equivalence test based on the Sorensen-Dice
     dissimilarity, given a 2x2 arrangement of frequencies (either
     implemented as a "table", a "matrix" or a "numeric" object):

       n11   n10 
       n01  n00, 
      
     The subindex '11' corresponds to those GO items enriched in both
     lists, '01' to items enriched in the second list but not in the
     first one, '10' to items enriched in the first list but not
     enriched in the second one and '00' corresponds to those GO items
     non enriched in both gene lists, i.e., to the double negatives, a
     value which is ignored in the computations.

     In the "numeric" interface, if 'length(x) >= 4', the values are
     interpreted as

     (n_11, n_01, n_10, n_00), always in this order and discarding
     extra values if necessary.

     If 'x' is an object of class "character", then 'x' (and 'y') must
     represent two "character" vectors of valid gene identifiers. Then
     the equivalence test is performed between 'x' and 'y', after
     internally summarizing them as a 2x2 contingency table of joint
     enrichment. This last operation is performed by function
     'buildEnrichTable' and "valid gene identifiers" stands for the
     coherency of these gene identifiers with the arguments
     'geneUniverse' and 'orgPackg' of 'buildEnrichTable', passed by the
     ellipsis argument '...' in 'equivTestSorensen'.

     If 'x' is an object of class "list", each of its elements must be
     a "character" vector of gene identifiers. Then all pairwise
     equivalence tests are performed between these gene lists.

     Class "tableList" corresponds to objects representing all mutual
     enrichment contingency tables generated in a pairwise fashion:
     Given gene lists l1, l2, ..., lk, an object of class "tableList"
     (typically constructed by a call to function 'buildEnrichTable')
     is a list of lists of contingency tables tij generated from each
     pair of gene lists i and j, with the following structure:

     $l2

     $l2$l1$t21

     $l3

     $l3$l1$t31, $l3$l2$t32

     ...

     $lk$l1$tk1, $lk$l2$tk2, ..., $lk$l(k-1)tk(k-1)

     If 'x' is an object of class "tableList", the test is performed
     over each one of these tables.

     The test is based on the fact that the studentized statistic (^d -
     d) / ^se is approximately distributed as a standard normal. ^d
     stands for the sample Sorensen-Dice dissimilarity, d for its true
     (unknown) value and ^se for the estimate of its standard error.
     This result is asymptotically correct, but the true distribution
     of the studentized statistic is not exactly normal for finite
     samples, with a heavier left tail than expected under the Gaussian
     model, which may produce some type I error inflation. The
     bootstrap method provides a better approximation to this
     distribution. In the bootstrap approach, 'nboot' new bootstrap
     contingency tables are generated from a multinomial distribution
     with parameters 'size =' (n11 + n01 + n10 + n00) and probabilities
     %. Sometimes, some of these generated tables may present so low
     frequencies of enrichment that make them unable for Sorensen-Dice
     computations. As a consequence, the number of effective bootstrap
     samples may be lower than the number of initially planned ones,
     'nboot', but our simulation studies concluded that this makes the
     test more conservative, less prone to reject a truly false null
     hypothesis of inequivalence, but in any case protects from
     inflating the type I error.

     In a bootstrap test result, use 'getNboot' to access the number of
     initially planned bootstrap replicates and 'getEffNboot' to access
     the number of finally effective bootstrap replicates.

_V_a_l_u_e:

     For all interfaces (except for the "list" and "tableList"
     interfaces) the result is a list of class "equivSDhtest" which
     inherits from "htest", with the following components:

     statistic the value of the studentized statistic (dSorensen(x) -
          d0) / seSorensen(x)

     p.value the p-value of the test

     conf.int the one-sided confidence interval (0, dUpp]

     estimate the Sorensen dissimilarity estimate, dSorensen(x)

     null.value the value of d0

     stderr the standard error of the Sorensen dissimilarity estimate,
          seSorensen(x), used as denominator in the studentized
          statistic

     alternative a character string describing the alternative
          hypothesis

     method a character string describing the test

     data.name a character string giving the names of the data

     enrichTab the 2x2 contingency table of joint enrichment whereby
          the test was based

     For the "list" and "tableList" interfaces, the result is an
     "equivSDhtestList", a list of objects with all pairwise
     comparisons, each one being an object of "equivSDhtest" class.

_M_e_t_h_o_d_s (_b_y _c_l_a_s_s):

        • 'equivTestSorensen(table)': S3 method for class "table"

        • 'equivTestSorensen(matrix)': S3 method for class "matrix"

        • 'equivTestSorensen(numeric)': S3 method for class "numeric"

        • 'equivTestSorensen(character)': S3 method for class
          "character"

        • 'equivTestSorensen(list)': S3 method for class "list"

        • 'equivTestSorensen(tableList)': S3 method for class
          "tableList"

_S_e_e _A_l_s_o:

     'nice2x2Table' for checking and reformatting data, 'dSorensen' for
     computing the Sorensen-Dice dissimilarity, 'seSorensen' for
     computing the standard error of the dissimilarity, 'duppSorensen'
     for the upper limit of a one-sided confidence interval of the
     dissimilarity. 'getTable', 'getPvalue', 'getUpper', 'getSE',
     'getNboot' and 'getEffNboot' for accessing specific fields in the
     result of these testing functions. 'update' for updating the
     result of these testing functions with alternative equivalence
     limits, confidence levels or to convert a normal result in a
     bootstrap result or the reverse.

_E_x_a_m_p_l_e_s:

     # Gene lists 'atlas' and 'sanger' in 'allOncoGeneLists' dataset. Table of joint enrichment
     # of GO items in ontology BP at level 3.
     data(tab_atlas.sanger_BP3)
     tab_atlas.sanger_BP3
     equivTestSorensen(tab_atlas.sanger_BP3)
     # Bootstrap test:
     equivTestSorensen(tab_atlas.sanger_BP3, boot = TRUE)
     
     # Equivalence tests from scratch, directly from gene lists:
     # (These examples may be considerably time consuming due to many enrichment
     # tests to build the contingency tables of mutual enrichment)
     # ?pbtGeneLists
     # Gene universe:
     # data(humanEntrezIDs)
     # equivTestSorensen(pbtGeneLists[["IRITD3"]], pbtGeneLists[["IRITD5"]],
     #                   geneUniverse = humanEntrezIDs, orgPackg = "org.Hs.eg.db",
     #                   onto = "CC", GOLevel = 5)
     # Bootstrap instead of normal approximation test:
     # equivTestSorensen(pbtGeneLists[["IRITD3"]], pbtGeneLists[["IRITD5"]],
     #                   geneUniverse = humanEntrezIDs, orgPackg = "org.Hs.eg.db",
     #                   onto = "CC", GOLevel = 5,
     #                   boot = TRUE)
     
     # Essentially, the above code makes:
     # IRITD3vs5.CC5 <- buildEnrichTable(pbtGeneLists[["IRITD3"]], pbtGeneLists[["IRITD5"]],
     #                                   geneUniverse = humanEntrezIDs, orgPackg = "org.Hs.eg.db",
     #                                   onto = "CC", GOLevel = 5)
     # IRITD3vs5.CC5
     # equivTestSorensen(IRITD3vs5.CC5)
     # equivTestSorensen(IRITD3vs5.CC5, boot = TRUE)
     # (Note that building first the contingency table may be advantageous to save time!)
     
     # All pairwise equivalence tests:
     # equivTestSorensen(pbtGeneLists,
     #                   geneUniverse = humanEntrezIDs, orgPackg = "org.Hs.eg.db",
     #                   onto = "CC", GOLevel = 5)
     
     
     # Equivalence test on a contingency table represented as a numeric vector:
     equivTestSorensen(c(56, 1, 30, 47))
     equivTestSorensen(c(56, 1, 30, 47), boot = TRUE)
     equivTestSorensen(c(56, 1, 30))
     # Error: all frequencies are needed for bootstrap:
     try(equivTestSorensen(c(56, 1, 30), boot = TRUE), TRUE)
     

> equiv.atlas.sanger <- equivTestSorensen(tab_atlas.sanger_BP3)
> equiv.atlas.sanger

	Normal asymptotic test for 2x2 contingency tables based on the
	Sorensen-Dice dissimilarity

data:  tab_atlas.sanger_BP3
(d - d0) / se = -2.801, p-value = 0.002547
alternative hypothesis: true equivalence limit d0 is less than 0.4444444
95 percent confidence interval:
 0.0000000 0.3859598
sample estimates:
Sorensen dissimilarity 
             0.3027523 
attr(,"se")
standard error 
    0.05058655 

> getTable(equiv.atlas.sanger)
                 Enriched in sanger
Enriched in atlas TRUE FALSE
            TRUE    38    31
            FALSE    2   452
> getPvalue(equiv.atlas.sanger)
    p-value 
0.002547349 
> 
> tryCatch(equivTestSorensen(badConti), error = function(e) {return(e)})
<simpleError in nice2x2Table.table(x): Not a 2x2 table>
> tryCatch(equivTestSorensen(incompleteConti), error = function(e) {return(e)})
<simpleError in nice2x2Table.table(x): Not a 2x2 table>
> equivTestSorensen(contiAsVector)

	Normal asymptotic test for 2x2 contingency tables based on the
	Sorensen-Dice dissimilarity

data:  contiAsVector
(d - d0) / se = 3.5287, p-value = 0.9998
alternative hypothesis: true equivalence limit d0 is less than 0.4444444
95 percent confidence interval:
 0.0000000 0.6937071
sample estimates:
Sorensen dissimilarity 
             0.6144578 
attr(,"se")
standard error 
    0.04818012 

> equivTestSorensen(contiAsVector.mat)

	Normal asymptotic test for 2x2 contingency tables based on the
	Sorensen-Dice dissimilarity

data:  contiAsVector.mat
(d - d0) / se = 3.5287, p-value = 0.9998
alternative hypothesis: true equivalence limit d0 is less than 0.4444444
95 percent confidence interval:
 0.0000000 0.6937071
sample estimates:
Sorensen dissimilarity 
             0.6144578 
attr(,"se")
standard error 
    0.04818012 

> set.seed(123)
> equivTestSorensen(contiAsVector.mat, boot = TRUE)

	Bootstrap test for 2x2 contingency tables based on the Sorensen-Dice
	dissimilarity (10000 bootstrap replicates)

data:  contiAsVector.mat
(d - d0) / se = 3.5287, p-value = 0.9996
alternative hypothesis: true equivalence limit d0 is less than 0.4444444
95 percent confidence interval:
 0.0000000 0.6922658
sample estimates:
Sorensen dissimilarity 
             0.6144578 
attr(,"se")
standard error 
    0.04818012 

> equivTestSorensen(contiAsVectorLen3)

	Normal asymptotic test for 2x2 contingency tables based on the
	Sorensen-Dice dissimilarity

data:  contiAsVectorLen3
(d - d0) / se = 3.5287, p-value = 0.9998
alternative hypothesis: true equivalence limit d0 is less than 0.4444444
95 percent confidence interval:
 0.0000000 0.6937071
sample estimates:
Sorensen dissimilarity 
             0.6144578 
attr(,"se")
standard error 
    0.04818012 

> 
> tryCatch(equivTestSorensen(contiAsVectorLen3, boot = TRUE), error = function(e) {return(e)})
<simpleError in equivTestSorensen.numeric(contiAsVectorLen3, boot = TRUE): Bootstraping requires a numeric vector of 4 frequencies>
> 
> equivTestSorensen(c(0,0,0,45))

	No test performed due non finite (d - d0) / se statistic

data:  c(0, 0, 0, 45)
(d - d0) / se = NaN, p-value = NA
alternative hypothesis: true equivalence limit d0 is less than 0.4444444
95 percent confidence interval:
   0 NaN
sample estimates:
Sorensen dissimilarity 
                   NaN 
attr(,"se")
standard error 
           NaN 

> 
> # Sorensen-Dice computations from scratch, directly from gene lists
> data(allOncoGeneLists)
> ?allOncoGeneLists
allOncoGeneLists          package:goSorensen           R Documentation

_7 _g_e_n_e _l_i_s_t_s _p_o_s_s_i_b_l_y _r_e_l_a_t_e_d _w_i_t_h _c_a_n_c_e_r

_D_e_s_c_r_i_p_t_i_o_n:

     An object of class "list" of length 7. Each one of its elements is
     a "character" vector of gene identifiers. Only gene lists of
     length almost 100 were taken from their source web. Take these
     lists just as an illustrative example, they are not automatically
     updated.

_U_s_a_g_e:

     data(allOncoGeneLists)
     
_F_o_r_m_a_t:

     An object of class "list" of length 7. Each one of its elements is
     a "character" vector of gene identifiers.

_S_o_u_r_c_e:

     <http://www.bushmanlab.org/links/genelists>


> data(humanEntrezIDs)
> # First, the mutual GO node enrichment tables are built, then computations
> # proceed from these contingency tables.
> # Building the contingency tables is a slow process (many enrichment tests)
> normTest <- equivTestSorensen(allOncoGeneLists[["atlas"]], allOncoGeneLists[["sanger"]],
+                               listNames = c("atlas", "sanger"),
+                               onto = "BP", GOLevel = 5,
+                               geneUniverse = humanEntrezIDs, orgPackg = "org.Hs.eg.db")

Example timings

goSorensen.Rcheck/goSorensen-Ex.timings

nameusersystemelapsed
allBuildEnrichTable0.0010.0010.001
allEquivTestSorensen0.1510.0290.191
allHclustThreshold0.1610.0070.179
allSorenThreshold0.1630.0080.192
buildEnrichTable33.566 3.32641.137
dSorensen0.1570.0710.997
duppSorensen0.2640.0670.540
equivTestSorensen0.4070.0190.458
getDissimilarity0.4180.2201.195
getEffNboot3.0650.1233.632
getNboot3.0700.1123.518
getPvalue0.4310.2351.915
getSE0.4230.2181.271
getTable0.5130.3282.428
getUpper0.4100.2021.706
hclustThreshold1540.332 85.0921915.797
nice2x2Table0.0040.0040.010
seSorensen0.0030.0040.007
sorenThreshold0.0870.0080.099
upgrade1.4450.4772.142