databio / GenomicDistributions

Calculate and plot distributions of genomic ranges
http://code.databio.org/GenomicDistributions
Other
25 stars 10 forks source link

in plotQTHist, numbers param doesn't always work #179

Closed nsheff closed 2 years ago

nsheff commented 2 years ago

In function plotQTHist, the numbers parameter is supposed to switch off whether the histogram plots percentages or numbers. But, it doesn't do this.

Example:

> x = rnorm(5000)
> plotQTHist(x)
> plotQTHist(x, numbers=FALSE)

These plots show the same thing. The second would should use frequencies instead of numbers. It's due to this code, where there's a check for a name column which is not present in the data frame:

https://github.com/databio/GenomicDistributions/blob/2d2ee49f1001bcd0e832c503f353ff776861ae82/R/qthist.R#L85-L94

nsheff commented 2 years ago

It is because this is set up to only be an option for when you include multiple at once.

kkupkova commented 2 years ago

So this issue is now resolved? I ran the current version and it works fine

nsheff commented 2 years ago

yes, I fixed this.

kkupkova commented 2 years ago

Thanks!