blaxterlab / blobology

Tools for making blobplots or Taxon-Annotated-GC-Coverage plots (TAGC plots) to visualise the contents of genome assembly data sets as a QC step (NO LONGER MANTAINED)
MIT License
46 stars 17 forks source link

Script crashes when there are >14 taxa above threshold #2

Closed hobrien closed 10 years ago

hobrien commented 10 years ago

This appears to be due to the limited number of colour selections. I was able to fix this by adding this to the clean.blobs function:

if (length(levels(m[,taxlevel])) > 14) {
  levels(d[,taxlevel])[which(table(d[,taxlevel])<=sort(as.numeric(table(d[,taxlevel])), decreasing=T)[13])]<-"other"
}
sujaikumar commented 10 years ago

Ah yes, good point. Thanks for pointing this out! I'm incorporating it now