Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Commit 55ca4a9

Browse files
authored
Merge pull request #147 from myushen/master
add reference to exported functions
2 parents 54712d4 + 910d23e commit 55ca4a9

21 files changed

+184
-3
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: CuratedAtlasQueryR
33
Title: Queries the Human Cell Atlas
4-
Version: 1.3.5
4+
Version: 1.3.6
55
Authors@R: c(
66
person(
77
"Stefano",

R/counts.R

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ pseudobulk_url <- single_line_str(
3737
#' @inheritDotParams get_single_cell_experiment
3838
#' @importFrom cli cli_alert_warning
3939
#' @export
40+
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
41+
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
42+
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
43+
#' doi:10.1101/2023.06.08.542671.
44+
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
4045
get_SingleCellExperiment <- function(...){
4146
single_line_str("This function name is deprecated.
4247
Please use `get_single_cell_experiment()` instead") |>
@@ -55,6 +60,11 @@ get_SingleCellExperiment <- function(...){
5560
#' meta <- get_metadata() |> head(2)
5661
#' sce <- get_single_cell_experiment(meta)
5762
#' @export
63+
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
64+
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
65+
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
66+
#' doi:10.1101/2023.06.08.542671.
67+
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
5868
get_single_cell_experiment <- function(data, ...){
5969
raw_data <- collect(data)
6070
assert_that(
@@ -77,6 +87,11 @@ get_single_cell_experiment <- function(data, ...){
7787
#' pseudobulk <- meta |> get_pseudobulk()
7888
#' }
7989
#' @export
90+
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
91+
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
92+
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
93+
#' doi:10.1101/2023.06.08.542671.
94+
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
8095
get_pseudobulk <- function(data, ...) {
8196
raw_data <- collect(data)
8297
assert_that(
@@ -118,6 +133,11 @@ get_pseudobulk <- function(data, ...) {
118133
#' @importFrom cli cli_alert_success cli_alert_info
119134
#' @importFrom rlang .data
120135
#' @importFrom S4Vectors DataFrame
136+
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
137+
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
138+
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
139+
#' doi:10.1101/2023.06.08.542671.
140+
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
121141
get_data_container <- function(
122142
data,
123143
assays = "counts",

R/data.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,10 @@
55
#' @format An object of class \code{SingleCellExperiment}
66
#' @source HeOrganAtlasData Liver
77
#' @keywords datasets
8+
#' @docType data
9+
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
10+
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
11+
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
12+
#' doi:10.1101/2023.06.08.542671.
13+
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
814
"sample_sce_obj"

R/import_metadata_and_counts.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
#' data(sample_sce_obj)
2121
#' import_one_sce(sample_sce_obj,
2222
#' cache_dir = get_default_cache_dir())
23+
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
24+
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
25+
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
26+
#' doi:10.1101/2023.06.08.542671.
27+
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
2328
import_one_sce <- function(
2429
sce_obj,
2530
cache_dir = get_default_cache_dir()

R/metadata.R

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ cache <- rlang::env(
1515
#' @return A character vector of URLs to parquet files to download
1616
#' @examples
1717
#' get_database_url("metadata.0.2.3.parquet")
18+
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
19+
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
20+
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
21+
#' doi:10.1101/2023.06.08.542671.
22+
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
1823
get_database_url <- function(databases = c("metadata.0.2.3.parquet", "fibrosis.0.2.3.parquet")) {
1924
glue::glue(
2025
"https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/metadata/{databases}")
@@ -26,6 +31,11 @@ get_database_url <- function(databases = c("metadata.0.2.3.parquet", "fibrosis.0
2631
#' @return A character scalar consisting of the URL
2732
#' @examples
2833
#' get_metadata(remote_url = SAMPLE_DATABASE_URL, cache_directory = tempdir())
34+
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
35+
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
36+
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
37+
#' doi:10.1101/2023.06.08.542671.
38+
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
2939
SAMPLE_DATABASE_URL <- single_line_str(
3040
"https://object-store.rc.nectar.org.au/v1/
3141
AUTH_06d6e008e3e642da99d806ba3ea629c5/metadata/
@@ -142,6 +152,12 @@ SAMPLE_DATABASE_URL <- single_line_str(
142152
#' ```R
143153
#' get_metadata(cache_directory = path.expand('~'))
144154
#' ```
155+
#'
156+
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
157+
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
158+
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
159+
#' doi:10.1101/2023.06.08.542671.
160+
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
145161
get_metadata <- function(
146162
remote_url = get_database_url(),
147163
cache_directory = get_default_cache_dir(),

R/seurat.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ as.sparse.DelayedMatrix <- function(x, ...) {
2121
#' @examples
2222
#' meta <- get_metadata() |> head(2)
2323
#' seurat <- get_seurat(meta)
24-
#'
24+
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
25+
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
26+
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
27+
#' doi:10.1101/2023.06.08.542671.
28+
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
2529
get_seurat <- function(...) {
2630
get_single_cell_experiment(...) |> as.Seurat(data = NULL)
2731
}

R/unharmonised.R

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ UNHARMONISED_URL <- single_line_str(
4545
#' unharmonised_tbl <- dplyr::collect(unharmonised_meta[[dataset]])
4646
#' dplyr::left_join(harmonised_meta, unharmonised_tbl, by=c("file_id", "cell_"))
4747
#' }
48+
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
49+
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
50+
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
51+
#' doi:10.1101/2023.06.08.542671.
52+
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
4853
get_unharmonised_dataset <- function(
4954
dataset_id,
5055
cells = NULL,
@@ -85,6 +90,11 @@ get_unharmonised_dataset <- function(
8590
#' @examples
8691
#' harmonised <- dplyr::filter(get_metadata(), tissue == "kidney blood vessel")
8792
#' unharmonised <- get_unharmonised_metadata(harmonised)
93+
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
94+
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
95+
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
96+
#' doi:10.1101/2023.06.08.542671.
97+
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
8898
get_unharmonised_metadata <- function(metadata, ...){
8999
args <- list(...)
90100
metadata |>

R/utils.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ single_line_str <- function(text){
4848
#' @importFrom utils packageName
4949
#' @examples
5050
#' get_metadata(cache_directory = get_default_cache_dir())
51+
#' @references Mangiola, S., M. Milton, N. Ranathunga, C. S. N. Li-Wai-Suen,
52+
#' A. Odainic, E. Yang, W. Hutchison et al. "A multi-organ map of the human
53+
#' immune system across age, sex and ethnicity." bioRxiv (2023): 2023-06.
54+
#' doi:10.1101/2023.06.08.542671.
55+
#' @source [Mangiola et al.,2023](https://www.biorxiv.org/content/10.1101/2023.06.08.542671v3)
5156
get_default_cache_dir <- function() {
5257
packageName() |>
5358
R_user_dir(

man/SAMPLE_DATABASE_URL.Rd

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/get_SingleCellExperiment.Rd

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)