Skip to content

Commit

Permalink
add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
YingxinLin committed Jul 13, 2023
1 parent 5e9321d commit b780c7c
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 2 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
docs
^.*\.md$
^data-raw$
TODO.md
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ vignettes/data
.DS_Store
^.*\.md$
^data-raw$
TODO.md
data-raw
19 changes: 19 additions & 0 deletions R/readMethods.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
#' @importFrom SummarizedExperiment rowData
#'
#' @return A SpatialExperiment object
#' @examples
#'
#' tenX_output_dir <- system.file("extdata/10x_output_subset", package = "CellSPA")
#' tenX_output_tif <- system.file("extdata/10x_output_subset/10x_from_csv_subset.tif",
#' package = "CellSPA")
#' spe_10x <- readXenium(tenX_output_dir,
#' tiff_path = tenX_output_tif)
#'
#' @export


Expand Down Expand Up @@ -87,6 +95,14 @@ readXenium <- function(data_dir,
#' @importFrom methods as
#' @importFrom Matrix t
#' @return A SpatialExperiment object
#' @examples
#'
#' data_dir <- system.file("extdata/BIDCell_csv_output", package = "CellSPA")
#' tiff_path <- system.file("extdata/BIDCell_output_subset.tif", package = "CellSPA")
#' spe <- readBIDCell(data_dir,
#' tiff_path = tiff_path,
#' method_name = "BIDCell")
#'
#' @export


Expand Down Expand Up @@ -177,6 +193,9 @@ readBIDCell <- function(data_dir,
#' @importFrom tiff readTIFF
#' @importFrom reshape2 melt
#' @return A SpatialExperiment object
#'
#' tiff_path <- system.file("extdata/BIDCell_output_subset.tif", package = "CellSPA")
#' tiff_res <- readTiffOutput(tiff_path = tiff_path)
#' @export

readTiffOutput <- function(tiff_path) {
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/CellSPA.html

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

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ pkgdown: 2.0.6
pkgdown_sha: ~
articles:
CellSPA: CellSPA.html
last_built: 2023-07-13T18:23Z
last_built: 2023-07-13T20:28Z

Binary file added docs/reference/Rplot001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/reference/readBIDCell.html

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

4 changes: 4 additions & 0 deletions docs/reference/readTiffOutput.html

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

12 changes: 12 additions & 0 deletions docs/reference/readXenium.html

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

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

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

3 changes: 3 additions & 0 deletions man/readTiffOutput.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/readXenium.Rd

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

0 comments on commit b780c7c

Please sign in to comment.