Mercurial > repos > iuc > snpfreqplot
diff heatmap_for_variants.R @ 2:dc51db22310c draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/snpfreqplot/ commit d1c54d077cfc0eeb9699719760e668948cb9bbbc"
author | iuc |
---|---|
date | Fri, 18 Dec 2020 23:48:01 +0000 |
parents | e362b3143cde |
children | 3d0adeee3f2b |
line wrap: on
line diff
--- a/heatmap_for_variants.R Thu Dec 10 13:41:29 2020 +0000 +++ b/heatmap_for_variants.R Fri Dec 18 23:48:01 2020 +0000 @@ -116,7 +116,7 @@ # colormanagement my_colors <- colorRampPalette(c("grey93", "brown", "black")) #heatmap count <- length(unique(ann_final$gene)) #annotations (genes) -gene_color <- c(brewer.pal(brewer_color_gene_annotation, n = count)) +gene_color <- rep(c(brewer.pal(brewer_color_gene_annotation, n = count)), length.out = count) names(gene_color) <- unique(ann_final$gene) # colormanagement annotations (effect) @@ -161,7 +161,7 @@ pos_ref_alt <- cols[1:3] rest <- "" if (length(cols) > 3) { - rest <- paste0(" :: ", paste(cols[4:length(cols)], sep = " ")) + rest <- paste0(" :: ", paste0(cols[4:length(cols)], collapse = " ")) } ## Trim the REF or ALT if too long if (str_length(pos_ref_alt[2]) > 3) { @@ -175,7 +175,7 @@ pos_ref_alt[2], " > ", pos_ref_alt[3]) ## Join rest - new_name <- paste0(new_name, " ", paste(rest)) + new_name <- paste0(new_name, " ", rest) } colnames(final) <- sapply(colnames(final), fix_label)