[BioC] mget() error with NA values
James W. MacDonald
jmacdon at med.umich.edu
Thu Apr 30 17:08:52 CEST 2009
Christian Kohler wrote:
> DeaR bioconductors,
> we run an internal microarray analysis pipeline and switched today from
> R/BioC (2.8.1/2.3) to 2.9/2.4.
> After running some test code, I came across the following error:
>> unique(unlist(mget(x, env=hgu133plus2ENTREZID,ifnotfound=NA)))
> when I run this code snippet with 2.8.1/2.3 the corresponding return
> value is
>>  NA
> x <- rep(NA, 10)
> mget(x, hgu95av2ENTREZID)
Error in .checkKeysAreWellFormed(keys) :
keys must be supplied in a character vector with no NAs
R version 2.8.1 (2008-12-22)
attached base packages:
 tools stats graphics grDevices datasets utils methods
other attached packages:
 hgu95av2.db_2.2.5 RSQLite_0.7-1 DBI_0.2-4
 AnnotationDbi_1.4.3 Biobase_2.2.2
> but with 2.9/2.4 I got the following error:
>> Error during wrapup: keys must be supplied in a character vector with
> no NAs
> This causes our pipeline to break there and stop the analysis while in
> the previous case the analysis still continued with NA values.
> Please do not think that I am a picky person, but was there any urgent
> need to change the behaviour of mget()?
> Is it possible to somehow bypass this?
The easiest way is to strip the NA values, using the canonical
x <- x[!is.na(x)]
> Thanks a lot for any help.
James W. MacDonald, M.S.
University of Michigan
Department of Human Genetics
1241 E. Catherine St.
Ann Arbor MI 48109-5618
More information about the Bioconductor