@@ -12,7 +12,7 @@ aside <- function(x, ...) {
1212 x
1313}
1414
15- REMOTE_URL <- " https://harmonised-human-atlas.s3.amazonaws.com/ "
15+ REMOTE_URL <- " https://swift.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/ harmonised-human-atlas"
1616
1717# ' Given a data frame of HCA metadata, returns a SingleCellExperiment object
1818# ' corresponding to the samples in that data frame
@@ -339,11 +339,9 @@ get_seurat <- function(...) {
339339# ' Returns a data frame of Human Cell Atlas metadata, which should be filtered
340340# ' and ultimately passed into get_SingleCellExperiment.
341341# '
342- # ' @param repository Optional character vector of length 1. An HTTP URL pointing
343- # ' to the location of the sqlite database.
344- # ' @param cache_directory Optional character vector of length 1. A file path on
345- # ' your local system to a directory (not a file) that will be used to store
346- # ' metadata.sqlite
342+ # ' @param connection Optional list of postgres connection parameters used to
343+ # ' connect to the metadata database. Possible parameters are described here:
344+ # ' https://rpostgres.r-dbi.org/reference/postgres.
347345# ' @return A lazy data.frame subclass containing the metadata. You can interact
348346# ' with this object using most standard dplyr functions. However, it is
349347# ' recommended that you use the %LIKE% operator for string matching, as most
@@ -360,21 +358,21 @@ get_seurat <- function(...) {
360358# ' )
361359# '
362360# ' @importFrom DBI dbConnect
363- # ' @importFrom RSQLite SQLite SQLITE_RO
361+ # ' @importFrom RPostgres Postgres
364362# ' @importFrom dplyr tbl
365- # ' @importFrom httr progress
366363# '
367364get_metadata <- function (
368- repository = " https://harmonised-human-atlas.s3.amazonaws.com/metadata.sqlite" ,
369- cache_directory = get_default_cache_dir()
370- ) {
371- sqlite_path <- file.path(cache_directory , " metadata.sqlite" )
372- sync_remote_file(
373- repository ,
374- sqlite_path ,
375- progress(type = " down" , con = stderr())
365+ connection = list (
366+ dbname = " metadata" ,
367+ host = " zki3lfhznsa.db.cloud.edu.au" ,
368+ port = " 5432" ,
369+ password = " password" ,
370+ user = " public_access"
376371 )
377- SQLite() | >
378- dbConnect(drv = _, dbname = sqlite_path , flags = SQLITE_RO ) | >
372+ ) {
373+ Postgres() | >
374+ list (drv = _) | >
375+ c(connection ) | >
376+ do.call(dbConnect , args = _) | >
379377 tbl(" metadata" )
380378}
0 commit comments