Question about define subpopulations of aneuploid tumor cells
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- r
- Domain
- bioinformatics
Research direction
Start with the supplied R plotting snippet, focusing on the legend(...) call and the treecut_number <- 4 workflow, then reproduce the reported error. Done means the legend behavior is explained and the issue is resolved or the required usage is documented for defining these subpopulations.
Written by the indexing model from the issue text.
Description
I have tried to define subpopulations of aneuploid tumor cells by changing the parameter with following command, but errors happend in "legend" with "Error in rep_len(col, n.leg) : attempt to replicate non-vector". I am not familiar with R package, could you please offer some help?
treecut_number<-4
hc.umap <- cutree(hcc,treecut_number)
rbPal6 <- colorRampPalette(RColorBrewer::brewer.pal(n = 8, name = "Dark2")[1:treecut_number])
subpop <- rbPal6(treecut_number)[as.numeric(factor(hc.umap))]
cells <- rbind(subpop,subpop)
legend_names<-paste("c",1:treecut_number,sep="")
png(paste(out_dir,"/copykat_05.heatmap.png",sep=""),width = 4006, height =4006,res=400)
heatmap.3(t(tumor.mat),dendrogram="r", distfun = function(x) parallelDist::parDist(x,threads =20, 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("c",names(table(hc.umap)),sep=""), pch=15,col=colorRampPalette(RColorBrewer::brewer.pal(n = 8, name = "Dark2")[1:treecut_number]), cex=0.9, bty='n')
dev.off()
- 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 ·