Imports genotype data, runs Bayesian MCMC classification to distinguish recrudescent from reinfection malaria treatment failures, summarises results, and saves output plots and tables.
Usage
MalReBay(
filepath = system.file("extdata", "Dataset_microsatellite_panel.xlsx", package = "MalReBay"),
marker_filepath = system.file("extdata", "makers_details.xlsx", package = "MalReBay"),
additional_filepath = NULL,
mcmc_config = system.file("extdata", "default_mcmc_config.rds", package = "MalReBay"),
output_folder = NULL,
n_workers = 1,
verbose = TRUE,
suppress_warnings = TRUE,
prob_threshold = 0.5,
plots = TRUE
)Arguments
- filepath
Path to the genotype data Excel file. Defaults to the package example dataset.
- marker_filepath
Path to the marker metadata Excel file. Defaults to the package example marker file.
- mcmc_config
Path to the MCMC configuration Excel file. Defaults to the package default configuration.
- output_folder
Path to a folder for saving results and plots. Set to
NULLto skip saving (results are still returned invisibly).- n_workers
Number of parallel workers. For length-polymorphic data this is handled automatically by the sampler; the argument is retained for compatibility with amplicon-sequencing data.
- verbose
If
TRUE, print progress messages to the console.- suppress_warnings
Logical. If
TRUE(default), silences the MCMC sampler's own console warnings about divergent transitions, treedepth, and E-BFMI. Seeclassify_infectionsfor details – these diagnostics remain available afterwards viasummary_results$convergenceregardless of this setting.- prob_threshold
Numeric in
[0, 1]. The posterior probability at or above which a recurrence is classified as"Recrudescence"(below it,"Reinfection"). Defaults to0.5, the natural cutoff under this model's equal 50/50 prior. Seesummarise_resultsfor where this is applied.- plots
Logical. If
FALSE, skips all plots (descriptive, result and convergence diagnostic plots); convergence diagnostics are still computed and printed. Defaults toTRUE.
Value
A list of per-site summary results (invisibly). See
summarise_results() for details of the list structure.