Oncoprint unused argument error!~
1
1
Entering edit mode
4.2 years ago
ngcatung0 ▴ 20

Hi, I don't know anywhere around this error for Oncoprint!

Error in oncoprint(mat, alter_fun = alter_fun, col = col, remove_empty_columns = TRUE,  : 
  unused arguments (alter_fun = alter_fun, col = col, remove_empty_columns = TRUE, remove_empty_rows = TRUE, column_title = column_title, heatmap_legend_param = heatmap_legend_param)

I have included the code up till the error appeared below. Please help!

Thanks.

mat = read.table("alterations_across_samples.tsv", 
    header = TRUE, stringsAsFactors = FALSE, sep = "\t")
mat[mat=="no alteration"]<- ""
#rownames(mat) = make.names(mat[, 1], unique = TRUE)
rownames(mat) = mat[, 2]
mat = mat[, -(1:4)]
mat=  mat[, -ncol(mat)]
mat = t(as.matrix(mat))
mat[1:3, 1:3]

col = c("HOMDEL" = "blue", "AMP" = "red", "MUT" = "#008000")
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))
    },
    # big blue
    HOMDEL = function(x, y, w, h) {
        grid.rect(x, y, w-unit(0.5, "mm"), h-unit(0.5, "mm"), 
            gp = gpar(fill = col["HOMDEL"], col = NA))
    },
    # bug red
    AMP = function(x, y, w, h) {
        grid.rect(x, y, w-unit(0.5, "mm"), h-unit(0.5, "mm"), 
            gp = gpar(fill = col["AMP"], col = NA))
    },
    # small green
    MUT = function(x, y, w, h) {
        grid.rect(x, y, w-unit(0.5, "mm"), h*0.33, 
            gp = gpar(fill = col["MUT"], col = NA))

library(oncoprint)
column_title = "OncoPrint for TCGA Lung Adenocarcinoma, genes in Ras Raf MEK JNK signalling"
heatmap_legend_param = list(title = "Alternations", at = c("HOMDEL", "AMP", "MUT"), 
        labels = c("Deep deletion", "Amplification", "Mutation"))
oncoprint(mat,
    alter_fun = alter_fun, col = col, 
    remove_empty_columns = TRUE, remove_empty_rows = TRUE,
    column_title = column_title, heatmap_legend_param = heatmap_legend_param)
```
R genome gene Oncoprint • 1.4k views
ADD COMMENT
1
Entering edit mode
4.2 years ago

It is stating that these arguments are not recognised by the function:

alter_fun
col
remove_empty_columns
remove_empty_rows
column_title
heatmap_legend_param

These are parameters that are recognised by ComplexHeatmap::oncoPrint(). However, in your code, you are trying to load a package called oncoprint, and then run a function called oncoprint(). Please load ComplexHeatmap correctly, and then use ComplexHeatmap::oncoPrint(...) to generate the print.

Kevin

ADD COMMENT

Login before adding your answer.

Traffic: 1243 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6