[BioC] Building a package: R CMD check problems

Raffaele Calogero raffaele.calogero at unito.it
Tue Aug 30 16:29:25 CEST 2005


Since we have started to use Applied Biosystem ABI 1700 arrays we have 
build a set of functions to handle these array data and we want now to 
build a package.
The ABI 1700 data are stored in a S4 class called applera.
We created a zzz.R file with:
.First.lib <- function(libname, pkgname, where){
            if(!require(methods)) stop("We require methods for package 
Applera")
        where <- match(paste("package:", pkgname, sep=""), search())
        .initApplera(where)
}

And we embedded the class and methods in the following way:
.initApplera <- function(where){
require("Biobase") || stop("cannot load applera without Biobase")
require("affy") || stop("cannot load applera without affy")
setClass("applera", representation(Organism="character", 
Geneid="character", Signal="exprSet", Sdev="exprSet", Cv="exprSet", 
Sn="exprSet", Flags="exprSet", Ctrl="list"), contains="exprSet", 
where=where)
#Organism slot
if(is.null(getGeneric("organism"))) setGeneric("organism", 
function(object) standardGeneric("organism"))
setMethod("organism", signature(object="applera"), function(object) 
{object at Organism})
#Primary geneId slot
if(is.null(getGeneric("geneid")))setGeneric("geneid", function(object) 
standardGeneric("geneid"))
setMethod("geneid", signature(object="applera"), function(object) { 
primaryId <- as.vector(object at Geneid)
names(primaryId) <- geneNames(object at Signal)
return(primaryId) })
...
}

The problem comes during the R CMD check applera.
Everything work  fine until I run examples for the class object and for 
methods having a name already defined in other packages (e.g. organism 
is already defined in "chromLocation") as instead I get the error
Error: cannot find the function "geneid"
Esecution halted
 if I run an example using the method "geneid" that was not previously 
defined.
I do not understand where is the error since the "organism" method and 
the "geneid" method have been defined in the same way.
Any suggestion?

Raffaele

-- 

----------------------------------------
Prof. Raffaele A. Calogero
Bioinformatics and Genomics Unit
Dipartimento di Scienze Cliniche e Biologiche
c/o Az. Ospedaliera S. Luigi
Regione Gonzole 10, Orbassano
10043 Torino
tel.   ++39 0116705420
Lab.   ++39 0116705408
Fax    ++39 0119038639
Mobile ++39 3333827080
email: raffaele.calogero at unito.it
www:   www.bioinformatica.unito.it



More information about the Bioconductor mailing list