Error in (function (classes, fdef, mtable)
1
0
Entering edit mode
hoonhuiyi • 0
@hoonhuiyi-23342
Last seen 4.5 years 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 • 4.3k views
ADD COMMENT
0
Entering edit mode
shepherl 4.1k
@lshep
Last seen 13 hours 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.

ADD COMMENT
0
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?

ADD REPLY
0
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.

ADD REPLY
0
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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 774 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6