ComplexHeatmap unused argument
1
1
Entering edit mode
4.1 years ago
ngcatung0 ▴ 20

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.8k views
ADD COMMENT
1
Entering edit mode
4.1 years ago

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

Kevin

ADD COMMENT

Login before adding your answer.

Traffic: 1619 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