Repository navigation
Fix BAM index lookup and --log_level handling (v1.10.1) - #18
Merged
Merged
Conversation
- Only replace the final ".bam" extension when looking for <name>.bai, then fall back to <name>.bam.bai. Previously a BAM path without a ".bam" extension was used as its own index, and ".bam" in directory names was rewritten. A missing index is now reported during argument validation. - Make --log_level case-insensitive and drop CRITICAL (never accepted) from the help text. - Show "fadu" as the program name and fix the --feature_type and --attribute_type help text; regenerate the usage block in the docs. - Add tests for the index lookup, extensionless BAMs, a missing index, and lowercase log levels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
replace(path, ".bam" => ".bai"), which rewrote every.bamin the path. A BAM without a.bamextension (e.g. a Galaxydataset_123.dat) was treated as its own index and failed withinput is not a valid BAI file, and.bamin a directory name was rewritten too. The newfind_bam_index()replaces only the final.bamextension, then tries<name>.bam.bai. A missing index is now reported during argument validation (exit code 1).--log_level: now case-insensitive. CRITICAL, which the help listed but the validator never accepted, is removed from the help.fadu;--feature_type/--attribute_typedescriptions fixed (GFF3 only; column 9 is an attribute); typo fix. Usage block in README and docs regenerated.VERSION_NUMBER, README/docs, CHANGELOG).Found while preparing the Galaxy wrapper (bgruening/galaxytools#2074). The wrapper itself isn't affected, since it symlinks inputs to
input.bam/input.bam.bai.Testing
Pkg.test(): 24/24 pass, including new testsets for the index lookup, extensionless BAMs, a missing index, and lowercase log levels.test/run_test.sh: output still matchesexpected.counts.txt.After merge
Tag
v1.10.1on master; bioconda's autobump should then open the recipe update.🤖 Generated with Claude Code