Question: ComplexHeatmap unused argument
1
gravatar for ngcatung0
4 weeks ago by
ngcatung020
ngcatung020 wrote:

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))
sequencing gene R genome • 59 views
ADD COMMENTlink modified 4 weeks ago by zx87549.1k • written 4 weeks ago by ngcatung020
1
gravatar for Kevin Blighe
4 weeks ago by
Kevin Blighe56k
Kevin Blighe56k wrote:

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

Kevin

ADD COMMENTlink written 4 weeks ago by Kevin Blighe56k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1264 users visited in the last hour