Code Monkey home page Code Monkey logo

complexheatmap's Introduction

Anurag's github stats

Activities on my repos (R packages, 2013-04-18 ~ 2022-12-10): (code for generating this plot: https://jokergoo.github.io/spiralize_vignettes/examples.html#github-commits)

code
library(spiralize)
library(grid)

repos = c("GlobalOptions", "GetoptLong", "circlize", "bsub", "pkgndep", "ComplexHeatmap", "EnrichedHeatmap", 
    "HilbertCurve", "gtrellis", "cola", "simplifyEnrichment", "InteractiveComplexHeatmap", "spiralize", "rGREAT", "simona")

df_all = data.frame(commits = numeric(0), date = character(0), repo = character(0))
for(r in repos) {
    # go to each repo folder
    setwd(paste0("~/project/development/", r))
    df = read.table(pipe("git log --date=short --pretty=format:%ad | sort | uniq -c"))
    colnames(df) = c("commits", "date")
    df$repo = r

    df_all = rbind(df_all, df)
}

df_all$date = as.Date(df_all$date)

start = min(df_all$date)
end = max(df_all$date)

d = start + seq(1, end - start + 1) - 1
n = numeric(length(d))
nl = lapply(repos, function(x) numeric(length(d)))
names(nl) = repos

for(i in seq_len(nrow(df_all))) {
    ind = as.double(difftime(df_all[i, "date"], start), "days") + 1
    n[ind] = n[ind] + df_all[i, "commits"]

    nl[[ df_all[i, "repo"] ]][ind] = nl[[ df_all[i, "repo"] ]][ind] + df_all[i, "commits"]
}

calc_pt_size = function(x) {
    pt_size = x
    pt_size[pt_size > 20] = 20
    pt_size[pt_size < 2 & pt_size > 0] = 2
    pt_size
}
xlim = range(d)

pl = list()
pl[[1]] = grid.grabExpr({
    spiral_initialize_by_time(xlim, verbose = FALSE, normalize_year = TRUE)
    spiral_track()
    spiral_points(d, 0.5, pch = 16, size = unit(calc_pt_size(n), "pt"))
    grid.text("All packages", x = 0, y = 1, just = c("left", "top"), gp = gpar(fontsize = 14))

    for(t in c("2013-01-01", "2014-01-01", "2015-01-01", "2016-01-01", "2017-01-01",
               "2018-01-01", "2019-01-01", "2020-01-01", "2021-01-01", "2022-01-01", "2023-01-01")) {
        spiral_text(t, 0.5, gsub("-\\d+-\\d+$", "", as.character(t)), gp = gpar(fontsize = 8), facing = "inside")
    }
})

for(i in order(sapply(nl, sum), decreasing = TRUE)) {
    pl[[ names(nl)[i] ]] = grid.grabExpr({
        spiral_initialize_by_time(xlim, verbose = FALSE, normalize_year = TRUE)
        spiral_track()
        spiral_points(d, 0.5, pch = 16, size = unit(calc_pt_size(nl[[i]]), "pt"))
        grid.text(names(nl)[i], x = 0, y = 1, just = c("left", "top"), gp = gpar(fontsize = 14))

        for(t in c("2013-01-01", "2014-01-01", "2015-01-01", "2016-01-01", "2017-01-01",
                   "2018-01-01", "2019-01-01", "2020-01-01", "2021-01-01", "2022-01-01", "2023-01-01")) {
            spiral_text(t, 0.5, gsub("-\\d+-\\d+$", "", as.character(t)), gp = gpar(fontsize = 8), facing = "inside")
        }
    })
}

library(cowplot)
png("~/test.png", 300*4*1.5, 300*4*1.5, res = 72*1.5)
plot_grid(plotlist = pl, ncol = 4)
dev.off()

test

complexheatmap's People

Contributors

apeltzer avatar asalt avatar cola-recount2 avatar dtenenba avatar dtm2451 avatar emenzed avatar evanbiederstedt avatar goultard59 avatar hpages avatar hunter-github avatar jokergoo avatar jwokaty avatar kieran-mace avatar link-ny avatar nturaga avatar petehaitch avatar sonali-bioc avatar trile965 avatar vobencha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

complexheatmap's Issues

add update() and summary() functions

plan to add two functions:

  • summary(): to print configurations of every heatmap
  • update(): update configurations after the heatmap list is constructed

I think update() should be especially useful when users develop their own functions with ComplexHeatmap package that it is impossible to pass all configurations to all heatmaps in the list
but they can first return a heatmap list object with essential configurations and later fine-tune other
configurations by update()

How to split the heatmap based on dendextend::cuttree clusters?

I am using dendextend to cut my hierarchical clustering dendrograms and want to split the heatmap accordingly. Can I use Heatmap to do this? I know I can do this if I subset the matrix and plot the heatmap with the subset of data...

hr <- hclust(dist(mat_FC), method = "average")
clusters <- dendextend::cutree(hr, k = 100)
row_dend = hr
col_dend = hclust(dist(t(mat_FC)), method = "average")
Heatmap(mat_FC, col = colorRamp2(c(-10, 0, 10), c("blue", "#EEEEEE", "red"), space = "RGB"),
cluster_rows = color_branches(row_dend, k = 100),
cluster_columns = color_branches(col_dend, k =2),
show_row_names = FALSE,
split =100)

However, I am getting the following error:
Error in valid.viewport(x, y, width, height, just, gp, clip, xscale, yscale, :
invalid 'xscale' in viewport

Thanks!!

treat column and row annotations consistently

As far as I can see, in 1.2.1, if I want both row and column annotations, I need to use top_annotation (or bottom_annotation) and then do + rowAnnotation. For consistency, would it make more sense to have one of either:

Heatmap(...., top_annotation = ..., right_annotation = ....)

or

rowAnnot <- HeatmapAnnotation(...., which = "row")
colAnnot <- HeatmapAnnotation(...., which = "col")
Heatmap(....) + rowAnnot + colAnnot

Why bother having the ability to set which in HeatmapAnnotation if you can't use it directly, and why the different methods to add column and row annotations?

R 3.1.3 is not supported

Hello, here is what i get when i try to install complex heap map for R 3.1.3

> source("http://bioconductor.org/biocLite.R")
Bioconductor version 3.0 (BiocInstaller 1.16.2), ?biocLite for help
> biocLite("ComplexHeatmap")
BioC_mirror: http://bioconductor.org
Using Bioconductor version 3.0 (BiocInstaller 1.16.2), R version 3.1.3.
Installing package(s) 'ComplexHeatmap'
Warning message:
package 'ComplexHeatmap' is not available (as a binary package for R version 3.1.3) 

Colorbar

Is it possible to plot a colorbar instead of the current legend? For example, using this code?

I suppose there is a way to use grid.layout or some other function to accomplish this, but my attempts have been unsuccessful.

# Function to plot color bar
color.bar <- function(lut, min, max=-min, nticks=11, ticks=seq(min, max, len=nticks), title='') {
    scale = (length(lut)-1)/(max-min)

    dev.new(width=1.75, height=5)
    plot(c(0,10), c(min,max), type='n', bty='n', xaxt='n', xlab='', yaxt='n', ylab='', main=title)
    axis(2, ticks, las=1)
    for (i in 1:(length(lut)-1)) {
        y = (i-1)/scale + min
        rect(0,y,10,y+1/scale, col=lut[i], border=NA)
    }   
}

http://www.colbyimaging.com/wiki/statistics/color-bars

heatmap_legend_side does not moves the annotation legends

Hi,

When we use the parameter heatmap_legend_side to move the legends to the bottom
draw(ht, heatmap_legend_side = "bottom"),
it only moves the legends from the onconprint, but not for annatations to the bottom.

How can I do that? I would like to have all legends in the bottom.
Thanks.

image

Rotate a part of the dendrogram

Hello,
I'm a newbie in R utilisation and I try to use ComplexHeatmap to visualize my data. I work on single cell qPCR analysis and i would like to rotate a part of the dendrogram.
I try to change the order with a vector in the "column_dend_reorder" command, but I don't understand how it works.

Does anybody performed this before?
Thks,
Nicolas :)
change order

retrieve row orders and clusters for k-means

Hi,
I can do kmeans first (I know orders of the rows, and the cluster for each row), and then draw the heatmap:

km = kmeans(mat, 3)
Heatmap(mat, name = "foo", split = paste0("km", km$clustering))

How can I retrieve row orders and which cluster each row belongs to after draw?

Heatmap(mat, name = "foo", km=3)

I know row_order can get the row order, but how I can get the clusters?

Thanks,
Ming

heatmap_legend_side

Everytime I try to use heatmap_legend_xxx I always get the same error:

Error in Heatmap(mat, name = "relAbund", col = palete, heatmap_legend_title = "x") :
unused argument (heatmap_legend_title = "x")

Can someone check that?
Thank's!

Add row_order to plotDataFrame

Awesome to see the development of this package making such great strides. I have another feature request, though. Would it be possible to get row_order and column_order parameters for plotDataFrame?

Reorder built-in hclust

I would like to use the built-in hclust via the clustering_distance_rows, clustering_method_rows parameters as well as declaring custom clustering via split. This works fine in the current release, however it seems I cannot make changes to the built-in hierarchical clustering this way (since I cannot supply an externally computed hclust as well as supplying split, because ComplexHeatmap::Heatmap interprets these as conflicting clusterings rather than the instruction to apply the built-in hclust to the externally supplied clusters as I intended. I would not care much if I had not an important requirement for the hclust: I would like to reorder the branches (while preserving the clustering) so that similar items keep nearby, as done by gclus::reorder.hclust. Is there any way you could allow to (1) either modify the built-in hclust (while preserving split clusterings), or (2) add the reordering functionality to ComplexHeatmap::Heatmap directly?

Parallel hclust using amap

It seems as if the amap R package allows hclust computation using multiple compute cores and additional distance measures and link functions. Otherwise it is a drop-in replacement for hclust, I believe. I found the speed advantage worthwhile with large data sets, so maybe you would want to use it in ComplexHeatmap.

Row_order - unused argument.

Hi,

I am trying to manually order rows in a heat map but when run this example:
set.seed(123)

mat = cbind(rbind(matrix(rnorm(16, -1), 4), matrix(rnorm(32, 1), 8)),
rbind(matrix(rnorm(24, 1), 4), matrix(rnorm(48, -1), 8)))

permute the rows and columns
&mat = mat[sample(nrow(mat), nrow(mat)), sample(ncol(mat), ncol(mat))]*

rownames(mat) = paste0("R", 1:12)
colnames(mat) = paste0("C", 1:10)

Heatmap(mat, name = "foo", cluster_rows = FALSE, cluster_columns = FALSE,
row_order = 12:1, column_order = 10:1)

I get the following message:

unused arguments (row_order = 12:1, column_order = 10:1)

I tried several things, such as modifying the row_order_list within a heat map object without success.

Any ideas?

Thanks in advance,

Fernando

OncoPrint in a Shiny app

Hi Zuguang,
I'm not sure this is a problem of your package (most probably not!), but I'm having issues with using the oncoPrint function inside a Shiny app.
Run the code below for an example

library(shiny)
runGist("84cdc8af0a2b3e219883")

and here is the code for it: https://gist.github.com/msquatrito/84cdc8af0a2b3e219883

I've no problems in plotting mutation data only, but I've noticed inconsistencies when I combine them with copy number alteration data. Some of the mutations disappear when you select multiple genes at the same time and then reappear if you remove some of them. I know, it's hard to understand it in this way, maybe if you would have time to test it yourself you could see what is the issue. Try to type EGFR PTEN TP53 ATRX, and then start to remove them one by one. I know that the mutations are there, because if I make the color transparent I can see them. I guess it might be a problem at the time when the multiple layers of the plot are called.

Most probably it is an issue of my code, on the way a create the matrix with the mutation and copy number data, but I was wondering if you could have any suggestion on how to solve it.

Thanks in advance!
Massimo

Error with plotDataFrame()

I got an error using the R code below:

library("ComplexHeatmap")
plotDataFrame(as.data.frame(mtcars))

Error code:

Error in Heatmap(df[, ci, drop = FALSE], name = group_names[i], column_title = column_title, :
can't find the object 'split2'

Am I doing something wrong?

Thank you for your great work!

what does row_dend_reorder do?

Hi,
I saw in the help page:

row_dend_reorder
apply reordering on rows. The value can be a logical value or a vector which contains weight which is used to reorder rows

what does it do exactly?

I found dendsort
Is it doing something similar?

Thanks,
Ming

How to write an cell_fun outside Heatmap()?

Hi Zuguang,

I would like to write a cell_fun for daily use, for example, plotting some number in corresponding heatmap cell (correlation heatmap with correlation value plotted).

cell_function = f(){ some code }

Then feed the cell_function to Heatmap()

Heatmap(mat, cell_fun = cell_function)

Thanks ,

Does it accept NA value?

Hi,
Does it accept NA value for plot heatmap when I don't want to do cluster?
Best regards!
Bo

Error if there is 'no' dendrogram to be drawn

To reproduce with an artificial example, I insert a duplicate row and put the two duplicate rows in one cluster to split by. As a use case this might happen if one shows variables that are normalize onto (and if one clusters by correlation).

library(ComplexHeatmap)
library(circlize)

set.seed(123)

mat = cbind(rbind(matrix(rnorm(16, -1), 4), matrix(rnorm(32, 1), 8)),
            rbind(matrix(rnorm(24, 1), 4), matrix(rnorm(48, -1), 8)))

# permute the rows and columns
mat = mat[sample(nrow(mat), nrow(mat)), sample(ncol(mat), ncol(mat))]

rownames(mat) = paste0("R", 1:12)
colnames(mat) = paste0("C", 1:10)

## add duplicate row
mat <- rbind(mat, R13=mat["R12",])

Heatmap(mat, name = "foo", split = c(rep("B", 11), "A", "A"))
## Error in valid.viewport(x, y, width, height, just, gp, clip, xscale, yscale,  (from utils.R#267) : 
##  invalid 'xscale' in viewport

Is it possible to draw a vertical HeatmapList?

As the question says, it would be great to be able to draw vertical lists of heatmaps.
Is there any workaround that would allow this with the current version? If not, is it a planned feature?

Thanks!
Johannes

Can we scale data and trim data for better presentation

Hi jokergoo,

In the Heatmap, can we scale data and/or trim data AFTER the clusters defined in the original data?
Since in some cases, if we input a scaled data, the cluster pattern may be different from the one using original data. Some options like below or some alternatives I can try would be great.

scale: "row" "column" "none" 
trim: Logic
trim_size: numeric

Thanks for the package.

Set custom row labels?

Instead of setting the row labels using rownames(), is it possible to supply a custom list of row labels to Heatmap()? In other words, I am looking for something similar to the labRow argument in heatmap.2(). The reason is that my row labels have duplicate names and consequently I cannot use rownames() on my data frame.

split on columns?

Hi,

I looked at the help page for Heatmap, it seems only supports split on rows, and there is a gap parameter for it. Is it possible to split on columns as well?

A more detailed question is:
when I do a supervised-clustering, I want to first split the columns (samples) into say 3 pre-defined subgroups first, and then do clustering within each subgroup for columns and do a k-means for all rows. Is it possible?

Now, I am manually arrange the data matrix into three distinct groups, and do a K means with the rows, and cluster_column=FALSE.

Thanks,
Ming

Change the size of legend text?

Thanks for the excellent package!

I see that the legend title font size can be changed like this:

draw(...,  legend_title_gp = gpar(fontsize = 18, fontface = "bold") )

However, I don't see any examples showing how to change the font size of the legend text. Could you please advise?

Ideally, I would like to simply pass an argument called legend_gp or legend_text_gp but I can't seem to find an easy way to do this.

Alternatively, is there a way to do this by creating a custom legend?

heatmap_legend_color_bar not recognized

Hi,

I tried to use the heatmap_legend_color_bar to change discrete legend to continuous style, but R complains it being an unused argument.

Heatmap(mat, name = "ht1", top_annotation = ha, heatmap_legend_color_bar = "continuous")

unused argument (heatmap_legend_color_bar = "continuous")

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] grid      parallel  stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] dendextend_1.1.2     GetoptLong_0.1.0     circlize_0.3.2       ComplexHeatmap_1.6.0 Biobase_2.30.0       BiocGenerics_0.16.0
[7] data.table_1.9.6

loaded via a namespace (and not attached):
[1] chron_2.3-47        magrittr_1.5        GlobalOptions_0.0.8 whisker_0.3-2       RColorBrewer_1.1-2  rjson_0.2.15
[7] tools_3.2.2         colorspace_1.2-6    shape_1.4.2

dplyr select

Hi Zuguang,

Awesome package!

Would be awesome to have your thoughts on the issue of conflicting function names with dplyr.

Basically, select function is common between the two packages.

Long column names getting cut off

I have some column names that are very long and get cut off in the heatmap. How can I adjust the margins so that they appear completely and without decreasing the font size?

e.g.

df <- data.frame(A_very_long_column_title_1 = rnorm(10), Another_very_long_column_title_2 = rnorm(10))
Heatmap(df)

rplot

Thanks!

Oncoprint with only one gene

Hi,
First of all, great package!
I've been playing a little bit with the oncoPrint function and I've realized that is not possible to plot data from one single gene.I've no problem in plotting multiple genes. However, when I try with a matrix containing info for one gene only, I get the following error message:

Error in apply(count_matrix[row_order, ], 2, scoreCol) :
dim(X) must have a positive length

I guess it's due to the fact that the matrix that I'm passing to oncoPrint contains only one row. Do you know any work around for it?
Thanks
Massimo

Error in oncoPrint You should define shape function for:MUT:

I try to fellow the "oncoplot" exapmple from https://github.com/jokergoo/ComplexHeatmap/blob/master/vignettes/s8.oncoprint.Rmd
but it gives me error.

Here is an example:

mat = read.table(textConnection(
    "   S1  S2  S3  S4
KRAS        MUT       
HRAS    MUT MUT MUT MUT
BRAF    HOMDEL            
RAF1                  
MAP3K1      HOMDEL        
MAP3K2              MUT:
MAP3K3  AMP           
MAP3K4  AMP           
MAP3K5      MUT HOMDEL  "), row.names = 1, header = TRUE, sep = "\t", stringsAsFactors = FALSE)

mat=as.matrix(mat)
col = c("MUT" = "#008000", "AMP" = "red", "HOMDEL" = "blue")
oncoPrint(mat, alter_fun_list = alter_fun_list, col = col, heatmap_legend_param = list(title = "Alternations", at = c("AMP", "HOMDEL", "MUT"), labels = c("Amplification", "Deep deletion", "Mutation")))

It gives the error

Error in oncoPrint(mat, ...
  You should define shape function for:MUT:

When cluster with too many rows, the heatmap is too dense, and the file size is large.

Hi,

This is more like a general question. When making heatmap with too many rows, usually use EnrichedHeatmap with many (more than 10,000) genomic regions, the PDF size of the heatmap is very big (several MB). Computer becomes very slow when visualize it or when insert into powerpoint and Word. For other type of analysis, I usually use only top several hundred most variable rows to cluster.

I know it is more of a visualization than making any real quantitative comparisons. Our eyes probably can not differentiate these many pixels. How to reduce the size of the PDF?

Some time ago, I got a tip from this post

Now for my heatmap power tip of the day, if you will: use the "useRaster=TRUE" parameter in your heatmap.2() call. Excellent extension by R developers since 2.13. But for some reason the R developers explicitly turn it off for interactive session windows, so you'll only see it in an exported file. (Unless you have a custom image() function which doesn't disable it, I did this.) It also makes the exported file hugely smaller, especially for PDFs.

What it does is darn-near essential for nextgen coverage heatmaps -- it actually properly resamples the image as it down-sizes the image during export. Without useRaster=TRUE, image() creates a zillion tiny rectangles to represent the heatmap, all pieced together right next to each other. When the display is fewer pixels/points high than the number of rows of data, it discretizes the data -- that is, it uses integer values for the rectangles. In many cases, especially onscreen, many rectangles fully overlap others, randomly obscuring the real patterns, and often blunting your otherwise cool-looking signal.

useRaster=TRUE is only for heatmap.2 or internally image(). Is there a way to specify it in ComplexHeatmaps or how do you usually deal with this situation?

Thanks,
Ming

row_order / column_order use character indices

row_order and column_order should be allowed to be character indices if the rownames and colnames of the matrix are not NULL so that reordering can be done using character vectors, which is very useful.

Greek symbols in titles?

It is possible to plot greek symbols in titles (as well as legend titles)? Using expression() doesn't seem to work:

library(ComplexHeatmap)
mat = matrix(rnorm(100), 10)
Heatmap(mat, column_title = expression(beta))

Error in column_title == "" : comparison is not allowed for expressions
In addition: Warning message:
In is.na(column_title) :
  is.na() applied to non-(list or vector) of type 'expression'

Thanks

Error in if (v[nm]) alter_fun[[nm]](x, y, w, h) :

I'm getting this error

Error in if (v[nm]) alter_fun[[nm]](x, y, w, h) :

When calling oncoPrint. I believe it happens when there. Using the example from the vignette I could reproduce the error using a subset of the mat. For the entire mat it is ok.
I believe this happens when we don't have all the cases from alter_fun in the matrix, but I'm not sure.

> mat = read.table(paste0(system.file("extdata", package = "ComplexHeatmap"), 
+     "/tcga_lung_adenocarcinoma_provisional_ras_raf_mek_jnk_signalling.txt"), 
+     header = TRUE,stringsAsFactors=FALSE, sep = "\t")
> mat[is.na(mat)] = ""
> rownames(mat) = mat[, 1]
> mat = mat[, -1]
> mat=  mat[, -ncol(mat)]
> mat = t(as.matrix(mat))
> mat[1:3, 1:3]
> alter_fun = list(
+     background = function(x, y, w, h) {
+         grid.rect(x, y, w-unit(0.5, "mm"), h-unit(0.5, "mm"), gp = gpar(fill = "#CCCCCC", col = NA))
+     },
+     HOMDEL = function(x, y, w, h) {
+         grid.rect(x, y, w-unit(0.5, "mm"), h-unit(0.5, "mm"), gp = gpar(fill = "blue", col = NA))
+     },
+     AMP = function(x, y, w, h) {
+         grid.rect(x, y, w-unit(0.5, "mm"), h-unit(0.5, "mm"), gp = gpar(fill = "red", col = NA))
+     },
+     MUT = function(x, y, w, h) {
+         grid.rect(x, y, w-unit(0.5, "mm"), h*0.33, gp = gpar(fill = "#008000", col = NA))
+     }
+ )
> col = c("MUT" = "#008000", "AMP" = "red", "HOMDEL" = "blue")
> oncoPrint(mat, get_type = function(x) strsplit(x, ";")[[1]],
+     alter_fun = alter_fun, col = col, 
+     column_title = "OncoPrint for TCGA Lung Adenocarcinoma, genes in Ras Raf MEK JNK signalling",
+     heatmap_legend_param = list(title = "Alternations", at = c("AMP", "HOMDEL", "MUT"), 
+         labels = c("Amplification", "Deep deletion", "Mutation")))
> oncoPrint(mat[1:10,1:10], get_type = function(x) strsplit(x, ";")[[1]],
+     alter_fun = alter_fun, col = col, 
+     column_title = "OncoPrint for TCGA Lung Adenocarcinoma, genes in Ras Raf MEK JNK signalling",
+     heatmap_legend_param = list(title = "Alternations", at = c("AMP", "HOMDEL", "MUT"), 
+         labels = c("Amplification", "Deep deletion", "Mutation")))
Error in if (v[nm]) alter_fun[[nm]](x, y, w, h) : 
  valor ausente onde TRUE/FALSE necessário

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.