@@ -335,53 +335,9 @@ get_seurat <- function(...) {
335335 get_SingleCellExperiment(... ) | > as.Seurat(data = NULL )
336336}
337337
338-
339- # ' Returns a data frame of Human Cell Atlas metadata, which should be filtered
340- # ' and ultimately passed into get_SingleCellExperiment.
341- # '
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.
345- # ' @return A lazy data.frame subclass containing the metadata. You can interact
346- # ' with this object using most standard dplyr functions. For string matching,
347- # ' it is recommended that you use `stringr::str_like` to filter character
348- # ' columns, as `stringr::str_match` will not work.
349- # ' @export
350- # ' @examples
351- # ' library(dplyr)
352- # ' library(stringr)
353- # ' filtered_metadata <- get_metadata() |>
354- # ' filter(
355- # ' ethnicity == "African" &
356- # ' str_like(assay, "%10x%") &
357- # ' tissue == "lung parenchyma" &
358- # ' str_like(cell_type, "%CD4%")
359- # ' )
360- # '
361- # ' @importFrom DBI dbConnect
362- # ' @importFrom RPostgres Postgres
363- # ' @importFrom dplyr tbl
364- # '
365- get_metadata <- function (
366- connection = list (
367- dbname = " metadata" ,
368- host = " xwwtauhwze2.db.cloud.edu.au" ,
369- port = " 5432" ,
370- password = " password" ,
371- user = " public_access"
372- )
373- ) {
374- Postgres() | >
375- list (drv = _) | >
376- c(connection ) | >
377- do.call(dbConnect , args = _) | >
378- tbl(" metadata" )
379- }
380-
381-
382- # ' Downloads an SQLite database of the Human Cell Atlas metadata to a local
383- # ' cache, and then opens it as a data frame. It can then be filtered and
384- # ' passed into [get_SingleCellExperiment()]
338+ # ' Downloads an SQLite database of the Human Cell Atlas metadata to a local
339+ # ' cache, and then opens it as a data frame. It can then be filtered and
340+ # ' passed into [get_SingleCellExperiment()]
385341# ' to obtain a [`SingleCellExperiment`](SingleCellExperiment::SingleCellExperiment-class)
386342# '
387343# ' @param remote_url Optional character vector of length 1. An HTTP URL pointing
@@ -396,7 +352,7 @@ get_metadata <- function(
396352# ' @export
397353# ' @examples
398354# ' library(dplyr)
399- # ' filtered_metadata <- get_metadata_local () |>
355+ # ' filtered_metadata <- get_metadata () |>
400356# ' filter(
401357# ' ethnicity == "African" &
402358# ' assay %LIKE% "%10x%" &
@@ -410,7 +366,7 @@ get_metadata <- function(
410366# ' @importFrom httr progress
411367# ' @importFrom cli cli_alert_info
412368# '
413- get_metadata_local <- function (
369+ get_metadata <- function (
414370 remote_url = " https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/metadata-sqlite/metadata.tar.xz" ,
415371 cache_directory = get_default_cache_dir()
416372) {
0 commit comments