Skip to content

Commit

Permalink
Merge pull request #764 from moritzschaefer/develop
Browse files Browse the repository at this point in the history
Always check for >0 rows with regard to using heatmap_data
  • Loading branch information
LeilyR committed May 14, 2021
2 parents 53fbd9b + 29c46d3 commit 16ae0f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions snakePipes/shared/rscripts/DESeq2Report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Most of the exploration below is based on the annotated DESeq2 output file gener
## Extract data for heatmap
# order by fold change (by abs foldch if only few top genes requested)
#print("Preparing data: heatmap")
if (nrow(df.filt) > 1) {
if (nrow(df.filt) > 0) {
d <- data.frame(id = rownames(df.filt), padj = df.filt$padj)
if (length(rownames(d)) < heatmap_topN ) {
heatmap_topN <- nrow(d)
Expand Down Expand Up @@ -398,7 +398,7 @@ This plot shows a heatmap of DESeq2-normlized counts for the **top 20** differen

```{r 'heatmap2', fig.show=TRUE}
# 7.1 Heatmap topN genes z-score
if (nrow(df.filt) > 1) {
if (nrow(df.filt) > 0) {
pheatmap(heatmap_data,
cluster_rows = TRUE,
clustering_method = "average",
Expand Down

0 comments on commit 16ae0f5

Please sign in to comment.