Generates count tables for different mutation type schemas which can be used as input to the mutational signature discovery or prediction functions. "SBS96" generates a table for single base substitutions following the standard 96 mutation types derived from the trinucleotide context. "SBS192" is the 96 mutation type schema with the addition of transcriptional strand or replication strand information added to each base. "DBS" generates a table for the double base substitution schema used in COSMIC V3. "Indel" generates a table for insertions and deletions following the schema used in COSMIC V3.

build_standard_table(
  musica,
  g,
  table_name,
  strand_type = NULL,
  overwrite = FALSE,
  verbose = FALSE
)

Arguments

musica

A musica object.

g

A BSgenome object indicating which genome reference the variants and their coordinates were derived from.

table_name

Name of standard table to build. One of "SBS96", "SBS192", "DBS", or "Indel".

strand_type

Strand type to use in SBS192 schema. One of "Transcript_Strand" or "Replication_Strand". Only used if table_name = SBS192.

overwrite

If TRUE, any existing count table with the same name will be overwritten. If FALSE, then an error will be thrown if a table with the same name exists within the musica object.

verbose

Show progress bar for processed samples

Value

No object will be returned. The count tables will be automatically added to the musica object.

Examples

g <- select_genome("19") data(musica) build_standard_table(musica, g, "SBS96", overwrite = TRUE)
#> Building count table from SBS with SBS96 schema
#> Warning: Overwriting counts table: SBS96
data(musica) annotate_transcript_strand(musica, "19")
#> 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_standard_table(musica, g, "SBS192", "Transcript_Strand")
#> Building count table from SBS and Transcript_Strand with SBS192 schema
data(musica) data(rep_range) annotate_replication_strand(musica, rep_range) build_standard_table(musica, g, "SBS192", "Replication_Strand")
#> Building count table from SBS and Replication_Strand with SBS192 schema
data(dbs_musica) build_standard_table(dbs_musica, g, "DBS", overwrite = TRUE)
#> Building count table from DBS with DBS78 schema
#> Warning: Overwriting counts table: DBS78
data(indel_musica) build_standard_table(indel_musica, g, table_name = "INDEL")
#> Building count table from INDELs with IND83 schema