Hi,

I am attempting to make some heat maps with some RNA-Seq data. I used Salmon for my quantification and followed [this][1] link to import my data into R so I can use Deseq2. So I am just going through the Deseq2 little tutorial [here][2]. I am trying to follow their instruction on how to create some heat maps. I believe my issue is with the row names. Someone asked a similar question to mine [here][3] but the issue was never resolved. So in that post, it was suggest that the row names were set to the default 1,2,3,4,5,6,7,8, which is true. This is the result I get when I run `rownames(df)`

    [1] "1" "2" "3" "4" "5" "6" "7" "8"

So I trued to change the column names by running the following

    rownames(df) <- c("adp1","adp2","adp3","adp4","fed1","fed2","fed3","fed4")
    dds@colData@rownames <- c("adp1","adp2","adp3","adp4","fed1","fed2","fed3","fed4")

However, I am still getting the same error

    select <- order(rowMeans(counts(dds,normalized=TRUE)),
                    decreasing=TRUE)[1:20]
    df <- as.data.frame(colData(dds)[,c("condition")])
    pheatmap(assay(ntd)[select,], cluster_rows=FALSE, show_rownames=FALSE,
             cluster_cols=FALSE, annotation_col=df)

 `Error in check.length("fill") : 'gpar' element 'fill' must not be length 0`I

 think my attempts to change the row names were point less? I think the issues goes way back to important my Salmon data into R? I could be mistaken but when I went through their import tutorial, the samples were labeled as sample1, sample2, sample3, etc. 

Any help would be amazing!  


  [1]: https://bioconductor.org/packages/devel/bioc/vignettes/tximport/inst/doc/tximport.html#salmon-sailfish
  [2]: http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#heatmap-of-the-count-matrix
  [3]: https://www.biostars.org/p/281586/
You can just do this:

    cdata <- colData(dds)

    pheatmap(assay(ntd),
        cluster_rows = FALSE,
        show_rownames = FALSE,
        cluster_cols = FALSE,
        annotation_col = as.data.frame(cdata))

...or:

    pheatmap(assay(ntd),
        cluster_rows = FALSE,
        show_rownames = FALSE,
        cluster_cols = FALSE,
        annotation_col = as.data.frame(cdata[,"condition"], row.names=rownames(cdata)))

You do not even have to create the *df* object.

Kevin

***Edit (October 24, 2018:**
the key is that the rownames of the object passed to `annotation_col` have to match the colnames of the object being clustered (here, `assay(ntd)`)*