Skip to content

Commit

Permalink
Merge branch 'devel' of github.com:LieberInstitute/visiumStitched int…
Browse files Browse the repository at this point in the history
…o devel
  • Loading branch information
lcolladotor committed Jul 24, 2024
2 parents 563a9e7 + 4eb77ce commit 1874908
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 20 deletions.
4 changes: 1 addition & 3 deletions R/prep_fiji_coords.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
#' file from Spaceranger, and transform using the rotation matrix specified
#' by Fiji. Write one new \code{tissue_positions.csv} file per group.
#'
#' @param sample_info A \code{tibble} with columns \code{capture_area},
#' \code{group}, \code{fiji_xml_path}, \code{intra_group_scalar}, and
#' \code{group_hires_scalef}
#' @param out_dir A character(1) vector giving a path to a directory to place
#' the output pixel coordinates CSVs. Provided the parent exists, \code{out_dir}
#' will be created if necessary.
#' @inheritParams add_array_coords
#'
#' @return This function returns `character()` with the file paths to the
#' `tissue_positions.csv` files it created.
Expand Down
4 changes: 1 addition & 3 deletions R/prep_fiji_image.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
#' Spaceranger's. In conjunction with \code{prep_fiji_image()}, this function
#' prepares for building the \code{SpatialExperiment} with \code{build_spe()}.
#'
#' @param sample_info A \code{tibble} with columns \code{capture_area},
#' \code{group}, \code{fiji_image_path}, \code{spaceranger_dir},
#' \code{intra_group_scalar}, and \code{group_hires_scalef}
#' @param out_dir A character(1) vector giving a path to a directory to place
#' the output image(s) and scale factors. Provided the parent exists, \code{out_dir}
#' will be created if necessary.
#' @param lowres_max_size An integer(1) vector: the resolution (number of
#' pixels) of the larger dimension of the output image(s), considered to be "low
#' resolution".
#' @inheritParams add_array_coords
#'
#' @return This function returns `character()` with the file paths to the
#' `tissue_lowres_image.png` and `scalefactors_json.json` files it created.
Expand Down
3 changes: 1 addition & 2 deletions R/rescale_fiji_inputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
#' (as from Spaceranger's \code{scalefactors_json.json} file) appropriate for
#' every capture area from the group.
#'
#' @param sample_info A \code{tibble} with columns \code{capture_area},
#' \code{group}, and \code{spaceranger_dir}
#' @param out_dir A character(1) vector giving a path to a directory to place
#' the output images. Provided the parent exists, \code{out_dir}
#' will be created if necessary.
#' @inheritParams add_array_coords
#'
#' @return A \code{tibble}: a copy of \code{sample_info} with additional columns
#' \code{intra_group_scalar} and \code{group_hires_scalef}
Expand Down
7 changes: 3 additions & 4 deletions man/prep_fiji_coords.Rd

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

7 changes: 3 additions & 4 deletions man/prep_fiji_image.Rd

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

4 changes: 2 additions & 2 deletions man/rescale_fiji_inputs.Rd

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

2 changes: 1 addition & 1 deletion tests/testthat/test-prep_fiji_coords.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test_that(
expect_equal(file.exists(out_file_actual), TRUE)

# The tissue positions should have the expected columns
coords <- readr::read_csv(out_file, show_col_types = FALSE)
coords <- readr::read_csv(out_file_expected, show_col_types = FALSE)
expect_equal(
colnames(coords),
c(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-prep_fiji_image.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ test_that(
file.path(spe_input_dir, "Br2719", "scalefactors_json.json")
)
expect_equal(all(file.exists(out_paths_expected)), TRUE)
expect_equal(setequal(out_paths_actual, out_paths_expected))
expect_equal(setequal(out_paths_actual, out_paths_expected), TRUE)

# The image should have the correct maximal dimension size
this_image <- imager::load.image(out_paths_expected[1])
Expand Down

0 comments on commit 1874908

Please sign in to comment.