Re: [Bioc-devel] Importing summary from AnnotationDbi, Category, GOstats

2014-09-23 Thread Hervé Pagès

Hi Jim,

On 09/23/2014 09:42 AM, James W. MacDonald wrote:

There is an issue on the support site having to do with the inability to
import the summary function from the namespaces from the packages listed in
the subject line. I see the same problem/errors with my affycoretools
package.

When you load ReportingTools, you get the following warnings:

Warning messages:
1: In namespaceImportMethods(ns, loadNamespace(j - imp[[1L]], c(lib.loc,  :
   No generic function found corresponding to requested imported methods for
summary from package AnnotationDbi (malformed exports?)
2: In namespaceImportMethods(ns, loadNamespace(j - imp[[1L]], c(lib.loc,  :
   No generic function found corresponding to requested imported methods for
summary from package Category (malformed exports?)
3: In namespaceImportMethods(ns, loadNamespace(j - imp[[1L]], c(lib.loc,  :
   No generic function found corresponding to requested imported methods for
summary from package GOstats (malformed exports?)


Is this because of the following changes?


r94092 | hpa...@fhcrc.org | 2014-09-12 18:02:34 -0700 (Fri, 12 Sep 2014) |
7 lines
Changed paths:
M /trunk/madman/Rpacks/AnnotationDbi/DESCRIPTION
M /trunk/madman/Rpacks/AnnotationDbi/NAMESPACE
M /trunk/madman/Rpacks/AnnotationDbi/R/createAnnObjs-utils.R
M /trunk/madman/Rpacks/AnnotationDbi/R/createAnnObjs.NCBIORG_DBs.R
M /trunk/madman/Rpacks/AnnotationDbi/R/methods-Inparanoid.R
M /trunk/madman/Rpacks/AnnotationDbi/R/methods-Inparanoid8.R
M /trunk/madman/Rpacks/AnnotationDbi/R/methods-geneCentricDbs.R

- Drop dependency on IRanges (stuff from IRanges needed by AnnotationDbi is
   now in S4Vectors).
- Add dependency on stats4 and import summary() from it. This is an S4
   generic and AnnotationDbi defines and exports S4 methods for it.
- Address the A package almost never needs to use ::: for its own objects
   NOTE from 'R CMD check'.

which included

Index: NAMESPACE
===
--- NAMESPACE (revision 94000)
+++ NAMESPACE (working copy)
@@ -1,11 +1,11 @@
  import(methods)
  import(utils)
+importFrom(stats4, summary)
  import(Biobase)
  import(DBI)
  import(RSQLite)
  import(BiocGenerics)
-importFrom(S4Vectors, isTRUEorFALSE, isSingleString, metadata)
-importFrom(IRanges, elementLengths)
+importFrom(S4Vectors, isTRUEorFALSE, isSingleString, metadata,
elementLengths)

  importFrom(GenomeInfoDb, genomeStyles, extractSeqlevels, mapSeqlevels)
  exportClasses(
@@ -169,9 +169,6 @@
  intraIDMapper,
  idConverter,

-#Needs to be exported from RSQLite
-summary,
-
  ## AnnotationDb
  metadata,

so it appears summary is no longer exported?


Yes, no need to export summary from AnnotationDbi because summary() is a
generic defined in the stats4 package. Before I made that change,
AnnotationDbi was implicitly promoting base::summary() to an S4 generic
which was then a different generic from stats4::summary(). Having these
2  distinct summary() generics was causing the usual troubles when a
user had AnnotationDbi and stats4 in their search path. Also it was
breaking the attract package in some obscure way.

The warnings you get when you load ReportingTools will hopefully
go away if you reinstall the package. Let me know if it doesn't.

Hope this helps,
H.



Best,

Jim






--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fhcrc.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Importing summary from AnnotationDbi, Category, GOstats

2014-09-23 Thread James W. MacDonald
Hi Herve,

No joy:


 biocLite(ReportingTools)
BioC_mirror: http://bioconductor.org
Using Bioconductor version 2.14 (BiocInstaller 1.14.2), R version
  3.1.0.
Installing package(s) 'ReportingTools'
trying URL '
http://bioconductor.org/packages/2.14/bioc/src/contrib/ReportingTools_2.4.0.tar.gz
'
Content type 'application/x-gzip' length 2570348 bytes (2.5 Mb)
opened URL
==
downloaded 2.5 Mb

* installing *source* package ‘ReportingTools’ ...
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Warning in namespaceImportMethods(ns, loadNamespace(j - imp[[1L]],
c(lib.loc,  :
  No generic function found corresponding to requested imported methods for
summary from package AnnotationDbi (malformed exports?)
Warning in namespaceImportMethods(ns, loadNamespace(j - imp[[1L]],
c(lib.loc,  :
  No generic function found corresponding to requested imported methods for
summary from package Category (malformed exports?)
Warning: found methods to import for function ‘summary’ but not the generic
itself
Warning in namespaceImportMethods(ns, loadNamespace(j - imp[[1L]],
c(lib.loc,  :
  No generic function found corresponding to requested imported methods for
summary from package GOstats (malformed exports?)
Warning: found methods to import for function ‘summary’ but not the generic
itself
in method for ‘objectToHTML’ with signature ‘object=ggbio’: no definition
for class “ggbio”
Note: no visible binding for '-' assignment to '.reportDirectory'
Note: no visible binding for '-' assignment to '.reportDirectory'
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Warning in namespaceImportMethods(ns, loadNamespace(j - imp[[1L]],
c(lib.loc,  :
  No generic function found corresponding to requested imported methods for
summary from package AnnotationDbi (malformed exports?)
Warning in namespaceImportMethods(ns, loadNamespace(j - imp[[1L]],
c(lib.loc,  :
  No generic function found corresponding to requested imported methods for
summary from package Category (malformed exports?)
Warning: found methods to import for function ‘summary’ but not the generic
itself
Warning in namespaceImportMethods(ns, loadNamespace(j - imp[[1L]],
c(lib.loc,  :
  No generic function found corresponding to requested imported methods for
summary from package GOstats (malformed exports?)
Warning: found methods to import for function ‘summary’ but not the generic
itself
* DONE (ReportingTools)

And when I load ReportingTools I still get the warnings:

Warning messages:
1: In namespaceImportMethods(ns, loadNamespace(j - imp[[1L]], c(lib.loc,  :
  No generic function found corresponding to requested imported methods for
summary from package AnnotationDbi (malformed exports?)
2: In namespaceImportMethods(ns, loadNamespace(j - imp[[1L]], c(lib.loc,  :
  No generic function found corresponding to requested imported methods for
summary from package Category (malformed exports?)
3: found methods to import for function ‘summary’ but not the generic
itself
4: In namespaceImportMethods(ns, loadNamespace(j - imp[[1L]], c(lib.loc,  :
  No generic function found corresponding to requested imported methods for
summary from package GOstats (malformed exports?)
5: found methods to import for function ‘summary’ but not the generic
itself
 sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] parallel  stats graphics  grDevices utils datasets  methods
[8] base

other attached packages:
[1] ReportingTools_2.4.0 AnnotationDbi_1.26.0 GenomeInfoDb_1.0.2
[4] Biobase_2.24.0   BiocGenerics_0.10.0  RSQLite_0.11.4
[7] DBI_0.3.0knitr_1.6BiocInstaller_1.14.2

loaded via a namespace (and not attached):
 [1] annotate_1.42.1  AnnotationForge_1.6.1BatchJobs_1.3

 [4] BBmisc_1.7   BiocParallel_0.6.1   biomaRt_2.20.0

 [7] Biostrings_2.32.1biovizBase_1.12.3bitops_1.0-6

[10] brew_1.0-6   BSgenome_1.32.0  Category_2.30.0

[13] checkmate_1.4cluster_1.15.2   codetools_0.2-9

[16] colorspace_1.2-4 DESeq2_1.4.5 dichromat_2.0-0

[19] digest_0.6.4 edgeR_3.6.8  evaluate_0.5.5

[22] fail_1.2 foreach_1.4.2formatR_1.0

[25] Formula_1.1-2genefilter_1.46.1geneplotter_1.42.0

[28] GenomicAlignments_1.0.6  GenomicFeatures_1.16.2   GenomicRanges_1.16.4

[31] ggbio_1.12.10ggplot2_1.0.0GO.db_2.14.0

[34] GOstats_2.30.0   graph_1.42.0 grid_3.1.0


Re: [Bioc-devel] Importing summary from AnnotationDbi, Category, GOstats

2014-09-23 Thread James W. MacDonald
Never mind. Installing all of GOstats, Category, AnnotationDbi and
ReportingTools fixed the issue.

Thanks,

Jim



On Tue, Sep 23, 2014 at 1:55 PM, James W. MacDonald jmac...@uw.edu wrote:

 Hi Herve,

 No joy:


  biocLite(ReportingTools)
 BioC_mirror: http://bioconductor.org
 Using Bioconductor version 2.14 (BiocInstaller 1.14.2), R version
   3.1.0.
 Installing package(s) 'ReportingTools'
 trying URL '
 http://bioconductor.org/packages/2.14/bioc/src/contrib/ReportingTools_2.4.0.tar.gz
 '
 Content type 'application/x-gzip' length 2570348 bytes (2.5 Mb)
 opened URL
 ==
 downloaded 2.5 Mb

 * installing *source* package ‘ReportingTools’ ...
 ** R
 ** data
 ** inst
 ** byte-compile and prepare package for lazy loading
 Warning in namespaceImportMethods(ns, loadNamespace(j - imp[[1L]],
 c(lib.loc,  :
   No generic function found corresponding to requested imported methods
 for summary from package AnnotationDbi (malformed exports?)
 Warning in namespaceImportMethods(ns, loadNamespace(j - imp[[1L]],
 c(lib.loc,  :
   No generic function found corresponding to requested imported methods
 for summary from package Category (malformed exports?)
 Warning: found methods to import for function ‘summary’ but not the
 generic itself
 Warning in namespaceImportMethods(ns, loadNamespace(j - imp[[1L]],
 c(lib.loc,  :
   No generic function found corresponding to requested imported methods
 for summary from package GOstats (malformed exports?)
 Warning: found methods to import for function ‘summary’ but not the
 generic itself
 in method for ‘objectToHTML’ with signature ‘object=ggbio’: no
 definition for class “ggbio”
 Note: no visible binding for '-' assignment to '.reportDirectory'
 Note: no visible binding for '-' assignment to '.reportDirectory'
 ** help
 *** installing help indices
 ** building package indices
 ** installing vignettes
 ** testing if installed package can be loaded
 Warning in namespaceImportMethods(ns, loadNamespace(j - imp[[1L]],
 c(lib.loc,  :
   No generic function found corresponding to requested imported methods
 for summary from package AnnotationDbi (malformed exports?)
 Warning in namespaceImportMethods(ns, loadNamespace(j - imp[[1L]],
 c(lib.loc,  :
   No generic function found corresponding to requested imported methods
 for summary from package Category (malformed exports?)
 Warning: found methods to import for function ‘summary’ but not the
 generic itself
 Warning in namespaceImportMethods(ns, loadNamespace(j - imp[[1L]],
 c(lib.loc,  :
   No generic function found corresponding to requested imported methods
 for summary from package GOstats (malformed exports?)
 Warning: found methods to import for function ‘summary’ but not the
 generic itself
 * DONE (ReportingTools)

 And when I load ReportingTools I still get the warnings:

 Warning messages:
 1: In namespaceImportMethods(ns, loadNamespace(j - imp[[1L]], c(lib.loc,
  :
   No generic function found corresponding to requested imported methods
 for summary from package AnnotationDbi (malformed exports?)
 2: In namespaceImportMethods(ns, loadNamespace(j - imp[[1L]], c(lib.loc,
  :
   No generic function found corresponding to requested imported methods
 for summary from package Category (malformed exports?)
 3: found methods to import for function ‘summary’ but not the generic
 itself
 4: In namespaceImportMethods(ns, loadNamespace(j - imp[[1L]], c(lib.loc,
  :
   No generic function found corresponding to requested imported methods
 for summary from package GOstats (malformed exports?)
 5: found methods to import for function ‘summary’ but not the generic
 itself
  sessionInfo()
 R version 3.1.0 (2014-04-10)
 Platform: x86_64-unknown-linux-gnu (64-bit)

 locale:
  [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
  [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
  [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
  [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
  [9] LC_ADDRESS=C   LC_TELEPHONE=C
 [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

 attached base packages:
 [1] parallel  stats graphics  grDevices utils datasets  methods
 [8] base

 other attached packages:
 [1] ReportingTools_2.4.0 AnnotationDbi_1.26.0 GenomeInfoDb_1.0.2
 [4] Biobase_2.24.0   BiocGenerics_0.10.0  RSQLite_0.11.4
 [7] DBI_0.3.0knitr_1.6BiocInstaller_1.14.2

 loaded via a namespace (and not attached):
  [1] annotate_1.42.1  AnnotationForge_1.6.1BatchJobs_1.3

  [4] BBmisc_1.7   BiocParallel_0.6.1   biomaRt_2.20.0

  [7] Biostrings_2.32.1biovizBase_1.12.3bitops_1.0-6

 [10] brew_1.0-6   BSgenome_1.32.0  Category_2.30.0

 [13] checkmate_1.4cluster_1.15.2   codetools_0.2-9

 [16] colorspace_1.2-4 DESeq2_1.4.5 dichromat_2.0-0

 [19] digest_0.6.4 edgeR_3.6.8  evaluate_0.5.5

 [22] fail_1.2 foreach_1.4.2