Hi, I have two problems when I import ShortRead into my packages. 1. I get the following warning, when I load my package Warning message: "replacing previous import ‘show’ when loading ‘ShortRead’" --> It looks to me like a conflict between BiocGenerics and ShortRead. How can I get rid of this message?
2. I need a require(ShortRead) in my function even when I import ShortRead entirely. --> Put ShortRead to Depends would solve this issue, but this is not a solution for me. At the moment a have a require in the function and ShortRead in the Suggests field to pass the checks. This is working, but is a hack. Greetings, Anita Here a mini package which shows the same behaviour: ********* NAMESPACE ********* import(methods) import(BiocGenerics) import(ShortRead) export(funA, funB) ****** fun.R ****** funA <- function(){ message("Step A.1") filters <- c(nFilter(2), dustyFilter(0.5)) message("Step A.2") active(filters) <- TRUE } funB <- function(){ message("Step B.1") require(ShortRead) filters <- c(nFilter(2), dustyFilter(0.5)) message("Step B.2") active(filters) <- TRUE } *********** DESCRIPTION *********** Package: anRpackage Type: Package Title: What the package does (short line) Version: 1.0 Date: 2012-11-16 Author: Who wrote it Maintainer: Who to complain to <yourfa...@somewhere.net> Depends: R (>= 2.15.0) Imports: methods, BiocGenerics, ShortRead Description: More about what it does (maybe more than one line) License: What license is it under? > library(anRpackage) Warning message: replacing previous import ‘show’ when loading ‘ShortRead’ > funA() Step A.1 Error in asMethod(object) : could not find function "FilterRules" > funB() Step B.1 Loading required package: ShortRead Loading required package: BiocGenerics Attaching package: ‘BiocGenerics’ The following object(s) are masked from ‘package:stats’: xtabs The following object(s) are masked from ‘package:base’: anyDuplicated, cbind, colnames, duplicated, eval, Filter, Find, get, intersect, lapply, Map, mapply, mget, order, paste, pmax, pmax.int, pmin, pmin.int, Position, rbind, Reduce, rep.int, rownames, sapply, setdiff, table, tapply, union, unique Loading required package: IRanges Loading required package: GenomicRanges Loading required package: Biostrings Loading required package: lattice Loading required package: Rsamtools Loading required package: latticeExtra Loading required package: RColorBrewer Step B.2 > sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] ShortRead_1.16.2 latticeExtra_0.6-24 RColorBrewer_1.0-5 Rsamtools_1.10.2 lattice_0.20-6 [6] Biostrings_2.26.2 GenomicRanges_1.10.5 IRanges_1.16.4 BiocGenerics_0.4.0 anRpackage_1.0 loaded via a namespace (and not attached): [1] Biobase_2.18.0 bitops_1.0-5 grid_2.15.1 hwriter_1.3 parallel_2.15.1 stats4_2.15.1 tools_2.15.1 [8] zlibbioc_1.4.0 -- Anita Lerch Friedrich Miescher Institute Maulbeerstrasse 66 WRO-1066.P22 4058 Basel Phone: +41 (0)61 697 5172 Email: anita.le...@fmi.ch
_______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel