Heatmap cannot be plotted
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- r
- Domain
- data-visualization
Research direction
Start by reproducing the tutorial's two heatmap.3 calls with the shown CNA.test and tumor.mat inputs, then inspect whether the matrices passed to heatmap.3 are numeric and whether the plotting device can accommodate the requested margins. Done means both tutorial heatmaps render without the numeric-matrix or figure-margins errors.
Written by the indexing model from the issue text.
Description
Hi, I am using the code provided in the tutorial and cannot to generate both heatmaps using the following code
heatmap.3(t(as.matrix(CNA.test[,4:ncol(CNA.test)])),dendrogram="r", distfun = function(x) parallelDist::parDist(x,threads =4, method = "euclidean"), hclustfun = function(x) hclust(x, method="ward.D2"),
ColSideColors=chr1,RowSideColors=cells,Colv=NA, Rowv=TRUE,
notecol="black",col=my_palette,breaks=col_breaks, key=TRUE,
keysize=1, density.info="none", trace="none",
cexRow=0.1,cexCol=0.1,cex.main=1,cex.lab=0.1,
symm=F,symkey=F,symbreaks=T,cex=1, cex.main=4, margins=c(10,10))
legend("topright", paste("pred.",names(table(com.preN)),sep=""), pch=15,col=RColorBrewer::brewer.pal(n = 8, name = "Dark2")[2:1], cex=0.6, bty="n")
The error shows:
Error in heatmap.3(t(as.matrix(CNA.test[, 4:ncol(CNA.test)])), dendrogram = "r", :
`x' must be a numeric matrix
I also tried code to plot tumor heatmap:
heatmap.3(t(tumor.mat),dendrogram="r", distfun = function(x) parallelDist::parDist(x,threads =4, method = "euclidean"), hclustfun = function(x) hclust(x, method="ward.D2"),
ColSideColors=chr1,RowSideColors=cells,Colv=NA, Rowv=TRUE,
notecol="black",col=my_palette,breaks=col_breaks, key=TRUE,
keysize=1, density.info="none", trace="none",
cexRow=0.1,cexCol=0.1,cex.main=1,cex.lab=0.1,
symm=F,symkey=F,symbreaks=T,cex=1, cex.main=4, margins=c(10,10))
legend("topright", c("c1","c2"), pch=15,col=RColorBrewer::brewer.pal(n = 8, name = "Dark2")[3:4], cex=0.9, bty='n')
Another error occurs: Error in plot.new() : figure margins too large
Can you help?
- Dominant language
- R
- Stars
- 305
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from navinlabcode/copykat
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
navinlabcode/copykat#141 · 1 comment ·
-
License discrepency Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
navinlabcode/copykat#140 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
navinlabcode/copykat#138 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
navinlabcode/copykat#137 ·
-
InferCNA plot logic Open
Difficulty 3/5 1-2 days Newbie friendliness 25/100
navinlabcode/copykat#136 ·
All issues in navinlabcode/copykat
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
beginners blocker
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enviPathR OpenBuild Error Build OK Build Warning policies-accepted pre-review precheck-passed
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Bioconductor/BiocContributions#207 · 6 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
datacarpentry/semester-biology#1255 ·