Skip to contents

Subtracts signature2 from signature1 (factions) and returns result. Works for only signatures. To translate to a catalogue see sig_reconstruct()

Usage

sig_subtract(signature1, signature2)

Arguments

signature1, signature2

sigverse signature data.frames. See sigshared::example_signature().

Value

a data.frame representing a sigverse signature

Examples

library(sigstash)

# Load a signature collection
signatures <- sig_load("COSMIC_v3.3.1_SBS_GRCh38")

# Subtract signatures
sig_subtract(signatures[['SBS3']], signatures[['SBS4']])
#> # A tibble: 96 × 3
#>    type  channel fraction
#>    <chr> <chr>      <dbl>
#>  1 C>A   A[C>A]A -0.0215 
#>  2 C>A   A[C>A]C -0.0166 
#>  3 C>A   A[C>A]G -0.0143 
#>  4 C>A   A[C>A]T -0.0174 
#>  5 C>G   A[C>G]A  0.0129 
#>  6 C>G   A[C>G]C  0.00878
#>  7 C>G   A[C>G]G -0.00106
#>  8 C>G   A[C>G]T  0.0139 
#>  9 C>T   A[C>T]A  0.00553
#> 10 C>T   A[C>T]C  0.00814
#> # ℹ 86 more rows