Mercurial > repos > artbio > mutational_patterns
diff mutational_patterns.R @ 10:59c0e2a7965c draft
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/mutational_patterns commit 533394bd219d56cde7fb9721803e8aed8fd5a25d"
author | artbio |
---|---|
date | Mon, 19 Oct 2020 23:34:58 +0000 |
parents | 4ff3c984523b |
children | 7995a949189f |
line wrap: on
line diff
--- a/mutational_patterns.R Mon Oct 19 14:55:54 2020 +0000 +++ b/mutational_patterns.R Mon Oct 19 23:34:58 2020 +0000 @@ -316,7 +316,7 @@ worklist[[i]] <- worklist[[i]][ , -length(as.data.frame(worklist[[i]]))] } worklist <- as.data.frame(melt(worklist)) - worklist[,2] <- paste0(worklist[,2], " - ", worklist[,4]) + worklist[,2] <- paste0(worklist[,4], " - ", worklist[,2]) head(worklist) } @@ -328,7 +328,7 @@ p7 <- ggplot(worklist, aes(x="", y=value, group=signature, fill=signature)) + geom_bar(width = 1, stat = "identity") + geom_text(aes(label = label), position = position_stack(vjust = 0.5), color="black", size=3) + - coord_polar("y", start=0) + facet_wrap(~ sample) + + coord_polar("y", start=0) + facet_wrap(.~sample) + labs(x="", y="Samples", fill = cosmic_tag) + scale_fill_manual(name = paste0(opt$signum, " most contributing\nsignatures\n(in each label/tissue)"), values = cosmic_colors[as.numeric(levels(factor(worklist$label)))]) +