Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add reference to exported functions #147

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: CuratedAtlasQueryR
Title: Queries the Human Cell Atlas
Version: 1.3.5
Version: 1.3.6
Authors@R: c(
person(
"Stefano",
Expand Down
20 changes: 20 additions & 0 deletions R/counts.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ pseudobulk_url <- single_line_str(
#' @inheritDotParams get_single_cell_experiment
#' @importFrom cli cli_alert_warning
#' @export
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
#' doi:10.1101/2023.06.08.542671.
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
get_SingleCellExperiment <- function(...){
single_line_str("This function name is deprecated.
Please use `get_single_cell_experiment()` instead") |>
Expand All @@ -55,6 +60,11 @@ get_SingleCellExperiment <- function(...){
#' meta <- get_metadata() |> head(2)
#' sce <- get_single_cell_experiment(meta)
#' @export
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
#' doi:10.1101/2023.06.08.542671.
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
get_single_cell_experiment <- function(data, ...){
raw_data <- collect(data)
assert_that(
Expand All @@ -77,6 +87,11 @@ get_single_cell_experiment <- function(data, ...){
#' pseudobulk <- meta |> get_pseudobulk()
#' }
#' @export
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
#' doi:10.1101/2023.06.08.542671.
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
get_pseudobulk <- function(data, ...) {
raw_data <- collect(data)
assert_that(
Expand Down Expand Up @@ -118,6 +133,11 @@ get_pseudobulk <- function(data, ...) {
#' @importFrom cli cli_alert_success cli_alert_info
#' @importFrom rlang .data
#' @importFrom S4Vectors DataFrame
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
#' doi:10.1101/2023.06.08.542671.
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
get_data_container <- function(
data,
assays = "counts",
Expand Down
6 changes: 6 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@
#' @format An object of class \code{SingleCellExperiment}
#' @source HeOrganAtlasData Liver
#' @keywords datasets
#' @docType data
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
#' doi:10.1101/2023.06.08.542671.
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
"sample_sce_obj"
5 changes: 5 additions & 0 deletions R/import_metadata_and_counts.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
#' data(sample_sce_obj)
#' import_one_sce(sample_sce_obj,
#' cache_dir = get_default_cache_dir())
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
#' doi:10.1101/2023.06.08.542671.
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
import_one_sce <- function(
sce_obj,
cache_dir = get_default_cache_dir()
Expand Down
16 changes: 16 additions & 0 deletions R/metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ cache <- rlang::env(
#' @return A character vector of URLs to parquet files to download
#' @examples
#' get_database_url("metadata.0.2.3.parquet")
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
#' doi:10.1101/2023.06.08.542671.
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
get_database_url <- function(databases = c("metadata.0.2.3.parquet", "fibrosis.0.2.3.parquet")) {
glue::glue(
"https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/metadata/{databases}")
Expand All @@ -26,6 +31,11 @@ get_database_url <- function(databases = c("metadata.0.2.3.parquet", "fibrosis.0
#' @return A character scalar consisting of the URL
#' @examples
#' get_metadata(remote_url = SAMPLE_DATABASE_URL, cache_directory = tempdir())
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
#' doi:10.1101/2023.06.08.542671.
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
SAMPLE_DATABASE_URL <- single_line_str(
"https://object-store.rc.nectar.org.au/v1/
AUTH_06d6e008e3e642da99d806ba3ea629c5/metadata/
Expand Down Expand Up @@ -142,6 +152,12 @@ SAMPLE_DATABASE_URL <- single_line_str(
#' ```R
#' get_metadata(cache_directory = path.expand('~'))
#' ```
#'
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
#' doi:10.1101/2023.06.08.542671.
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
get_metadata <- function(
remote_url = get_database_url(),
cache_directory = get_default_cache_dir(),
Expand Down
6 changes: 5 additions & 1 deletion R/seurat.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ as.sparse.DelayedMatrix <- function(x, ...) {
#' @examples
#' meta <- get_metadata() |> head(2)
#' seurat <- get_seurat(meta)
#'
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
#' doi:10.1101/2023.06.08.542671.
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
get_seurat <- function(...) {
get_single_cell_experiment(...) |> as.Seurat(data = NULL)
}
10 changes: 10 additions & 0 deletions R/unharmonised.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ UNHARMONISED_URL <- single_line_str(
#' unharmonised_tbl <- dplyr::collect(unharmonised_meta[[dataset]])
#' dplyr::left_join(harmonised_meta, unharmonised_tbl, by=c("file_id", "cell_"))
#' }
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
#' doi:10.1101/2023.06.08.542671.
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
get_unharmonised_dataset <- function(
dataset_id,
cells = NULL,
Expand Down Expand Up @@ -85,6 +90,11 @@ get_unharmonised_dataset <- function(
#' @examples
#' harmonised <- dplyr::filter(get_metadata(), tissue == "kidney blood vessel")
#' unharmonised <- get_unharmonised_metadata(harmonised)
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
#' doi:10.1101/2023.06.08.542671.
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
get_unharmonised_metadata <- function(metadata, ...){
args <- list(...)
metadata |>
Expand Down
5 changes: 5 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ single_line_str <- function(text){
#' @importFrom utils packageName
#' @examples
#' get_metadata(cache_directory = get_default_cache_dir())
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
#' doi:10.1101/2023.06.08.542671.
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
get_default_cache_dir <- function() {
packageName() |>
R_user_dir(
Expand Down
9 changes: 9 additions & 0 deletions man/SAMPLE_DATABASE_URL.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions man/get_SingleCellExperiment.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions man/get_data_container.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions man/get_database_url.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions man/get_default_cache_dir.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions man/get_metadata.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions man/get_pseudobulk.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion man/get_seurat.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions man/get_single_cell_experiment.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions man/get_unharmonised_dataset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions man/get_unharmonised_metadata.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading