This function downloads the RegulonDB SQLite database file prior to making a connection to it. It will cache the database file such that subsequent calls will run faster. This function requires an active internet connection.

connect_database(
  ah = AnnotationHub::AnnotationHub(),
  bfc = BiocFileCache::BiocFileCache()
)

Arguments

ah

An AnnotationHub object AnnotationHub-class. Can be NULL if you want to force to use the backup download mechanism.

bfc

A BiocFileCache object BiocFileCache-class. Used when ah is not available.

Value

An SQLiteConnection-class connection to the RegulonDB database.

Examples


## Connect to the RegulonDB database if necessary
if (!exists("regulondb_conn")) regulondb_conn <- connect_database()
#> snapshotDate(): 2021-10-20

## Connect to the database without using AnnotationHub
regulondb_conn_noAH <- connect_database(ah = NULL)