Skip to content

Commit

Permalink
Update docs (#111)
Browse files Browse the repository at this point in the history
* update docs

* move class diagram to vignette

* remove doc folder to #54

* don't include design doc in built package
  • Loading branch information
rcannood authored Sep 19, 2023
1 parent e2cc818 commit 5964c5c
Show file tree
Hide file tree
Showing 10 changed files with 151 additions and 347 deletions.
5 changes: 3 additions & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
^LICENSE\.md$
^doc$
^.*\.Rproj$
^\.Rproj\.user$
^\.github$
Expand All @@ -10,4 +9,6 @@
^_pkgdown\.yml$
^docs$
^pkgdown$
^vignettes/features.Rmd$
^vignettes/diagrams/*\.mmd$
^vignettes/diagrams/*\.svg$
^vignettes/design\.Rmd$
55 changes: 32 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,18 @@ experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](h
status](https://www.r-pkg.org/badges/version/anndataR.png)](https://CRAN.R-project.org/package=anndataR)
<!-- badges: end -->

`{anndataR}` is an R package that brings the power and flexibility of
AnnData to the R ecosystem, allowing you to effortlessly manipulate and
analyze your single-cell data. This package lets you work with backed
h5ad and zarr files, directly access various slots (e.g. X, obs, var,
obsm, obsp), or convert the data into SingleCellExperiment and Seurat
objects.
`{anndataR}` aims to make the AnnData format a first-class citizen in
the R ecosystem, and to make it easy to work with AnnData files in R,
either directly or by converting it to a SingleCellExperiment or Seurat
object.

## Design
Feature list:

This package was initially created at the [scverse 2023-04
hackathon](https://scverse.org/events/2023_04_hackathon/) in Heidelberg.

When fully implemented, it will be a complete replacement for
[theislab/zellkonverter](https://github.com/theislab/zellkonverter),
[mtmorgan/h5ad](github.com/mtmorgan/h5ad/) and
[dynverse/anndata](https://github.com/dynverse/anndata).
- Provide an `R6` class to work with AnnData objects in R (either
in-memory or on-disk).
- Read/write `*.h5ad` files natively
- Convert to/from `SingleCellExperiment` objects
- Convert to/from `Seurat` objects

## Installation

Expand All @@ -34,6 +30,24 @@ You can install the development version of `{anndataR}` like so:
devtools::install_github("scverse/anndataR")
```

You might need to install suggested dependencies manually, depending on
the task you want to perform.

- To read/write `*.h5ad` files, you need to install `{rhdf5}`:
`BiocManager::install("rhdf5")`
- To convert to/from `SingleCellExperiment` objects, you need to install
`{SingleCellExperiment}`:
`BiocManager::install("SingleCellExperiment")`
- To convert to/from `Seurat` objects, you need to install
`{SeuratObject}`: `install.packages("SeuratObject")`

You can also install all suggested dependencies at once (though note
that this might take a while to run):

``` r
devtools::install_github("scverse/anndataR", dependencies = TRUE)
```

## Example

Here’s a quick example of how to use `{anndataR}`. First, we download an
Expand All @@ -55,15 +69,10 @@ View structure:

``` r
adata
#> class: InMemoryAnnData
#> dim: 50 obs x 100 var
#> X: dgRMatrix
#> layers: counts csc_counts dense_X dense_counts
#> obs: Float FloatNA Int IntNA Bool BoolNA n_genes_by_counts
#> log1p_n_genes_by_counts total_counts log1p_total_counts leiden
#> var: String n_cells_by_counts mean_counts log1p_mean_counts
#> pct_dropout_by_counts total_counts log1p_total_counts highly_variable
#> means dispersions dispersions_norm
#> AnnData object with n_obs × n_vars = 50 × 100
#> obs: 'Float', 'FloatNA', 'Int', 'IntNA', 'Bool', 'BoolNA', 'n_genes_by_counts', 'log1p_n_genes_by_counts', 'total_counts', 'log1p_total_counts', 'leiden'
#> var: 'String', 'n_cells_by_counts', 'mean_counts', 'log1p_mean_counts', 'pct_dropout_by_counts', 'total_counts', 'log1p_total_counts', 'highly_variable', 'means', 'dispersions', 'dispersions_norm'
#> layers: 'counts', 'csc_counts', 'dense_X', 'dense_counts'
```

Access AnnData slots:
Expand Down
29 changes: 20 additions & 9 deletions README.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,15 @@ knitr::opts_chunk$set(
<!-- badges: end -->


`{anndataR}` is an R package that brings the power and flexibility of AnnData to the
R ecosystem, allowing you to effortlessly manipulate and analyze your single-cell data.
This package lets you work with backed h5ad and zarr files, directly access various slots
(e.g. X, obs, var, obsm, obsp), or convert the data into SingleCellExperiment and Seurat
objects.
`{anndataR}` aims to make the AnnData format a first-class citizen in the R ecosystem, and to make it easy to work with AnnData files in R, either directly
or by converting it to a SingleCellExperiment or Seurat object.

## Design
Feature list:

This package was initially created at the [scverse 2023-04 hackathon](https://scverse.org/events/2023_04_hackathon/) in Heidelberg.

When fully implemented, it will be a complete replacement for [theislab/zellkonverter](https://github.com/theislab/zellkonverter), [mtmorgan/h5ad](github.com/mtmorgan/h5ad/) and [dynverse/anndata](https://github.com/dynverse/anndata).
* Provide an `R6` class to work with AnnData objects in R (either in-memory or on-disk).
* Read/write `*.h5ad` files natively
* Convert to/from `SingleCellExperiment` objects
* Convert to/from `Seurat` objects


## Installation
Expand All @@ -48,6 +46,18 @@ You can install the development version of `{anndataR}` like so:
devtools::install_github("scverse/anndataR")
```

You might need to install suggested dependencies manually, depending on the task you want to perform.

* To read/write `*.h5ad` files, you need to install `{rhdf5}`: `BiocManager::install("rhdf5")`
* To convert to/from `SingleCellExperiment` objects, you need to install `{SingleCellExperiment}`: `BiocManager::install("SingleCellExperiment")`
* To convert to/from `Seurat` objects, you need to install `{SeuratObject}`: `install.packages("SeuratObject")`

You can also install all suggested dependencies at once (though note that this might take a while to run):

``` r
devtools::install_github("scverse/anndataR", dependencies = TRUE)
```

## Example

Here's a quick example of how to use `{anndataR}`. First, we download an h5ad file.
Expand Down Expand Up @@ -94,3 +104,4 @@ Convert the AnnData object to a Seurat object:
obj <- adata$to_Seurat()
obj
```

14 changes: 0 additions & 14 deletions doc/challenges.md

This file was deleted.

148 changes: 0 additions & 148 deletions doc/design.md

This file was deleted.

Loading

0 comments on commit 5964c5c

Please sign in to comment.