[Bioc-devel] Different behavior of get() between 2.9.0 and later versions`
Robert Castelo
robert.castelo at upf.edu
Wed Nov 4 14:05:55 CET 2009
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
EOF
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.
More information about the Bioc-devel
mailing list