predict_exposure: Prediction of exposures in new samples using pre-existing...

Description Usage Arguments Value Examples

View source: R/discovery_prediction.R

Description

Exposures for samples will be predicted using an existing set of signatures stored in a musica_result object. Algorithms available for prediction include a modify version of "lda", "decompTumor2Sig", and "deconstructSigs".

Usage

1
2
3
4
5
6
7
8
9
predict_exposure(
  musica,
  g,
  table_name,
  signature_res,
  algorithm,
  signatures_to_use = seq_len(ncol(signatures(signature_res))),
  verbose = FALSE
)

Arguments

musica

A musica object.

g

A BSgenome object indicating which genome reference the variants and their coordinates were derived from. Only used if algorithm = "deconstructSigs"

table_name

Name of table used for posterior prediction. Must match the table type used to generate the prediction signatures

signature_res

Signatures used to predict exposures for the samples musica object. Existing signatures need to stored in a musica_result object.

algorithm

Algorithm to use for prediction of exposures. One of "lda", "decompTumor2Sig", or "deconstructSigs".

signatures_to_use

Which signatures in the signature_res result object to use. Default is to use all signatures.

verbose

If TRUE, progress will be printing. Only used if algorithm = "lda". Default FALSE.

Value

Returns a A musica_result object containing signatures given by the signature_res parameter and exposures predicted from these signatures.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(musica)
data(cosmic_v2_sigs)
g <- select_genome("19")
build_standard_table(musica, g, "SBS96", overwrite = TRUE)
result <- predict_exposure(musica = musica, table_name = "SBS96",
signature_res = cosmic_v2_sigs, algorithm = "lda")

# Predict using LDA-like algorithm with seed set to 1
set.seed(1)
predict_exposure(musica = musica, table_name = "SBS96",
signature_res = cosmic_v2_sigs, algorithm = "lda")

musicatk documentation built on Nov. 8, 2020, 5:16 p.m.