Skip to content

Commit

Permalink
Merge pull request #16 from biobakery/devel
Browse files Browse the repository at this point in the history
Changed assay_type to assay.type
  • Loading branch information
WillNickols authored Jan 31, 2025
2 parents b90fb46 + 05599a9 commit b9b8e77
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions R/maaslin3.R
Original file line number Diff line number Diff line change
Expand Up @@ -2660,7 +2660,7 @@ maaslin3 <- function(input_data,
save_plots_rds = FALSE,
verbosity = 'FINEST',
summary_plot_balanced = FALSE,
assay_type = 1) {
assay.type = 1) {
match.arg(verbosity, c("FINEST", "FINER", "FINE", "DEBUG", "INFO",
"WARN", "ERROR"))
logging::logReset()
Expand All @@ -2680,7 +2680,7 @@ maaslin3 <- function(input_data,

if (inherits(input_data, "SummarizedExperiment")) {
summarized_experiment_out <-
maaslin_read_summarized_experiment_data(input_data, assay_type)
maaslin_read_summarized_experiment_data(input_data, assay.type)

input_data <- summarized_experiment_out[['data']]
input_metadata <- summarized_experiment_out[['metadata']]
Expand Down
4 changes: 2 additions & 2 deletions R/utility_scripts.R
Original file line number Diff line number Diff line change
Expand Up @@ -825,12 +825,12 @@ preprocess_dna_mtx <- function(dna_table, rna_table) {
# Read from SummarizedExperiment #
##################################

maaslin_read_summarized_experiment_data <- function(summarized_experiment, assay_type = 1) {
maaslin_read_summarized_experiment_data <- function(summarized_experiment, assay.type = 1) {
if (!inherits(summarized_experiment, "SummarizedExperiment")) {
stop("Input must be a SummarizedExperiment object")
}

data <- as.data.frame(t(SummarizedExperiment::assay(summarized_experiment, assay_type)))
data <- as.data.frame(t(SummarizedExperiment::assay(summarized_experiment, assay.type)))
metadata <- as.data.frame(
SummarizedExperiment::colData(summarized_experiment))
return(list(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ save them to an RData file.
* `verbosity` (default `'FINEST'`): The level of verbosity for the
`logging` package.
* `save_plots_rds` (default `FALSE`): Whether to save the plots as RDS files.
* `assay_type` (default `1`): A string or index to select the assay when using
* `assay.type` (default `1`): A string or index to select the assay when using
a `SummarizedExperiment` object.

## Troubleshooting ##
Expand Down
4 changes: 2 additions & 2 deletions man/maaslin3.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ maaslin3(input_data,
save_plots_rds = FALSE,
verbosity = 'FINEST',
summary_plot_balanced = FALSE,
assay_type = 1)
assay.type = 1)
}
\arguments{
\item{input_data}{A data frame of feature abundances or read counts, a
Expand Down Expand Up @@ -223,7 +223,7 @@ maaslin3(input_data,
\code{coef_plot_vars} where N is equal to:
\code{ceiling(summary_plot_first_n/length(coef_plot_vars))}. Will error
if \code{coef_plot_vars} = \code{NULL}}
\item{assay_type}{A string or index to select the assay when using
\item{assay.type}{A string or index to select the assay when using
a \code{SummarizedExperiment} object}
}
\value{
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test_Maaslin3.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fit_out <- maaslin3(input_data = tse,
median_comparison_prevalence = FALSE,
cores=1,
verbosity = 'WARN',
assay_type = 'another_taxa_table')
assay.type = 'another_taxa_table')

fit_out <- maaslin3(input_data = tse,
input_metadata = metadata,
Expand All @@ -99,6 +99,6 @@ fit_out <- maaslin3(input_data = tse,
median_comparison_prevalence = FALSE,
cores=1,
verbosity = 'WARN',
assay_type = 2)
assay.type = 2)

unlink(output_tmp, recursive = T)
2 changes: 1 addition & 1 deletion vignettes/maaslin3_manual.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ save them to an RData file.
* `verbosity` (default `'FINEST'`): The level of verbosity for the
`logging` package.
* `save_plots_rds` (default `FALSE`): Whether to save the plots as RDS files.
* `assay_type` (default `1`): A string or index to select the assay when using
* `assay.type` (default `1`): A string or index to select the assay when using
a `SummarizedExperiment` object.

## Tool comparison ##
Expand Down

0 comments on commit b9b8e77

Please sign in to comment.