-n / -N options: Only consider Ns between the sliding window cut sites#39
Closed
tsibley wants to merge 7 commits intonajoshi:masterfrom
Closed
-n / -N options: Only consider Ns between the sliding window cut sites#39tsibley wants to merge 7 commits intonajoshi:masterfrom
tsibley wants to merge 7 commits intonajoshi:masterfrom
Conversation
Many options which required an argument were declared as taking an optional argument. The option handling loop, however, did not expect optional arguments. For example, passing "--qual-threshold 30" rather than "--qual-threshold=30" or "-q 30" led to a segfault when atoi() was passed NULL (optarg). There were other affected options as well. This commit correctly declares the required/optional/none status of option arguments and matches that short-form option spec. Presumably this was confusion between the entire option being optional and the option's argument being optional. The required option checking is done outside of getopt.
This will help keep them in sync when updating options.
The usage docs now indicate option arguments and are easier to read. If the usage was specifically requested with --help, then it is printed to stdout instead of stderr. This is useful for the common idiom of asking for help and piping to a pager like less or more (without redirecting stderr).
A fixed window size provides a stricter control on average base qualities for datasets with a wide range of read lengths.
This is a stricter version of --truncate-n which may use sequence fragments up until the first N provided they pass the length filter.
Otherwise Ns that might otherwise be trimmed off will cause unnecessary read dropping. For example using --truncate-n, if an N occurs early in the sequence, it's possible for the 3' cut site to be set closer to the 5' end than the 5' cut site, which results in a dropped read due to negative length.
Perl's testing infrastructure is mature, well proven, and easy to extend. I've listed all the dependencies for completeness in test/cpanfile, used by `make install-test-deps`, but only one dep (Capture::Tiny) is not distributed with core Perl.
Author
|
Closing this PR in favor of #41, which is updated to be based upon your new work and mine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Otherwise Ns that might otherwise be trimmed off will cause unnecessary
read dropping. For example using
--truncate-n, if an N occurs early inthe sequence, it's possible for the 3' cut site to be set closer to the
5' end than the 5' cut site, which results in a dropped read due to
negative length.
Note: this depends on my previous PRs #34, #35, and #36 and so contains those commits as well. Only the last two commits on the branch are the ones specific to this PR.