Error in (function (classes, fdef, mtable)
Entering edit mode
hoonhuiyi • 0
Last seen 14 months ago

Hi I'm getting an Error in (function (classes, fdef, mtable) :unable to find an inherited method for function ‘dbGetQuery’ for signature ‘"character", "character"’

Below are the exact commands:

> # specify the path to your sequence file:
> fas <- "C:/Users/Hui Yi/Documents/DECIPHER/Acc5alignedname.txt"
> # specify a path for where to write the sequence database
> dbConn <- "C:/Users/Hui Yi/Documents/Acc5database.txt"
> Seqs2DB(fas, "FASTA", dbConn, "Acc5")

Reading FASTA file chunk 1
64 total sequences in table Seqs.
Time difference of 0.14 secs

>  # get the FASTA record description
> desc <- dbGetQuery(dbConn, "select description from Seqs")
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘dbGetQuery’ for signature ‘"character", "character"’

What should I do? Thank you

software error DECIPHER • 789 views
Entering edit mode
shepherl 2.8k
Last seen 1 day ago
United States

Firstly, dbGetQuery is from CRAN package DBI and really this should be on stackoverflow not the Bioconductor Support Site. The Bioconductor Support Site is for Bioconductor packages. That being said... dbGetQuery the first argument dbConn needs to be a DBConnection object as documented here. I suggest looking further into those functions and the help pages for DBI

If this came from following help files or a vignette of a Bioconductor package please be sure to mention that in the issue as well as tag the package name in the Post Tags field when posting next time.

Entering edit mode

Thank you. I'm using the DECIPHER software and it should be a bioconductor package. the commands were found in its tutorial on designing group specific primers. Do you mean dbconn which is the file ''Acc5database.txt''' should be a DB connection object instead? If so, how do I get a DB connection object?

Entering edit mode

You did not tag the DECIPHER package in the "Post Tags" so the maintainers would not be notified that there is a potential issue and we did not know that that was the package in question -- tagging something with "software error" is too generic -- the code that you showed ERRORing is from DBI . Again -- I would recommend looking at the help documents in the DBI package that would demonstrate how to create these objects first. If you have further troubles or ERRORs that post those additional comments.

Entering edit mode

For the use of dbGetQuery() it is necessary to provide a dbConnection object. That is, you must connect to the database first:

dbConn <- dbConnect(SQLite(), "C:/Users/Hui Yi/Documents/Acc5database.txt")

Note that SQLite databases usually have the extension ".sqlite" and not ".txt" as they are not ASC-II encoded.

Entering edit mode

Thanks, I have added the fasta file to the sequence database at datasets.sqlite


Login before adding your answer.

Traffic: 467 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6