Skip to content

Commit

Permalink
adds arguments, boolean formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
metamaden committed Jul 24, 2023
1 parent 91421ae commit 4a79757
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ importFrom(stats,rnbinom)
importFrom(stats,rpois)
importFrom(utils,head)
importFrom(utils,read.csv)
importFrom(utils,write.csv)
10 changes: 6 additions & 4 deletions R/lute_rnf.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@
#' @param data.directory Directory containing datasets to load.
#' @param true.proportions.filename.stem File name stem of true proportions values.
#' @param celltype.variable Name of variable containing cell type labels.
#' @param table.directory Directory to write new table.
#' @param table.filename Filename of new table to write.
#' @param table.directory Directory to write table.
#' @param table.filename Filename of table.
#' @param save Whether to save table.
#' @param overwrite Whether to overwrite old table files.
#' @param verbose Whether to show verbose messages.
#' @details Makes and returns/saves a r-nf_deconvolution experiment table.
#' Checks for existence of provided files.
#' @returns New r-nf_deconvolution compatible table of experiment/run metadata.
#' @importFrom utils write.csv
#'
#' @examples
#' new_workflow_table(save = F)
#' new_workflow_table(save = FALSE)
#'
#' @export
new_workflow_table <- function(sce.names = NULL, data.directory = "data",
Expand All @@ -33,7 +35,7 @@ new_workflow_table <- function(sce.names = NULL, data.directory = "data",
"decon_args", "run_info", "assay_name", "celltype_variable")
table.filepath <- file.path(table.directory, table.filename)
if(file.exists(table.filepath) & !overwrite){
stop("Found existing workflow table at path ", table.fpath, ".")}
stop("Found existing table ", table.filepath, ". Stopping.")}
dfnew <- matrix(nrow = 0, ncol = length(rnf.colnames))
newline <- c(file.path("$launchDir", data.directory),
file.path("$launchDir", data.directory), "nnls", "NA",
Expand Down
8 changes: 5 additions & 3 deletions man/new_workflow_table.Rd

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

0 comments on commit 4a79757

Please sign in to comment.