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

Change R Dependencies #693

Merged
merged 11 commits into from
Aug 6, 2023
4 changes: 2 additions & 2 deletions api/r/cellxgene.census/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Imports:
httr,
jsonlite,
methods,
Seurat (>= 4.1.0),
SingleCellExperiment (>= 1.20.0),
stats,
tiledbsoma,
tiledb
Suggests:
bit64,
knitr,
rmarkdown,
SingleCellExperiment (>= 1.20.0),
Seurat (>= 4.1.0),
testthat (>= 3.0.0),
withr
Config/testthat/edition: 3
Expand Down
8 changes: 8 additions & 0 deletions api/r/cellxgene.census/R/get_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ get_seurat <- function(
var_coords = NULL,
var_column_names = NULL,
var_index = "feature_id") {
stopifnot(
"R package 'Seurat' is not installed." = require("Seurat", quietly = T)
)

expt_query <- tiledbsoma::SOMAExperimentAxisQuery$new(
get_experiment(census, organism),
measurement_name,
Expand Down Expand Up @@ -135,6 +139,10 @@ get_single_cell_experiment <- function(
var_coords = NULL,
var_column_names = NULL,
var_index = "feature_id") {
stopifnot(
"R package 'SingleCellExperiment' is not installed." = require("SingleCellExperiment", quietly = T)
)
pablo-gar marked this conversation as resolved.
Show resolved Hide resolved

expt_query <- tiledbsoma::SOMAExperimentAxisQuery$new(
get_experiment(census, organism),
measurement_name,
Expand Down
24 changes: 20 additions & 4 deletions api/r/cellxgene.census/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ Census data can be fetched in an iterative fashion for bigger-than-memory slices

## Installation

From an R session, first install `tiledb` from R-Universe, the latest release in CRAN is not yet available.
If installing from **Ubuntu**, you may need to install the following libraries via `apt install`, `libxml2-dev` `libssl-dev` `libcurl4-openssl-dev`. In addition you must have `camke` v3.21 or greater.
pablo-gar marked this conversation as resolved.
Show resolved Hide resolved

If installing from **MacOS**, you will need to install the [developer tools `Xcode`](https://apps.apple.com/us/app/xcode/id497799835?mt=12).

If installing from Ubuntu, you may need to install the following libraries via `apt install`: `libxml2-dev` `libssl-dev` `libcurl4-openssl-dev`.
**Windows** is not supported.

If installing from MacOS, you will need to install the [developer tools `Xcode`](https://apps.apple.com/us/app/xcode/id497799835?mt=12).
From an R session, first install `tiledb` from R-Universe, the latest release in CRAN is not yet available.

```r
install.packages(
Expand All @@ -26,7 +28,7 @@ install.packages(
)
```

Then install `cellxgene.census` from R-Universe.
Then in an R session install `cellxgene.census` from R-Universe.

```r
install.packages(
Expand All @@ -35,6 +37,20 @@ install.packages(
)
```

To be able to export Census data to `Seurat` or `SingleCellExperiment` you also need to install their respective packages.

```r
# Seurat
install.packages("Seurat")

# SingleCellExperiment
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")

BiocManager::install("SingleCellExperiment")
```


## Usage

Check out the vignettes in the "Articles" section of the navigation bar on this site. We highly recommend the following vignettes as a starting point:
Expand Down
25 changes: 20 additions & 5 deletions docs/cellxgene_census_docsite_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ If installing in a Databricks notebook environment, use `%pip install`. Do not u

## R

From an R session, first install `tiledb` from R-Universe, the latest release in CRAN is not yet available.
If installing from **Ubuntu**, you may need to install the following libraries via `apt install`, `libxml2-dev` `libssl-dev` `libcurl4-openssl-dev`. In addition you must have `camke` v3.21 or greater.
pablo-gar marked this conversation as resolved.
Show resolved Hide resolved

If installing from **MacOS**, you will need to install the [developer tools `Xcode`](https://apps.apple.com/us/app/xcode/id497799835?mt=12).

If installing from Ubuntu, you may need to install the following libraries via `apt install`: `libxml2-dev` `libssl-dev` `libcurl4-openssl-dev`.
**Windows** is not supported.

If installing from MacOS, you will need to install the [developer tools Xcode](https://apps.apple.com/us/app/xcode/id497799835?mt=12).
From an R session, first install `tiledb` from R-Universe, the latest release in CRAN is not yet available.

```r
install.packages(
Expand All @@ -43,11 +45,24 @@ install.packages(
)
```

Then install `cellxgene.census` from R-Universe.
Then in an R session install `cellxgene.census` from R-Universe.

```r
install.packages(
"cellxgene.census",
repos=c('https://chanzuckerberg.r-universe.dev', 'https://cloud.r-project.org')
)
```
```

To be able to export Census data to `Seurat` or `SingleCellExperiment` you also need to install their respective packages.

```r
# Seurat
install.packages("Seurat")

# SingleCellExperiment
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")

BiocManager::install("SingleCellExperiment")
```
Loading