V0.0.7#6
Merged
Merged
Conversation
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.
Added
New
bedsubcommand —chaintools bedconverts chain files to BED format,supporting BED3, BED6, and BED12 output. Chains can be read from standard input,
explicit file arguments (
-c/--chains), or path-list files (-f/--file).Options include
--spanned(emit the full chain span as a single block),--sort-by(coordinate or score ordering),--side(reference or querycoordinates),
--type(BED variant selection),--out-bed(write to file),and
--gzip(compress output). Input/output path conflict detection preventsaccidental overwrites.
Chain construction from absolute blocks —
OwnedChain::from_absolute_blocksbuilds complete owned chains from absolute alignment coordinates, converting
them to UCSC dense chain blocks via
absolute_to_dense_blocks. This enablescallers to accumulate aligned intervals first and derive block gaps later, which
is the foundation for axtChain-compatible workflows.
AbsoluteBlockmodel type — A new coordinate representation for alignmentblocks using absolute reference/query start and end positions, with validation,
interval-length helpers, and overlap detection. The
absolute_to_dense_blocksfunction converts a sorted, non-overlapping list into the UCSC dense block
format (computing gap sizes from neighboring absolute coordinates).
Metadata writer API —
write_metadata_lineandwrite_metadata_linesinthe
io::writermodule allow writing comment and metadata lines to chainoutput streams. These are now unconditionally exported (previously gated behind
the
sequencefeature).Public scoring functions —
score_ungapped_slices,score_absolute_block,and
score_absolute_blocksare now exported from theseq::score::chainscoremodule, enabling UCSC chainScore computation directly from absolute alignment
coordinates and ungapped slices.
SequenceResolverconvenience methods —preload(alias fornew_filtered),sequence(borrow a full sequence slice), andsequence_len(query decoded sequence length) make the resolver easier to use without
allocating copied ranges.
Standalone
revcompmodule — Reverse-complement logic extracted fromantirepeatintoseq::revcomp, withcomplement_base,reverse_complement_in_place, andreverse_complement. Full IUPAC ambiguitycode support and case preservation, with dedicated unit tests.
Changed
write_chain_dense,write_chain_header, andwrite_dense_blocksare nolonger behind the
sequencefeature gate; they are always available.merge,sort, andsplitmodules.--levelshort flag-Lwas removed from the global CLI to avoidconflicts with subcommand flags;
--level(long form) remains.Documentation
bedsubcommand is integrated into the CLI help and dispatch.Notes
spanning BED output correctness, chain-from-absolute-blocks construction,
absolute block validation and gap computation, metadata writer safety,
revcomplement IUPAC handling, sequence resolver preloading, and scoring of
absolute blocks with gap cost. gzip-feature tests pass too.
chaintools bedproduces valid BED12 records onreal chain files, with correct coordinate ordering and block structure.