Skip to content

Commit

Permalink
R CMD check issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdamoses committed May 10, 2024
1 parent e90e667 commit 10d326f
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 21 deletions.
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Version 1.6.1
* readRDS converts old style SpatRasterImage to the new style
* readSelectTx and addSelectTx functions to read transcript spots from a few select genes from the parquet output of formatTxSpots or add them to an SFE object
* Added formatTxTech and addTxTech functions, basically thin wrappers of formatTxSpots and addTxSpots with presets for Vizgen, Xenium, and CosMX

# Version 1.6.0 (04/29/2024)
* Changed defaults from sample_id = NULL to sample_id = 1L when dealing with 1 sample or "all" when dealing with multiple samples
* dim method for BioFormatsImage that doesn't load the image into memory
Expand Down
3 changes: 3 additions & 0 deletions R/formatTxSpots.R
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,9 @@ addTxSpots <- function(sfe, file, sample_id = 1L,
#' technology.
#'
#' @inheritParams formatTxSpots
#' @inheritParams readVizgen
#' @param tech Which technology whose output to read, must be one of "Vizgen",
#' "Xenium", or "CosMX" though more technologies may be added later.
#' @param z Which z-planes to read. Always "all" for Xenium where the z
#' coordinates are not discrete.
#' @param split_cell_comps Only relevant to CosMX whose transcript spot file
Expand Down
10 changes: 2 additions & 8 deletions R/read.R
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,7 @@ read10xVisiumSFE <- function(samples = "",
#'
#' @inheritParams SpatialFeatureExperiment
#' @inheritParams formatTxSpots
#' @param data_dir Top level directory of Vizgen output, which contains
#' directories \code{cell_boundaries} and \code{images}, and files
#' \code{cell_by_gene.csv}, \code{cell_metadata.csv}, and
#' \code{detected_transcripts.csv}.
#' @param data_dir Top level output directory.
#' @param z Integer, z index to read, or "all", indicating z-planes of the
#' images and transcript spots to read. While cell segmentation seems to have
#' multiple z-planes, the segmentation in all z-planes are the same so in
Expand Down Expand Up @@ -558,9 +555,6 @@ readVizgen <- function(data_dir,

# Column without colname is read as V1
mat <- fread(mat_fn, colClasses = list(character = 1))
# TODO: write the sparse matrix to disk as hdf5 or mtx and check for the file
# next time, so the costly step using a lot of memory to read in the dense
# matrix can be avoided
# get spatial metadata file---------
meta_fn <- .check_vizgen_fns(data_dir, "cell_metadata")
metadata <- fread(meta_fn, colClasses = list(character = 1))
Expand Down Expand Up @@ -684,7 +678,7 @@ readVizgen <- function(data_dir,
#' @examples
#' fp <- tempdir()
#' dir_use <- SFEData::CosMXOutput(file_path = file.path(fp, "cosmx_test"))
#' sfe <- readCosMX("cosmx", z = "all", add_molecules = TRUE)
#' sfe <- readCosMX(dir_use, z = "all", add_molecules = TRUE)
#' # Clean up
#' unlink(dir_use, recursive = TRUE)
readCosMX <- function(data_dir,
Expand Down
5 changes: 5 additions & 0 deletions man/formatTxTech.Rd

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

7 changes: 2 additions & 5 deletions man/readCosMX.Rd

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

5 changes: 1 addition & 4 deletions man/readVizgen.Rd

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

5 changes: 1 addition & 4 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 10d326f

Please sign in to comment.