77 Commits (master)

Author SHA1 Message Date
Thomas A. Christensen II 282050d442 Fix validation code for `Haplotype` 1 year ago
Thomas A. Christensen II 57ebe391bf Fix tests for _is_valid(::Haplotype) 1 year ago
Thomas A. Christensen II 2fa5782719 Add more informative errors to `_is_valid` 1 year ago
Thomas A. Christensen II a61a80d586 Add translate function for Haplotypes 1 year ago
Thomas A. Christensen II e251b292a7 Fix tests for `translate(::Variation)` 1 year ago
Thomas A. Christensen II 0b2879b78c Add `isless` function for `Variation` 1 year ago
Thomas A. Christensen II 860ce56b34 Add `isless` function for `Edit` 1 year ago
Thomas A. Christensen II 2ff4181dd8
Fix deletion equality function
Fixes: da2cbbd528 ("Add equals functionality to Deletion")

Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
1 year ago
Thomas A. Christensen II b80dd8c950 Rename reconstruct! function to reconstruct
The exclamation mark is conventionally used to mark mutating functions, but
reconstruct is no longer mutating, so change the notation.
1 year ago
Thomas A. Christensen II adbf0ce7f1 Refactor `reconstruct!` to use the built-in reference sequence
reconstruct! previously allow changing of _any_ sequence to match a
haplotype, with no check to see if that sequence is compatible with the
reference sequence the haplotype is based on. Change that to only allow
reconstructing sequences from the reference sequence itself, making this a
non-mutating function.
1 year ago
Thomas A. Christensen II 8a71715cd9 Change `v::Haplotype` function arguments to `h::Haplotype`
`v` made sense for a `Variant`, but doesn't for a `Haplotype`, so pretty
things up.
1 year ago
Thomas A. Christensen II 1384783fcc Update documentation wording to reflect new type names 1 year ago
Thomas A. Christensen II 5839de3ce1 Rename `Variant` type to `Haplotype` 1 year ago
Thomas A. Christensen II 44aa41e628 Rename Variant.jl to Haplotype.jl 1 year ago
Thomas A. Christensen II 2a7d61e43d Add docstrings for Variation functions 1 year ago
Thomas A. Christensen II 673481b40f Add docstring for Variation 1 year ago
Thomas A. Christensen II ea25ab87dc Add docstrings for Variant methods 1 year ago
Thomas A. Christensen II f49220782b Add docstring for Variant 1 year ago
Thomas A. Christensen II f1baf27865 Add docstring for `lendiff(::Edit)` 1 year ago
Thomas A. Christensen II 82ba838614 Add docstring for `mutation(::Edit)` 1 year ago
Thomas A. Christensen II 1f2b116518 Mark is_valid(::Variation) as private function 1 year ago
Thomas A. Christensen II 386acba8ab Mark `edits(::Variant)` as private API 1 year ago
Thomas A. Christensen II a573693737 Mark `edit(::Variation)` as private function 1 year ago
Thomas A. Christensen II 2f4f5fb5ae Mark `is_valid(::Variant)` as private function 1 year ago
Thomas A. Christensen II 2719c438f3 Mark `lendiff(::Edit)` as private API 1 year ago
Thomas A. Christensen II e8457e4241 Mark `mutation(::Edit)` as private API 1 year ago
Thomas A. Christensen II cb1c429610 Update getter usage in translate function 1 year ago
Thomas A. Christensen II ef4460bbbf Replace field accession with getter function usage 1 year ago
Thomas A. Christensen II dd405c5f4b Refactor _lendiff to use multiple dispatch 1 year ago
Thomas A. Christensen II cab3029bc6 Refactor Edit length to use dispatch instead of type checking 1 year ago
Thomas A. Christensen II 22d460b15a Remove unused argument names from base getters for edits 1 year ago
Thomas A. Christensen II da2cbbd528 Add equals functionality to Deletion 1 year ago
Thomas A. Christensen II f08d6eb991 Add length method for Substitution 1 year ago
Thomas A. Christensen II 3b2730b5c1 Add export for translate and reconstruct! 1 year ago
Thomas A. Christensen II 25c63906dc Move exports to top of file
Per Blue style, exports should be one per line, and appear immediately
after using statements. Reorganize module file to comply
1 year ago
Thomas A. Christensen II 9f9d0899bd Move Insertion-related code to edits/Insertion.jl 1 year ago
Thomas A. Christensen II b36ab69c72 Move Deletion-related code to edits/Deletion.jl 1 year ago
Thomas A. Christensen II ba9f0e8fb1 Move Substitution-related code to edits/Substitution.jl 1 year ago
Thomas A. Christensen II 8c2dd271f3 Move Variation-related code to Variation.jl 1 year ago
Thomas A. Christensen II 37965ac7eb Move Variant-related code to Variant.jl 1 year ago
Thomas A. Christensen II 3f631ace8f Move Edit-related code to Edit.jl 1 year ago
Thomas A. Christensen II fb5b7dfacf Remove commented-out code 1 year ago
Thomas A. Christensen II 128a5445ad Switch alignment validation to after edit construction 1 year ago
Thomas A. Christensen II f9058c5cb3 Update ranges to allow end position insertions 1 year ago
Thomas A. Christensen II 5be4dce200 Add check for soft clips when construction Variants from alignment 1 year ago
Thomas A. Christensen II d8435be115 Add Variation-level validation for Variants
Testing indicates that some Variants (particularly those with insertions
and/or clips at the send of the query sequence) will validate fine as a
Variant, but will fail validation as a Variation. This problem is
particularly annoying when constructing Variants in the REPL, as the
creation will complete successfully, but the show of the Variant will
error out. To fix this, leverage the existing validation of Variation to
check each Edit within a Variant upon construction.
1 year ago
Thomas A. Christensen II 91c3acc85e Add equality function for Variant 1 year ago
Thomas A. Christensen II 3b33c85d00 Add type parameterization to variations getter
I have encountered some cases where having a non-parameterized vector can
crash a downstream process. I don't yet know how to make a MWE of that, but
adding type parameters fixes my problem, and doesn't break any tests here.
2 years ago
Thomas A. Christensen II f7278bd7d7 Remove unused AminoAcidSeq reference 2 years ago
Thomas A. Christensen II 1bbb85153c Add constructor for Variant based on Variations
A Variant is a collection of Variations, right? Unfortunately there was no
way to convert a collection of Variations into a Variant, so I added one.
2 years ago