create_musica | R Documentation |
This function creates a musica object from a variant
table or matrix. The musica class stores variants information,
variant-level annotations, sample-level annotations, and count tables and
is used as input to the mutational signature discovery and prediction
algorithms. The input variant table or matrix must have columns for
chromosome, start position, end position, reference allele,
alternate allele, and sample names. The column names in the variant table
can be mapped using the chromosome_col
, start_col
,
end_col
, ref_col
, alt_col
, and
sample_col parameters
.
create_musica(
x,
genome,
check_ref_chromosomes = TRUE,
check_ref_bases = TRUE,
chromosome_col = "chr",
start_col = "start",
end_col = "end",
ref_col = "ref",
alt_col = "alt",
sample_col = "sample",
extra_fields = NULL,
standardize_indels = TRUE,
convert_dbs = TRUE,
verbose = TRUE
)
x |
A data.table, matrix, or data.frame that contains columns with the variant information. |
genome |
A BSgenome object indicating which genome reference the variants and their coordinates were derived from. |
check_ref_chromosomes |
Whether to peform a check to ensure that
the chromosomes in the |
check_ref_bases |
Whether to check if the reference bases in the
|
chromosome_col |
The name of the column that contains the chromosome
reference for each variant. Default |
start_col |
The name of the column that contains the start
position for each variant. Default |
end_col |
The name of the column that contains the end
position for each variant. Default |
ref_col |
The name of the column that contains the reference
base(s) for each variant. Default |
alt_col |
The name of the column that contains the alternative
base(s) for each variant. Default |
sample_col |
The name of the column that contains the sample
id for each variant. Default |
extra_fields |
Which additional fields to extract and include in
the musica object. Default |
standardize_indels |
Flag to convert indel style (e.g. 'C > CAT' becomes '- > AT' and 'GCACA > G' becomes 'CACA > -') |
convert_dbs |
Flag to convert adjacent SBS into DBS (original SBS are removed) |
verbose |
Whether to print status messages during error checking.
Default |
Returns a musica object
maf_file <- system.file("extdata", "public_TCGA.LUSC.maf",
package = "musicatk")
variants <- extract_variants_from_maf_file(maf_file)
g <- select_genome("38")
musica <- create_musica(x = variants, genome = g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.