Thanks, Martin! That is just what I was looking for.

Cheers,
Keith


On Sun, Jul 13, 2014 at 8:32 AM, Martin Morgan <mtmorgan@fhcrc.org> wrote:

> On 07/13/2014 05:24 AM, Keith Hughitt wrote:
>
>> (patch with above change...)
>>
>>
> it's better to amend the NAMESPACE to include
>
>   importFrom(AnnotationDbi, select)
>
> The codetoolsBioC package (available from the Bioconductor svn repository)
> suggests (this is not completely reliable) that there might be other
> namaespace import issues. (some would argue for less selective import,
> because the code is then easier to maintain, e.g., import(BiocGenerics),
> etc).
>
> > codetoolsBioC::writeNamespaceImports("goseq")
> #Generated by codetoolsBioC version 0.0.23
> #Timestamp: Sun Jul 13 05:29:07 2014
>
> #Imports: AnnotationDbi, BiasedUrn, BiocGenerics, DBI, geneLenDataBase,
> #         GenomeInfoDb, GO.db, graphics, IRanges, methods, mgcv,
> #         S4Vectors, stats, utils
>
> importMethodsFrom(AnnotationDbi, select, toTable)
>
> importMethodsFrom(BiocGenerics, as.data.frame, as.vector, cbind,
>                   colnames, "colnames<-", get, lapply, mapply, match,
>                   ncol, nrow, order, paste, rbind, rownames,
>                   "rownames<-", sapply, sort, table, unique, unlist)
>
> importMethodsFrom(DBI, summary)
>
> importMethodsFrom(GenomeInfoDb, "genome<-")
>
> importMethodsFrom(IRanges, gsub, mean, split, tolower, which)
>
> importMethodsFrom(methods, show)
>
> importMethodsFrom(S4Vectors, "%in%", t)
>
> importFrom(BiasedUrn, dWNCHypergeo, pWNCHypergeo)
>
> importFrom(geneLenDataBase, unfactor)
>
> importFrom(graphics, lines, plot)
>
> importFrom(mgcv, gam, mono.con, pcls, Predict.matrix, s, smoothCon)
>
> importFrom(stats, approx, binomial, dhyper, median, phyper, runif)
>
> importFrom(utils, relist)
>
> importFrom(GO.db, GO.db)
>
>
>
>> On Sat, Jul 12, 2014 at 10:07 PM, Keith Hughitt <keith.hughitt@gmail.com>
>> wrote:
>>
>>  To reproduce, load goseq followed by dplyr and call the "goseq" function.
>>>
>>> Example output:
>>>
>>> Error in UseMethod("select") :
>>>    no applicable method for 'select' applied to an object of class
>>> "c('GODb', 'AnnotationDb', 'envRefClass', '.environment', 'refClass',
>>> 'environment', 'refObject', 'AssayData')"
>>> Calls: render ... withCallingHandlers -> withVisible -> eval -> eval ->
>>> goseq -> select
>>>
>>>
>>> Unloading dplyr resolves the issue:
>>>
>>>      detach("package:dplyr", unload=TRUE)
>>>
>>> Tested in Bioconductor-devel (3.0) + goseq-svn (92448 2014/06/26).
>>>
>>> There is probably a better way to resolve this, but a possible solution
>>> is
>>> to be explicit with the namespace:
>>>
>>>
>>> GOnames=AnnotationDbi::select(GO.db,keys=pvals$category,
>>> columns=c("TERM","ONTOLOGY"))[,2:3]
>>>
>>> Cheers,
>>> Keith
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Bioc-devel@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>>
>>
>
> --
> Computational Biology / Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N.
> PO Box 19024 Seattle, WA 98109
>
> Location: Arnold Building M1 B861
> Phone: (206) 667-2793
>

	[[alternative HTML version deleted]]

