Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion on argument name "max.downsample" in CoveragePlot and related functions #1791

Open
G3N0M3 opened this issue Sep 29, 2024 · 0 comments

Comments

@G3N0M3
Copy link

G3N0M3 commented Sep 29, 2024

Nothing really major, but I noticed that the argument max.downsample in the function CoveragePlot (and its relatives) might be slightly misleading in terms of its role.

In parts of the code where max.downsample and downsample.rate are compared, the higher value between the two is selected:

window.size = width(x = region)
sampling <- ceiling(x = max(max.downsample, window.size * downsample.rate))
coverages <- slice_sample(.data = all.data, n = sampling)

If max.downsample is higher, the resulting plot shows at least that many data points.
This seems more like a minimum threshold rather than a maximum, which the current name might suggest.

The documentation in visualization.R script also notes:
@param max.downsample Minimum number of positions kept when downsampling.
Although it's explained in the documentation, I believe a name like min.downsample, or something that reflects its role as a minimal threshold would make functions more intuitive.

As an end user, I'm not fully aware of the difficulties involved in making this change,
but I wanted to raise it as a suggestion.

Thanks for the wonderful package! Hope this feedback was helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant