[BioC] RSQLite and DB problems

James W. MacDonald jmacdon at uw.edu
Mon Sep 30 17:00:28 CEST 2013


Hi Assa,

On Monday, September 30, 2013 9:23:17 AM, Assa Yeroslaviz wrote:
> Hi,
>
> I'm trying to work with the oligo package and the example provided in the
> pdf file to pre-processing exon arrays.
>
> I'm following the commands given in the pdf but I get an error massage when
> trying to query my sqllite DB.
>
> This is what I do:
>
> library(biomaRt)
> ensembl <- useMart("ensembl", dataset="hsapiens_gene_ensembl")
> theIDs <- getBM(attributes="affy_huex_1_0_st_v2",
> filters="entrezgene",values=10948, mart=ensembl)
> names(theIDs) <- 'psets'

Well, I don't think that is actually what you have done, for two 
reasons. Number 1, if you had really done so, you would not have any NA 
values in your results (biomaRt won't return any NA values for a query 
that has a single attribute - it will only return values that do have a 
value). Number 2, getBM() returns a data.frame, which isn't what you 
show below.

If I do what you say you did, I get this:

> head(theIDs)
    psets
1 3720380
2 3720356
3 3720363
4 3720372
5 3720377
6 3720358
> any(is.na(theIDs))
[1] FALSE

So try again, and if it still doesn't work let us know.

Best,

Jim


>
>> theIDs
>    psets    <NA>    <NA>    <NA>    <NA>    <NA>    <NA>    <NA>    <NA>
> <NA>
> 3720380 3720356 3720363 3720372 3720377 3720358 3720375 3720344 3720365
> 3720353
>     <NA>    <NA>    <NA>    <NA>    <NA>    <NA>    <NA>    <NA>    <NA>
> <NA>
> 3720352 3720367 3720373 3720368 3720374 3720370 3720351 3720378 3720355
> 3720371
>     <NA>    <NA>    <NA>    <NA>    <NA>    <NA>    <NA>    <NA>    <NA>
> <NA>
> 3720369 3720360 3720357 3720362 3720364 3720359 3720361 3720354 3720349
> 3720366
>     <NA>    <NA>
> 3720350 3720376
>
> conn <- db(affyExonFS)
> fields <- 'meta_fsetid, pmfeature.fsetid, fid, start, stop'
> tables <- 'featureSet, pmfeature, core_mps'
> sql <- paste("SELECT", fields,
> "FROM", tables,
> "WHERE pmfeature.fsetid=featureSet.fsetid",
> "AND featureSet.fsetid=core_mps.fsetid",
> "AND pmfeature.fsetid=:psets")
> probesetInfo <- dbGetPreparedQuery(conn, sql, theIDs)
> probesetInfo <- dbGetPreparedQuery(conn, sql, as.data.frame(theIDs))
>
> But when I tried this I get the following error massage:
>
> *Error in (function (classes, fdef, mtable)  :
>    unable to find an inherited method for function ‘dbGetPreparedQuery’ for
> signature ‘"SQLiteConnection", "character", "integer"’
> *
>
> Can anyone explain to me where this error is coming from? Is it a problem
> with the sqlite connection?
>
> thanks
> Assa
>
> 	[[alternative HTML version deleted]]
>
>
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

--
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099



More information about the Bioconductor mailing list