Builds a custom table from specified user variants
build_custom_table(
musica,
variant_annotation,
name,
description = character(),
data_factor = NA,
annotation_df = NULL,
features = NULL,
type = NULL,
color_variable = NULL,
color_mapping = NULL,
return_instead = FALSE,
overwrite = FALSE
)A musica object.
User column to use for building table
Table name to refer to (must be unique)
Optional description of the table content
Full set of table values, in case some are missing from the data. If NA, a superset of all available unique data values will be used
A data.frame of annotations to use for plotting
A data.frame of the input data from which the count table will be built
The type of data/mutation in each feature as an Rle object
The name of the column of annotation_df used for the coloring in plots
The mapping from the values in the selected color_variable column to color values for plotting
Instead of adding to musica object, return the created table
Overwrite existing count table
If return_instead = TRUE then the created table object is returned, otherwise the table object is automatically added to the musica's count_tables list and nothing is returned
data(musica)
annotate_transcript_strand(musica, "19", build_table = FALSE)
#> 403 genes were dropped because they have exons located on both strands
#> of the same reference sequence or on more than one reference sequence,
#> so cannot be represented by a single genomic range.
#> Use 'single.strand.genes.only=FALSE' to get all the genes in a
#> GRangesList object, or use suppressMessages() to suppress this message.
build_custom_table(musica, "Transcript_Strand", "Transcript_Strand",
data_factor = factor(c("T", "U")))