mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-11-24 06:19:54 +00:00
Compare commits
No commits in common. "f38f0edb00a1e6ef04b105ff7dd0e16379741939" and "2ff4181dd8a4f5fc173d2b694194cac9fa690d21" have entirely different histories.
f38f0edb00
...
2ff4181dd8
7 changed files with 4 additions and 34 deletions
|
@ -7,12 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.2.0] - 2023-01-10
|
||||
|
||||
### Added
|
||||
|
||||
- Tutorial-type documentation ([#28](https://github.com/BioJulia/SequenceVariation.jl/pull/28))
|
||||
- `Base.isless` implementation for `Edit` and `Variation` ([#31](https://github.com/BioJulia/SequenceVariation.jl/pull/31))
|
||||
|
||||
### Changed
|
||||
|
||||
|
@ -63,8 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- `Variant` constructor to automatically detect mutations from a `BioAlignments.PairwiseAlignment`
|
||||
- Methods to get reference and alternate bases from a `Variation`
|
||||
|
||||
[unreleased]: https://github.com/BioJulia/SequenceVariation.jl/compare/v0.2.0...HEAD
|
||||
[0.2.0]: https://github.com/BioJulia/SequenceVariation.jl/compare/v0.1.4...v0.2.0
|
||||
[unreleased]: https://github.com/BioJulia/SequenceVariation.jl/compare/v0.1.4...HEAD
|
||||
[0.1.4]: https://github.com/BioJulia/SequenceVariation.jl/compare/v0.1.3...v0.1.4
|
||||
[0.1.3]: https://github.com/BioJulia/SequenceVariation.jl/compare/v0.1.2...v0.1.3
|
||||
[0.1.2]: https://github.com/BioJulia/SequenceVariation.jl/compare/v0.1.1...v0.1.2
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name = "SequenceVariation"
|
||||
uuid = "eef6e190-9969-4f06-a38f-35a110a8fdc8"
|
||||
authors = ["Jakob Nybo Nissen <jakobnybonissen@gmail.com>", "Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>"]
|
||||
version = "0.2.0"
|
||||
version = "0.1.4"
|
||||
|
||||
[deps]
|
||||
BioAlignments = "00701ae9-d1dc-5365-b64a-a3a3ebf5695e"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
[![MIT license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/BioJulia/SequenceVariation.jl/blob/master/LICENSE)
|
||||
[![Stable documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://biojulia.github.io/SequenceVariation.jl/stable)
|
||||
[![Latest documentation](https://img.shields.io/badge/docs-dev-blue.svg)](https://biojulia.github.io/SequenceVariation.jl/dev/)
|
||||
[![DOI](https://zenodo.org/badge/343847382.svg)](https://zenodo.org/badge/latestdoi/343847382)
|
||||
|
||||
> This project follows the [semver](https://semver.org) _pro forma_ and uses the [OneFlow branching model](https://www.endoflineblog.com/oneflow-a-git-branching-model-and-workflow).
|
||||
|
||||
|
@ -24,7 +23,7 @@ add SequenceVariation
|
|||
|
||||
## Testing
|
||||
|
||||
SequenceVariation is tested against Julia `1.6` (LTS), `1.X` (release) and nightly on Linux.
|
||||
SequenceVariation is tested against Julia `1.X` on Linux, OS X, and Windows.
|
||||
|
||||
**Latest build status:**
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ add SequenceVariation
|
|||
|
||||
## Testing
|
||||
|
||||
SequenceVariation is tested against Julia `1.6` (LTS), `1.X` (release) and nightly on Linux.
|
||||
SequenceVariation is tested against Julia `1.X` on Linux, OS X, and Windows.
|
||||
|
||||
**Latest build status:**
|
||||
|
||||
|
|
|
@ -17,13 +17,6 @@ end
|
|||
Base.length(e::Edit) = length(_mutation(e))
|
||||
Base.:(==)(e1::Edit, e2::Edit) = e1.pos == e2.pos && e1.x == e2.x
|
||||
Base.hash(x::Edit, h::UInt) = hash(Edit, hash((x.x, x.pos), h))
|
||||
function Base.isless(x::Edit, y::Edit)
|
||||
if leftposition(x) == leftposition(y)
|
||||
return length(x) < length(y)
|
||||
end
|
||||
|
||||
return leftposition(x) < leftposition(y)
|
||||
end
|
||||
|
||||
function Base.parse(::Type{T}, s::AbstractString) where {T<:Edit{Se,Sy}} where {Se,Sy}
|
||||
return parse(T, String(s))
|
||||
|
|
|
@ -75,11 +75,6 @@ BioGenerics.leftposition(v::Variation) = leftposition(_edit(v))
|
|||
BioGenerics.rightposition(v::Variation) = rightposition(_edit(v))
|
||||
Base.:(==)(x::Variation, y::Variation) = x.ref == y.ref && x.edit == y.edit
|
||||
Base.hash(x::Variation, h::UInt) = hash(Variation, hash((x.ref, x.edit), h))
|
||||
function Base.isless(x::Variation, y::Variation)
|
||||
reference(x) == reference(y) ||
|
||||
error("Variations cannot be compared if their reference sequences aren't equal")
|
||||
return leftposition(x) < leftposition(y)
|
||||
end
|
||||
|
||||
"""
|
||||
_is_valid(v::Variation)
|
||||
|
|
|
@ -36,15 +36,6 @@ seq1 = ungap!(dna"--ATGCGTGTTAGCAAC--TTATCGCG")
|
|||
seq2 = ungap!(dna"TGATGCGTGT-AGCAACACTTATAGCG")
|
||||
var = Haplotype(align(seq1, seq2))
|
||||
|
||||
@testset "EditSorting" begin
|
||||
S = typeof(seq1)
|
||||
T = eltype(seq1)
|
||||
@test SequenceVariation.Edit{S,T}(Deletion(1), 1) <
|
||||
SequenceVariation.Edit{S,T}(Deletion(1), 2)
|
||||
@test SequenceVariation.Edit{S,T}(Deletion(1), 1) <
|
||||
SequenceVariation.Edit{S,T}(Deletion(2), 1)
|
||||
end
|
||||
|
||||
@testset "HaplotypeRoundtrip" begin
|
||||
for v in variations(var)
|
||||
@test v in var
|
||||
|
@ -56,10 +47,6 @@ end
|
|||
@test reconstruct(var) == seq1
|
||||
end
|
||||
|
||||
@testset "VariationSorting" begin
|
||||
@test Variation(seq2, "A3T") < Variation(seq2, "T4A")
|
||||
end
|
||||
|
||||
@testset "VariationPosition" begin
|
||||
refseq = dna"ACAACTTTATCT"
|
||||
mutseq = dna"ACATCTTTATCT"
|
||||
|
|
Loading…
Reference in a new issue