# HG changeset patch # User artbio # Date 1634751505 0 # Node ID 8a5aaa97dbd61b4550007cc82dd4cdb45f2c6570 # Parent a2cb7dc9250a3b813415c2eb0f9af15cf41249cd "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/mutational_patterns commit 91415d0273efacfc605199a8fbebaf421da9df7e" diff -r a2cb7dc9250a -r 8a5aaa97dbd6 mutational_patterns.R --- a/mutational_patterns.R Tue Oct 19 06:16:32 2021 +0000 +++ b/mutational_patterns.R Wed Oct 20 17:38:25 2021 +0000 @@ -254,7 +254,6 @@ sbs_signatures <- subset(sbs_signatures, select = -c(Type)) # reorder substitutions of sbs_signatures to match mut_mat sbs_signatures <- sbs_signatures[match(row.names(mut_mat), row.names(sbs_signatures)), ] - colnames(sbs_signatures) <- gsub("SBS", "", colnames(sbs_signatures)) # arrange signature colors if (opt$colors == "intense") { signature_colors <- c("#3f4100", "#6f53ff", "#6dc400", "#9d1fd7", "#009c06", "#001fae", "#8adb4d", "#5a67ff", "#d8c938", "#024bc3", "#d2ab00", @@ -392,11 +391,11 @@ colnames(worklist) <- c("signature", "sample", "value", "level") 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) + worklist$label <- factor(gsub("SBS", "", worklist$signature)) worklist$signature <- factor(worklist$signature) 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) + + geom_text(aes(label = label), position = position_stack(vjust = 0.5), color = "white", size = 3) + coord_polar("y", start = 0) + facet_wrap(.~sample) + labs(x = "", y = "Samples", fill = tag) + scale_fill_manual(name = paste0(opt$signum, " most contributing\nsignatures\n(in each label/tissue)"), diff -r a2cb7dc9250a -r 8a5aaa97dbd6 mutational_patterns.xml --- a/mutational_patterns.xml Tue Oct 19 06:16:32 2021 +0000 +++ b/mutational_patterns.xml Wed Oct 20 17:38:25 2021 +0000 @@ -1,4 +1,4 @@ - + from genomic variations in vcf files bioconductor-mutationalpatterns