deconstrucsSigs data example

true
2021-01-18

Load libraries

Load data

example_data <- sample.mut.ref # Example from package
jasmine_data <- read.csv("forbreastsdeconsctructSigsSNV.txt", sep = "\t")

The diffrences

example_data %>% names()
[1] "Sample" "chr"    "pos"    "ref"    "alt"   
jasmine_data %>% names()
[1] "sample.id" "chr"       "pos"       "ref"       "alt"      
example_data %>% filter(is.na(chr)) %>% nrow()
[1] 0
jasmine_data %>% filter(is.na(chr)) %>% nrow()
[1] 833
example_data %>% select(chr) %>% head()
   chr
1 chr1
2 chr1
3 chr1
4 chr1
5 chr1
6 chr1
jasmine_data %>% select(chr) %>% head()
  chr
1   1
2   1
3   1
4   1
5   1
6   1

Fix the problems

names(jasmine_data)[1] <-  "Sample"
jasmine_data %<>% filter(!is.na(chr))
jasmine_data$chr <- paste0("chr", jasmine_data$chr)

Detect signatures

sigs.input <- mut.to.sigs.input(jasmine_data)
sigs.input %>% rmarkdown::paged_table()
plot_example <- whichSignatures(sigs.input, sample.id = "NA4", contexts.needed = T)
plotSignatures(plot_example)
makePie(plot_example)