Title: | Automatize Diagnosis Standardized Assignation Using the Banff Classification |
---|---|
Description: | Assigns standardized diagnoses using the Banff Classification (Category 1 to 6 diagnoses, including Acute and Chronic active T-cell mediated rejection as well as Active, Chronic active, and Chronic antibody mediated rejection). The main function considers a minimal dataset containing biopsies information in a specific format (described by a data dictionary), verifies its content and format (based on the data dictionary), assigns diagnoses, and creates a summary report. The package is developed on the reference guide to the Banff classification of renal allograft pathology Roufosse C, Simmonds N, Clahsen-van Groningen M, et al. A (2018) <doi:10.1097/TP.0000000000002366>. The full description of the Banff classification is available at <https://banfffoundation.org/>. |
Authors: | Guillaume Fabre [aut, cre] , Ruth Sapir-Pichhadze [fnd, cph, ctb], Samuel El Bouzaïdi Tiali [ctb], Jérôme Laforme [ctb], Tina Wey [ctb] |
Maintainer: | Guillaume Fabre <[email protected]> |
License: | GPL-3 |
Version: | 1.0.0 |
Built: | 2024-11-07 05:43:52 UTC |
Source: | https://github.com/personalizedtransplantcare/banffit |
This function takes a dataset and returns a diagnosis for each
observation. For the function to run, the dataset must not contain any errors
that banff_launcher()
would have detected. Please prefer using
banff_launcher()
to run additional tests.
add_diagnoses(banff_dataset)
add_diagnoses(banff_dataset)
banff_dataset |
A tibble object. |
A tibble object that contains additional variables with the diagnoses results.
{ banff_dataset <- get_banff_template() add_diagnoses(banff_dataset) }
{ banff_dataset <- get_banff_template() add_diagnoses(banff_dataset) }
This function takes a dataset and evaluates its format and content based on
the accepted format specified in the data dictionary. It applies a series of
checks to make sure the dataset is ready to be processed by the
add_diagnoses()
function which assigns diagnoses to each observation of the
dataset. The function evaluates whether:
The input file is a dataset
All mandatory variables are present in the dataset
Missing values (NA) are present in variables where they are not allowed
Data types are correct.
The combination of ID, center, and biopsy date is unique
There are duplicated variable in the dataset
Dates are valid
Content values follow the category values as specified in the data dictionary
Constraints specified in the data dictionary are respected
banff_dataset_evaluate(banff_dataset)
banff_dataset_evaluate(banff_dataset)
banff_dataset |
A tibble object. |
A list of tibble objects giving information on the assessment of the dataset.
{ banff_dataset <- get_banff_template() banff_dataset_evaluate(banff_dataset) }
{ banff_dataset <- get_banff_template() banff_dataset_evaluate(banff_dataset) }
This function takes a path string identifying the input file path. The
function internally runs a series of tests that assess the input dataset. If
any of these tests fails, the user gets information allowing them to correct
the input dataset and rerun the process. Once all tests pass, the dataset
is given as an output with a diagnosis for each observation (using the
function add_diagnoses()
internally). The output dataset, along with its
associated labels (label:en
by default) are provided to the user in an Excel
format file accessible in the output_folder specified. The output dataset
comes with a report that summarizes information about variable distributions
and descriptive statistics.
banff_launcher( input_file, output_folder, language = "label:en", option_filter, detail = FALSE )
banff_launcher( input_file, output_folder, language = "label:en", option_filter, detail = FALSE )
input_file |
A character string identifying the path of the input file (must be a CSV or a one sheet Excel file) to be processed. |
output_folder |
A character string identifying the folder path where the output files will be saved. |
language |
Optional argument allowing the user to get the diagnoses in a specific language. Options are "label:en" (default), "label:fr", "label:de", "label:sp", "label:nl", "label:jp", "label:in". |
option_filter |
Optional argument allowing the user to filter the
dataset using |
detail |
Optional argument indicating whether the output should include temporary variables generated in the process or not. FALSE by default. |
Nothing to be returned. The function generates a folder (if not already existing) where Excel files are stored.
{ input_file <- system.file("extdata", "banff_template.xlsx", package = "banffIT") banff_launcher(input_file, output_folder = tempdir()) }
{ input_file <- system.file("extdata", "banff_template.xlsx", package = "banffIT") banff_launcher(input_file, output_folder = tempdir()) }
This function sends the user to the online documentation for the package, which includes a description of the latest version of the package, vignettes, user guides, and a reference list of functions and help pages.
banffIT_website()
banffIT_website()
Nothing to be returned. The function opens a web page.
{ banffIT_website() }
{ banffIT_website() }
This function calculates adequacy of each biopsy (i.e., each observation) based on glomeruli and arteries variables (if provided).
calculate_adequacy(banff_dataset)
calculate_adequacy(banff_dataset)
banff_dataset |
A tibble object. |
A tibble object with two variables: the calculated adequacy (adequacy_calculated) and the adequacy specified in input (adequacy_input).
{ banff_dataset <- get_banff_template() calculate_adequacy(banff_dataset) }
{ banff_dataset <- get_banff_template() calculate_adequacy(banff_dataset) }
These objects are imported from other packages. Follow the links below to see their documentation.
These objects are imported from other packages. Follow the links below to see their documentation.
This function gets the data dictionary used to control the consistency of the input dataset.
get_banff_dictionary(which = NULL, language = "label:en", detail = FALSE)
get_banff_dictionary(which = NULL, language = "label:en", detail = FALSE)
which |
Indicates which variables to get from the Banff data dictionary. If NULL both input and output variables are provided.* |
language |
Optional input allowing the user to get the diagnoses in a specific language. Options are "label:en" (default), "label:fr", "label:de", "label:sp", "label:nl", "label:jp", "label:in". |
detail |
Optional argument indicating whether the data dictionary should include temporary variables generated in the process or not. FALSE by default. |
A list of tibbles representing meta data used in the process. The metadata are the list of variables used, and their associated categories, if any.
{ get_banff_dictionary() }
{ get_banff_dictionary() }
This function gets the dataset used in the vignette as an example.
get_banff_example()
get_banff_example()
A tibble representing the dataset used in the the vignette as an example.
{ get_banff_example() }
{ get_banff_example() }
This function gets the empty dataset with variables that are mandatory in the process.
get_banff_template()
get_banff_template()
A tibble representing the empty dataset.
{ get_banff_template() }
{ get_banff_template() }