[Bioc-devel] Different behavior of get() between 2.9.0 and later versions`

Marc Carlson mcarlson at fhcrc.org
Wed Nov 4 21:12:40 CET 2009

Hi Luigi and Robert,

For Luigi:  The inconsistency appears to be originating from missing
probes in the mgug4122a probes table.  This only seems to be happening
for certain "corner case" probe packages.  But in the meantime, this is
not a problem with get() or with the org packages.  I will get to the
bottom of what caused this and apply a fix it ASAP wherever it is a
problem (so far very few things seem to be affected).  Thank you for
pointing this out!

And to answer Roberts question:  To get an NA back (in R) from one of
these accessory tables you are adding, you should only have to have null
values in the relevant fields after the import.  No need to put NA
strings into your input files as that will result in NA strings being
stored in the DB.  Just leaving those portions of the input table blank
should result in null values in your database table, which should give
you the results you want when you look at those from R using
AnnotationDbi (meaning NAs). 

So basically your database table should look like this when you query it:


Please let me know if I need to clarify that.


Robert Castelo wrote:
> hi Seth and rest of the list,
> never thought about this till i saw your email and in particular this
> clarification:
>> When you call get() or otherwise retrieve a value from an annotation 
>> package object using a key, like a probe ID, there are three situations:
>> 1. The probe ID is valid and maps to a value in the given object.
>> 2. The probe ID is valid, but does not map to a value so NA is returned.
>> 3. The probe ID is not valid, an error is raised.
> i've built an annotation package for a custom array to which i've added
> a few new sql tables to provide additional mappings to various
> non-standard annotations on the probes (following section 3 -how to add
> extra data into your packages- from vignette SQLForge of AnnotationDbi).
> the way in which i add these data is by creating a flat file with the
> "records" and importing them into the SQL database of the package
> through the unix shell with
> sqlite3 dbName << EOF
> import newdata.txt newtable
> .exit
> where dbName should be the .sqlite file created by popXXXCHIPDB(),
> newdata.txt is the flat file with the data of this new mapping and
> newtable is the SQL table i've specifically created on the .sqlite file
> to support the mapping in my annotation package.
> however, in this way i don't know how to implement the second situation
> you describe. i tried to associate NA's to valid keys having lines
> ..
> whateverkey|NA
> ..
> in the flat file that is imported later but then this NA is not
> interpreted as an NA value but as a string "NA". then i concluded that
> the way i had to do it was to remove those lines and having the user to
> specify the parametere ifnotfound=NA in their get/mget commands.
> so now my question would be (either for you or for whoever in the list
> knows about this). how do i introduce a new mapping into my annotation
> package such that a key is valid but it does not map to a value so that
> NA is returned?
> thanks!
> robert.
> _______________________________________________
> Bioc-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

More information about the Bioc-devel mailing list