Skip to content

Commit

Permalink
Pass additional load_cytoset_from_fcs() arguments through flowSet_to_…
Browse files Browse the repository at this point in the history
…cytoset() (#389)

* Pass ... arguments in flowSet_to_cytoset() to load_cytoset_from_fcs().

* Fix typo in docs.

* Add missing multiRangeGate method to filter_to_list().

* Add link to load_cytoframe_from_fcs() in convert docs.
  • Loading branch information
djhammill authored Aug 17, 2023
1 parent 6cd154d commit 31ac5a5
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 20 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ S3method(filterObject,default)
S3method(filter_to_list,booleanFilter)
S3method(filter_to_list,ellipsoidGate)
S3method(filter_to_list,logical)
S3method(filter_to_list,multiRangeGate)
S3method(filter_to_list,polygonGate)
S3method(filter_to_list,quadGate)
S3method(filter_to_list,rectangleGate)
Expand Down
2 changes: 1 addition & 1 deletion R/cytoframe.R
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ setReplaceMethod("keyword",
#' or \code{\link{GatingSet}} objects.
#'
#' @param cf a \code{\link{cytoframe}}
#' @param cs a \code{\link{cytoset}}}
#' @param cs a \code{\link{cytoset}}
#' @param gh a \code{\link{GatingHierarchy}}
#' @param gs a \code{\link{GatingSet}}
#' @param keys the keyword names to insert/delete/replace -- single value or vector
Expand Down
24 changes: 15 additions & 9 deletions R/cytoset.R
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,18 @@ cytoset_to_flowSet <- function(cs){
#' @rdname convert
#' @param fs flowSet or ncdfFlowSet
#' @param path the h5 path for cytoset
#' @param tmp the temp folder when the temporary files are written to during conversion
#' by default, it is system temp path. And it can be changed to the customized location
#' when there is not enough space at system path.
#' @export
flowSet_to_cytoset <- function(fs, path = tempfile(),backend = get_default_backend(), tmp = tempfile()){
#' @param tmp the temp folder when the temporary files are written to during
#' conversion by default, it is system temp path. And it can be changed to the
#' customized location when there is not enough space at system path.
#' @param ... additional arguments passed to
#' \code{\link{load_cytoframe_from_fcs}} or
#' \code{\link{load_cytoset_from_fcs}}.
#' @export
flowSet_to_cytoset <- function(fs,
path = tempfile(),
backend = get_default_backend(),
tmp = tempfile(),
...){
backend <- match.arg(backend, c("h5", "mem", "tile"))
# Set up mapping to ensure that the sampleNames
# come back in without additional ".fcs" and allow
Expand All @@ -308,7 +315,8 @@ flowSet_to_cytoset <- function(fs, path = tempfile(),backend = get_default_backe
, backend = backend
, backend_dir = path
, file_col_name = "FCS_File"
, check.names = FALSE )
, check.names = FALSE,
...)
# Remove the temporary intermediate flowSet
unlink(normalizePath(tmp), recursive = TRUE)
# Fix any potential change or re-ordering of sampleNames
Expand Down Expand Up @@ -872,12 +880,10 @@ cs_load_meta <- function(cs){
invisible(lapply(cs, cf_load_meta))
}

#' @title save/load a cytoset to/from disk.
#' save/load a cytoset to/from disk.
#'
#' load_cytoset() can load a cytoset from either the archive previously saved by save_cytoset() call
#' or from a folder that contains a collection of inidivudal cytoframe files (either in h5 format or tiledb format)
#' @description
#' Save/load a cytoset to/from the disk.
#'
#' @param cs A \code{cytoset}
#' @param path A character scalar giving the path to save/load the cytoset to/from.
Expand Down
13 changes: 8 additions & 5 deletions man/convert.Rd

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

2 changes: 2 additions & 0 deletions man/keyword-mutators.Rd

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

8 changes: 3 additions & 5 deletions man/save_cytoset.Rd

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

0 comments on commit 31ac5a5

Please sign in to comment.