xie186 / ViewBS

ViewBS - a powerful toolkit for visualization of high-throughput bisulfite sequencing data
GNU General Public License v3.0
81 stars 27 forks source link

Robustnesss suggestion for OneRegion.R script #56

Closed acontrerasg closed 3 years ago

acontrerasg commented 3 years ago

Hi there, Thanks for the package, I have been using it extensively. However, I have been experiencing an inconsistent behaviour in the OneRegion.R file at line 20: ggsave(out, p, height=length(levels(tab[,1]))*par("din")[2]/6)

I had to add a line to make sure tab[,1] is always interpreted as factor and not as character so length levels doesnt return 0. like: tab[,1] <- as.factor(tab[,1])

Hope it helps,

Best Adri

xie186 commented 3 years ago

Thank you very much for the suggestion. I'll add it in the next release. Best, Shaojun