regulondb version fixed to 10.8?
0
0
Entering edit mode
@user-24317
Last seen 2.5 years ago
United Kingdom

I want to use regutools to access some gene regulation information from E. coli. The original paper describing regutools (doi: 10.1093/bioinformatics/btaa575) mentions that:

the regutools implementation allows users to explore different versions of the RegulonDB database

However, I am having trouble understanding how this is done from the package. I initially thought that the database_version parameter of the regulondb() constructor function would be used to specify what version of the database one wanted to use. However, upon closer inspection of the source code I noticed that database_version is simply used to fill the corresponding slot of the new regulondb object, but it isn't actually used to query the server (in other words, it is a user-supplied metadata string that doesn't do anything in practice):

regulondb <-
    function(database_conn,
    organism,
    genome_version,
    database_version) {
        stopifnot(is(database_conn, "SQLiteConnection"))
        stopifnot(is(organism, "character"))
        stopifnot(is(genome_version, "character"))
        stopifnot(is(database_version, "character"))
        new(
            "regulondb",
            database_conn,
            organism = organism,
            genome_version = genome_version,
            database_version = database_version
        )
    }

So, given that this cannot be done with regulondb(), I went up one step and checked the connect_database() function, which is used to create the SQLiteConnection that must be supplied as first parameter to regulondb() . However, when checking the source code for connect_database(), I noticed that the function always looks for regulondb v10.8 and there is no way for the user to specify a different version. This goes to the point that, if connect_database() cannot find regulondb v10.8 in the provided AnnotationHub object, then it forces the download of regulondb v10.8 from an online dropbox folder:

connect_database <-
    function(
    ah = AnnotationHub::AnnotationHub(),
    bfc = BiocFileCache::BiocFileCache()) {
        if (!is.null(ah)) {
            ## Check input
            stopifnot(methods::is(ah, "AnnotationHub"))

            ## Query AH
            q <-
                AnnotationHub::query(
                    ah,
                    pattern = c(
                        paste(
                            "RegulonDB SQLite database version v10.8",
                            "for the regutools Bioconductor package"
                        ),
                        "regutools;RegulonDB;v10.8"
                    )
                )
            if (length(q) == 1) {
                ## Return the connection
                return(q[[1]])
            }
        }


        ## Otherwise, use the Dropbox version and cache it with BiocFileCache
        url <-
            paste0("https://www.dropbox.com/s/ufp6wqcv5211v1w/",
            "regulondb_v10.8_sqlite.db?dl=1"
            )
        destfile <- BiocFileCache::bfcrpath(bfc, url)
        AnnotationDbi::dbFileConnect(destfile)
    }

...and then I gave up. I am at a complete loss as to how a user can "explore different versions of the RegulonDB database" given that regutools seems to always look for v10.8, and the database_version parameter doesn't seem to be doing anything. Am I missing something very obvious?

Any help appreciated.

regutools • 507 views
ADD COMMENT

Login before adding your answer.

Traffic: 333 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