Mercurial > repos > artbio > mutational_patterns
diff mutational_patterns.R @ 9:4ff3c984523b draft
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/mutational_patterns commit 109570d3d5f2c232d3bc976590295c1b83bfc9c3"
author | artbio |
---|---|
date | Mon, 19 Oct 2020 14:55:54 +0000 |
parents | e0dad46148bf |
children | 59c0e2a7965c |
line wrap: on
line diff
--- a/mutational_patterns.R Mon Oct 19 07:47:24 2020 +0000 +++ b/mutational_patterns.R Mon Oct 19 14:55:54 2020 +0000 @@ -316,10 +316,11 @@ worklist[[i]] <- worklist[[i]][ , -length(as.data.frame(worklist[[i]]))] } worklist <- as.data.frame(melt(worklist)) + worklist[,2] <- paste0(worklist[,2], " - ", worklist[,4]) + head(worklist) } colnames(worklist) <- c("signature", "sample", "value", "level") - print(worklist) worklist <- as.data.frame(worklist %>% group_by(sample) %>% mutate(value=value/sum(value)*100)) worklist$pos <- cumsum(worklist$value) - worklist$value/2 worklist$label <- factor(worklist$signature)