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

Hervé Pagès hpages at fhcrc.org
Tue Sep 23 19:43:05 CEST 2014


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 | hpages at 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: hpages at fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



More information about the Bioc-devel mailing list