check_cancer_types | R Documentation |
This function processes a batch table containing cancer types and checks each cancer category against a predefined list of available cancer types. The batch table can either be specified through a file or directly passed via function arguments. If the cancer type from the batch is not recognized, the function will halt and report an error.
check_cancer_types(args)
args |
A list containing either a path to a batch file ('batch') or direct expressions and category inputs ('expression' and 'category'). If 'batch' is provided, it should be a path to a comma-separated file where the second column contains cancer categories. If 'batch' is not provided, 'expression' and 'category' should be used to manually specify data. |
Returns a matrix with two columns: one for expression data (if provided) and one for cancer categories. Each row corresponds to a record from the input batch.
# Using a batch file:
args <- list(batch = "path/to/batch_file.csv")
result <- check_cancer_types(args)
# Using direct inputs:
args <- list(expression = c("exp1", "exp2"), category = c("lung", "breast"))
result <- check_cancer_types(args)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.