diff --git a/.Rbuildignore b/.Rbuildignore index 6e80a81..d461626 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -3,3 +3,4 @@ docs ^.*\.md$ ^data-raw$ +TODO.md diff --git a/.gitignore b/.gitignore index 5e22ad7..9bc2f42 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ vignettes/data .DS_Store ^.*\.md$ ^data-raw$ +TODO.md +data-raw diff --git a/R/readMethods.R b/R/readMethods.R index eafa1fc..522601f 100644 --- a/R/readMethods.R +++ b/R/readMethods.R @@ -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 @@ -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 @@ -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) { diff --git a/docs/articles/CellSPA.html b/docs/articles/CellSPA.html index 13a907e..8adf0b2 100644 --- a/docs/articles/CellSPA.html +++ b/docs/articles/CellSPA.html @@ -85,7 +85,7 @@

Read BIDCell output
 data_dir <- system.file("extdata/BIDCell_csv_output", package = "CellSPA")
 data_dir
-#> [1] "/private/var/folders/80/p95h23h55rs4lv59jms7k0fc0000gn/T/RtmprKO5fO/temp_libpath912a6ecf4153/CellSPA/extdata/BIDCell_csv_output"
+#> [1] "/private/var/folders/80/p95h23h55rs4lv59jms7k0fc0000gn/T/Rtmp5FCHvo/temp_libpathd7804409ffcd/CellSPA/extdata/BIDCell_csv_output"
 tiff_path <- system.file("extdata/BIDCell_output_subset.tif", package = "CellSPA")
 spe <- readBIDCell(data_dir,
                    tiff_path = tiff_path,
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 839947f..b4dc54c 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -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
 
diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png
new file mode 100644
index 0000000..17a3580
Binary files /dev/null and b/docs/reference/Rplot001.png differ
diff --git a/docs/reference/readBIDCell.html b/docs/reference/readBIDCell.html
index f87f50a..752612f 100644
--- a/docs/reference/readBIDCell.html
+++ b/docs/reference/readBIDCell.html
@@ -77,6 +77,17 @@ 

Value

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")
+
+
+
diff --git a/docs/reference/readXenium.html b/docs/reference/readXenium.html index 15fe646..72efbe4 100644 --- a/docs/reference/readXenium.html +++ b/docs/reference/readXenium.html @@ -88,6 +88,18 @@

Value

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)
+#> as(<dgTMatrix>, "dgCMatrix") is deprecated since Matrix 1.5-0; do as(., "CsparseMatrix") instead
+
+
+