This function will select genes based on user inputs or on frequency counts and then
will pass the data.frame to gtsummary::tbl_summary()
. You can specify a by
variable and other
parameters that are accepted by gtsummary::tbl_summary()
. Note the by
variable must be merged on to
onto the data before using the by
parameter in the function.
Usage
tbl_genomic(
gene_binary,
by = NULL,
freq_cutoff = deprecated(),
freq_cutoff_by_gene = deprecated(),
gene_subset = deprecated(),
...
)
Arguments
- gene_binary
data.frame of genetic samples
- by
A variable to be passed to
gtsummary::tbl_summary()
's by parameter- freq_cutoff
deprecated
- freq_cutoff_by_gene
deprecated
- gene_subset
deprecated
- ...
Additional parameters that can be passed to
gtsummary::tbl_summary()
. To access the additional parameters you need to loadgtsummary
.
Examples
samples <- unique(mutations$sampleId)[1:10]
gene_binary <- create_gene_binary(
samples = samples,
mutation = gnomeR::mutations,
cna = gnomeR::cna,
mut_type = "somatic_only", snp_only = FALSE,
specify_panel = "no"
)
tbl1 <- tbl_genomic(gene_binary)
# Example wth `by` variable
gene_binary$sex <- sample( c("M", "F"), size = nrow(gene_binary), replace = TRUE)
tbl2 <- tbl_genomic(
gene_binary = gene_binary,
by = sex
) %>%
gtsummary::add_p() %>%
gtsummary::add_q()
#> add_q: Adjusting p-values with
#> `stats::p.adjust(x$table_body$p.value, method = "fdr")`