[BioC] building a new annotation
mcarlson at fhcrc.org
Thu Mar 12 22:32:56 CET 2009
createSimpleBimap is really meant for the case where someone is using an
custom annotation package that they have generated using SQLForge (you
don't want to do that), and they have added a single table which
contains all the information that they wish to represent. In this very
simple case, createSimpleBimap() will add a mapping to your package.
But otherwise you will probably want to have a look at (as an example)
the createAnnObjs.HUMANCHIP_DB.R in the AnnotationDbi package, and also
at the zzz.R inside the hgu95av2.db package for an example of how these
mappings can be set up. If you look at these examples you will see some
L2RChains being used to define the set of mappings needed for a package.
Please keep the conversation "on list" so that others can benefit from
your questions. And while we are on that topic, this conversation would
probably be a better fit on the bioc-devel mailing list than here.
Because you are really talking about defining a new set of interfaces
for interacting with a completely different SQLite database schema than
anything else we support. And actually, you really might not need to
make a set of mappings at all. You might instead just want to write
some simple functions to retrieve pertinent data from the database. I
still don't know which of the data in this database you want to use or
what you want to do with it, so it's difficult for me to really advise
you on what is more appropriate at this time.
Chirag Patel wrote:
> Thanks so much for your response... AnnotationDbi may be the way to go
> for me.
> I have a couple of more questions. I am working through the
> vigenette, and I am having trouble understanding how the objects are
> mapped to the underlying db. How exactly do we create these objects?
> I am guessing that I should start with 'createSimpleBimap'.
> For example, if we use the example of the affy annotation db,
> "hgu95av2.db", we have the bimpa objects hgu95av2ACCNUM,
> hgu95av2ALIAS2PROBE, etc...
> How do we specify these objects?
> And what is the 'L2Rchain' structure you talk about below?
> On Mar 12, 2009, at 10:38 AM, Marc Carlson wrote:
>> Hi Chirag,
>> If you are building this to a custom database that you already have in
>> hand the you cannot use SQLforge because that will try to make a
>> customized database for you. And AnnBuilder is gone now (and would not
>> have helped you here anyways). Instead, you might want to look closely
>> at the code in AnnotationDbi which defines several types of databases
>> along with the mappings to represent the underlying DB data in R using
>> an L2Rchain structure. Access to these structures outside the domain of
>> AnnotationDbi is planned to be made more accessible in the future.
>> Alternatively, (depending completely upon what kind of access you want
>> to provide to your users), you could also pretty easily just write some
>> simple accessors to talk to this database. Direct access to SQLite
>> databases is pretty straightforward from R using the RSQlite and DBI
>> packages. There are some examples of this in the AnnotationDbi vignette
>> of this direct style of access that you can look at here.
>> If you have further questions please let me know,
>> Chirag Patel wrote:
>>> I would like to build a new annotation using data from the CTD
>>> This data contains in sqlite DB a main table with the schema:
>>> entrez_gene_id, chemical_id, relation_id, and pubmed_citation_id.
>>> Relation_id is a internal id I use to manage relations between the
>>> chemical and genes. Chemical_id is an id used by the CTD to identify
>>> How may I best do this using the tools available on bioconductor?-- I
>>> was thinking of using AnnBuilder or AnnotationDbi, but am unsure if
>>> this is the right way to go; this is a first time building a package
>>> or an annotation.
>>> Any help would be much appreciated,
>>> Bioconductor mailing list
>>> Bioconductor at stat.math.ethz.ch
>>> Search the archives:
More information about the Bioconductor