This is a test version of Biostars. For the public version, visit https://www.biostars.org.
ComplexHeatmap unused argument

Hi,

I keep getting this error and have no idea how to get past it. The error is:

Error in Heatmap(my_matrix, cluster_columns = FALSE, row_names_side = "left",  : 
  unused argument (row_hclust_side = "left")

Please help! Below is the script until I received the error.

Thank you!!

library(ComplexHeatmap)
setwd("\\Users\\catungng\\Desktop\\Practice")
#Select a data file
filename <- ".txt"

# Read the data into a data.frame

            my_data <- read.table("alterations_across_samples.tsv", sep="\t", quote="", stringsAsFactors=FALSE,header=TRUE)

            head(my_data)

            dim(my_data) # (rows columns)

            nrow(my_data) # rows: locations (bins) in genome
            ncol(my_data) # columns: cells

            # Make the heatmap data into a matrix
            my_matrix <- as.matrix(my_data[  ,c(4:100)]) # [all rows, columns 4-100]
            # leave out the first 3 columns (chrom,start,end) since they don't belong in the heatmap itself

            # We can check the classes:
            class(my_data)
            class(my_matrix)

            head(my_matrix)

            # Save chromosome column for annotating the heatmap later
            chromosome_info <- data.frame(chrom = my_data$CHR)
            chromosome_info

            ## Now we make our first heatmap

            # Default parameters
            Heatmap(my_matrix)

            # Flip rows and columns around
            my_matrix <- t(my_matrix)  # "transpose"
            Heatmap(my_matrix)

            # Keep genome bins in order, not clustered
            Heatmap(my_matrix, cluster_columns=FALSE)

            fontsize <- 0.6

            # Put cell labels on the left side
            Heatmap(my_matrix, cluster_columns=FALSE,
                    row_names_side = "left",
                    row_hclust_side = "left",
                    row_names_gp=gpar(cex=fontsize))
r genome sequencing gene

1 answer

Change row_hclust_side to row_dend_side, and then it will function correctly.

Kevin

Log in to answer this question.