Changelog#
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Unreleased#
v0.10.1 - 2026-03-25#
Added#
lightmotif#
Lossy constructor for
EncodedSequencereplacing unknown characters withAlphabet::default_symbol.block_sizeoption to change the number of rows of the block used in aScanner.
Fixed#
lightmotif#
ScoringMatrix::to_discretefailing conversion on cells with-infscores (due to zero pseudocounts).Panic in
Scanner::nextcaused by empty scores buffer.Non-saturating add being used in
score_u8_neoncausingScannerto ignore some hits on Arm platforms.
Changed#
lightmotif#
Update
randdependency tov0.10.0.
lightmotif-py#
Update
pyo3dependency tov0.28.0..
v0.10.0 - 2025-05-19#
Added#
lightmotif#
Experimental Gibbs sampler implementation for motif detection in
zoopsandoopsmodes.IndexMut<MatrixCoordinates>trait implementation forDenseMatrixtype.AsRef<Vec<T>>forScores<T>.information_contentmethods toWeightMatrixandScoringMatrix.consensusmethod toCountMatrix.FrequencyMatrix::into_scoringto take ownership of a frequency matrix and converting it inplace into aScoringMatrix.Implement
size_hintforStripedScoresiterator.Cumulative distribution approximation for
ScoringMatrix.Add
ScoringMatrix::to_score_distributionmethod to compute a score distribution suitable for P-value estimation.Trait to compute correlations for
lightmotif::pwmmatrices.new_uncheckedconstructors tolightmotif::pwmtypes (undocumented).Efficient look-up table implementation for Aarch64 NEON
f32-scoring.
lightmotif-io#
Reader for MEME format files.
Changed#
lightmotif#
Implement
DenseMatrixiterators without unsafe code.Make
lightmotif::scan::Hitfields read-only.Inline short functions in
lightmotifcore moduels.Make the
ravelmethods ofDenseMatrixunsafe.Allow accessing and configuring the row capacity of a
DenseMatrix.Always pre-allocate additional rows when creating a new
StripedSequenceto avoid reallocation for wrap rows.Use pointers to avoid matrix indexing inside pipeline hot loops.
Skip use of NEON for
Score<Protein>since generic code is faster.
lightmotif-io#
Update
nomdependency to8.0.
lightmotif-py#
Update
pyo3dependency to0.23.Use
maturininstead ofsetuptools-rustto build Python bindings from source.
Fixed#
lightmotif#
Use all columns of the matrix in
CountMatrix::entropy.Fix missing
_mm_sfenceinscore_f32_avx2_permutecode.Avoid multiple
logcalls inFrequencyMatrix::to_scoring.
Removed#
lightmotif#
Const method declaration for matrix traits not
constinlightmotif::pwm.
v0.9.1 - 2024-09-03#
Added#
lightmotif-py#
Arch User Repository package
python-lightmotifto distribute the Python package on ArchLinux.
Fixed#
lightmotif-py#
Fix issues with source distribution missing required files for compilation.
Remove unused test data to reduce size of source distribution.
v0.9.0 - 2024-09-02#
Added#
lightmotif#
DenseMatrix::ravelto get the array of aDenseMatrixas a single continuous slice.
lightmotif-py#
Support for protein alphabets (#5).
proteinproperty toCountMatrix,WeightMatrix,ScoringMatrix,EncodedSequenceandStripedSequence.Scannerclass to use the new DNA scanning algorithm.Buffer protocol implmementation for
ScoringMatrixobjects.lightmotif.loadfunction to load one or moreMotiffrom a file-like object (#6).Motif.nameproperty to store the optional name of aMotif.Several
Motifsubclasses to store motif and metadata loaded from a file.Type annotations for the
lightmotif.libpackage.
Fixed#
lightmotif-io#
Parsing of floating-point numbers in JASPAR parser.
Panic on error unwrapping in
lightmotif-io.
Changed#
lightmotif#
Rewrite
DenseMatrixwith constant platform-specific alignment to reduce amount ofunsafecode.
Removed#
lightmotif-py#
alphabetparameter ofScoringMatrixandEncodedSequence.
v0.8.0 - 2024-06-28#
Added#
lightmotif#
lightmotif::pwm::DiscreteMatrixto store a discretizedScoringMatrix.MatrixElementmarker trait forDefault + Copytypes that can be used as aDenseMatrixelement.lightmotif::scores::Scoreswrapper ofVec<T>with shortcutmax,thresholdandargmaxmethods.AVX2 and NEON implementations of
Score<u8, Dna>pipeline operation.
Fixed#
lightmotif#
Remove requirement for
T: DebuginCloneimplementation ofDenseMatrix<T>.SSE2 and AVX2 implementations of
Argmaxnot returning the last index in case of ties.
lightmotif-tfmpvalue#
Cache internal buffer for Q-values to avoid reallocation between iterations.
Changed#
lightmotif#
Cache the
Pipelineused inlightmotif::scan::Scanner.Make
lightmotif::scores::StripedScoresgeneric over the score type.Make
MaximumandThresholdgeneric over the score type.Use a discrete matrix in
Scannerto quickly eliminate blocks without candidate position above given threshold.Compile crate without the
randandrand-distrfeatures by default.
lightmotif-py#
Update
pyo3dependency tov0.22.0.
v0.7.3 - 2024-06-17#
Added#
lightmotif-io#
lightmotif_io::jasparto read matrices in raw JASPAR format.Implementation of
CloneandErrorfor thelightmotif_io::error::Errortype.
Changed#
lightmotif#
Use logarithmic subtraction in
FrequencyMatrix::to_scoring.Use
_mm256_permutevara8x32_psinstead of_mm256_permutevar_psin AVX2 implementation to avoid special handling of unknown matric characterN.
Fixed#
lightmotif#
Striping of empty sequences panicking on AVX2 implementation.
Scoring of empty range of rows panicking.
Invalid alignment of data in AVX2 code.
Cloneimplementation ofDenseMatrixnot preserving memory alignment.
v0.7.2 - 2024-06-14#
Added#
lightmotif-py#
Add
__len__implementation for all matrix clases.Allow changing the logarithm base in
WeightMatrix.log_oddsmethod.Implement
__getitem__for row access for all matrix classes.
v0.7.1 - 2024-06-14#
Fixed#
lightmotif#
Resizing of
StripedScoresoutput in NEON implementation ofScore.
v0.7.0 - 2024-06-14#
Added#
lightmotif#
Implement indexing of
StripedSequenceby sequence index.matrixaccessor to all matrix types inlightmotif::pwmandlightmotif::seq.entropyandinformation_contentmethods toCountMatrix.SymbolCounttrait for counting the number of occurrences of a symbol in an iterable.Several
Backgroundconstructors for counting occurences in one or more sequences.FromIterator<A::Symbol>constructor forEncodedSequence<A>.MultipleOf<N>trait to simplify typenums in platform code signatures.Sampling of random sequences using the
randdependency under a feature flag.ScoringMatrix.score_intomethod to re-use aStripedScoresbuffer.ScoringMatrix.score_positionmethod to score a single sequence position.Indexing by
MatrixCoordinatesinDenseMatrix.Support for chanding logarithm base when building a
ScoringMatrixfrom aWeightMatrix.Scanning algorithm for finding hits in a sequence with an iterator without allocating
StripedScoresfor each sequence position.
lightmotif-py#
Support for optional TFMPvalue interface in Python bindings under GPLv3+ code.
Constructor for
ScoringMatrixclass.ScoringMatrix.reverse_complementto compute the reverse-complement of a scoring matrix.
Changed#
lightmotif#
Make
EncodedSequence.stripeuse a dispatchingPipelineinternally.Require power-of-two alignment in
DenseMatriximplementations.Update
generic-arraydependency tov1.0.Change order of parameters in
ScoringMatrix.score.Reorganize scoring trait and implement row-slice scoring for AVX2 and SSE2.
Rewrite
Pipeline::thresholdto return matrix coordinates instead of a sequence index.Rewrite
Pipeline::argmaxto return matrix coordinates instead of a sequence index.
lightmotif-py#
Streamline the use of pipelined functions in Python bindings.
Fixed#
lightmotif#
Handling of unknown residues in
permuteimplementation ofScoreon AVX2.PartialEqforDenseMatrixto ignore alignment padding in each row.
Removed#
lightmotif#
Platform-specific code for thresholding a
StripedScoresmatrix.Direct attribute access in
StripedSequence.
lightmotif-transfac#
Remove crate from repository, superseded by the
lightmotif-iocrate.
v0.6.0 - 2023-12-13#
Added#
lightmotif#
Validating constructor
::pwm::FrequencyMatrix::newtesting for frequencies on each ranks.Getter to the raw data matrix of a
::pwm::FrequencyMatrix.
lightmotif-io#
New crate with JASPAR, TRANSFAC and UNIPROBE format parsers.
Changed#
lightmotif#
Make
max_scoreandmin_scorecolumns of::pwm::ScoringMatrixignore the wildcard symbol column.
lightmotif-tfmpvalue#
Invert decay in
TfmPvalueto reduce rounding errors when computing granularity.Use a fast integer hashing algorithm for
i64keys in maps used for recording Q-values.Compute the optimal column permutation to accelerate the computation of score distributions.
Removed#
lightmotif-transfac#
Deprecate crate in favour of lightmotif-io.
v0.5.1 - 2023-08-31#
Fixed#
lightmotif#
Compilation for Arm NEON platforms.
v0.5.0 - 2023-08-31#
Added#
lightmotif#
Arm NEON implementation of
ThresholdandEncode.Alphabet::as_strmethod to get the symbols of an alphabet as a string.DenseMatrix::fillmethod to fill a dense matrix with a constant value.Convenience getters and conversion traits to
StripedSequence.Stripetrait to implement striping of an encoded sequence with SIMD.Dynamic dispatched pipeline selecting the best implementation as runtime.
PartialEqimplementation forEncodedSequence.
lightmotif-py#
Buffer and copy protocols for
StripedSequenceandEncodedSequence.Indexing support to
EncodedSequence.
lightmotif-tfmpvalue#
Convenience methods to access the wrapped
ScoringMatrixreference inTfmPvalue.
Changed#
lightmotif#
Encode::encodenow returns anEncodedSequenceinstead of a rawVec.Performance improvements for
Encodefor AVX2 and NEON by removing non-const function calls in loop.Performance improvements for
Thresholdby skipping the index buffer initialization.Avoid buffer initialization when allocating a new buffer in
EncodedSequence::encode.Require
Symbolimplementors to implementEq.
lightmotif-py#
Use the dynamic dispatch pipeline to run vectorized operations.
lightmotif-tfmpvalue#
Make
TfmPvaluegeneric over the type of reference to the wrappedScoringMatrix.
Fixed#
lightmotif#
Debugimplementation ofDenseMatrixcrashing when attempting to render the padding bytes.
v0.4.0 - 2023-08-10#
Changed#
lightmotif#
Improve
DenseMatrix::resizeperformance when downsizing.Explicitly panic when sequence is too long to be processed with
u32indices in AVX2 and SSE2.Reorganize
DenseMatrixcolumn alignment and index storage.Improve
Scoreperformance by using pointers instead of slices in SIMD loops.Rename
DenseMatrix::columns_effectivetoDenseMatrix::stride.Use streaming intrinsics to store data in AVX2 and SSE2 implementations.
Rename
BestPositiontrait toMaximum.
lightmotif-py#
Avoid error on missing symbols in
CountMatrix.__init__
Added#
lightmotif#
Thresholdtrait to find all position above a certain score in aStripedScoresmatrix.Encodetrait to encode an ASCII sequence into aVec<Symbol>.AVX2 implementation of
Scoreusinggatherinstead ofpermutefor protein alphabets.From<Vec<_>>andDefaulttrait implementations toEncodedSequence.Alphabetmethods to operate on ASCII strings.StripedScores.is_emptymethod to check if aStripedScorescontains any score.
lightmotif-py#
StripedScores.thresholdmethod wrapping theThresholdpipeline operation.StripedScores.maxandStripedScores.argmaxmethods to get the best score and best position.
Fixed#
lightmotif#
Scorecausing an overflow when given a sequence shorter than the PSSM.Maximumtrait returns the smallest position on equal maxima.
v0.3.0 - 2023-06-25#
Changed#
Rewrite the SSE2 maximum search implementation using a generic number of columns.
Refactor
lightmotif::pwmto avoid infinite odds-ratio for columns with zero background frequencies.
Added#
lightmotif-tfmpvaluecrate implementing the TFMPvalue for computing p-values for aScoringMatrix.DenseMatrix::from_rowsmethod to create a dense matrix from an iterable of rows.PartialEqimplementation for matrices inlightmotif.Methods to compute the minimum and maximum scores of a
ScoringMatrix.
v0.2.0 - 2023-05-15#
Changed#
Crate structure to avoid cluttering the main
lightmotifmodule namespace.Swizzling used in the SSSE3 implementation to make it require SSE2 only.
TRANSFAC parser to support parsing sections in arbitrary order and accept additional metadata.
Use
memchrto parse lines faster in TRANSFAC parser.Use
typenumandgeneric-arrayto handle constant matrix dimensions.Make
Scoretrait generic over the number of columns in the striped sequence.
Added#
Accessors for some of the attributes of
lightmotif_transfac::Matrix.Pipeline method to extract the best position from a
StripedScorematrix.Child trait for alphabet complementation.
Methods for reverse-complementing all matrices from
lightmotif::pwm.Alphabet::symbolsmethod to get all the symbols of an alphabet.StripedSequence::encodeconstructor to encode and stripe a text sequence without allocating an extraEncodedSequence.Iterator methods and helper struct for
StripedScores.Proteinalphabet tolightmotif::abc.DenseMatrix::uninitializedconstructor to allocate a dense matrix without filling its contents.lightmotif::nummodule withtypenumre-exports and additionalStrictlyPositivemarker trait.Arm NEON implementation of the position scoring algorithm.
Displayimplementation forEncodedSequenceinstead of an arbitraryToStringimplementation.
v0.1.1 - 2023-05-04#
Added#
Helper crate to detect CPU features support at runtime.
Fixed#
AVX2 code being imported on x86-64 platforms without checking for OS support.
AVX2-enabled extension always being compiled even on platforms with no AVX2 support.
Removed#
builtandpyo3-builtbuild dependencies (causing issues with workspaces).
v0.1.0 - 2023-05-04#
Initial release.