-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71d0178
commit 4ed6d4d
Showing
12 changed files
with
635 additions
and
346 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Thank you for making an issue and making our software better. | ||
If you are submitting a bug report, it will help us if you include the following information: | ||
|
||
- Your version of Julia and all packages installed in your current Julia environment | ||
- A small example that demonstrates the bug. If possible, please make the code copy-pastable into a fresh REPL. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Thank you for your contribution! | ||
If you have any questions about your PR, or need help completing it, you can ping the maintainers of this repository, who will be happy to help if they can find time. | ||
|
||
You can optionally use the following checklist when you work on your PR: | ||
- [ ] I have updated any relevant documentation and docstrings. | ||
- [ ] I have added unit tests, and the CodeCov bot shows tests cover my new code. | ||
- [ ] I have mentioned my changes in the CHANGELOG.md file. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
# basic | ||
target: auto | ||
threshold: 10% | ||
base: auto | ||
flags: | ||
- unittest | ||
paths: | ||
- "src" | ||
# advanced settings | ||
if_ci_failed: ignore | ||
informational: true | ||
patch: | ||
default: | ||
# basic | ||
target: auto | ||
threshold: 10% | ||
base: auto | ||
flags: | ||
- unittest | ||
paths: | ||
- "src" | ||
# advanced settings | ||
if_ci_failed: ignore | ||
informational: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- master # update to match your development branch (master, main, dev, trunk, ...) | ||
tags: '*' | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
contents: write | ||
pull-requests: read | ||
statuses: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@v2 | ||
with: | ||
version: 'nightly' | ||
- uses: julia-actions/cache@v1 | ||
- name: Install dependencies | ||
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' | ||
- name: Build and deploy | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token | ||
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key | ||
run: julia --project=docs/ docs/make.jl |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
test: | ||
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
julia-version: | ||
- 'nightly' | ||
os: [ ubuntu-latest, windows-latest ] | ||
arch: [ x64 ] | ||
include: | ||
- julia-version: nightly | ||
julia-arch: x86 | ||
os: ubuntu-latest | ||
experimental: true | ||
# - julia-version: 1 | ||
# os: macOS-latest | ||
# experimental: false | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Julia | ||
uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: ${{ matrix.julia-version }} | ||
- name: Run Tests | ||
uses: julia-actions/julia-runtest@latest | ||
- name: Create CodeCov | ||
uses: julia-actions/julia-processcoverage@v1 | ||
- name: Upload CodeCov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./lcov.info | ||
flags: unittests | ||
name: codecov-umbrella | ||
fail_ci_if_error: false | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,27 @@ uuid = "e5b51f81-6ffd-4e20-bbec-f118e37ea906" | |
version = "0.1.0" | ||
authors = ["Jakob Nybo Nissen <[email protected]>"] | ||
|
||
[weakdeps] | ||
BioAlignments = "00701ae9-d1dc-5365-b64a-a3a3ebf5695e" | ||
|
||
[deps] | ||
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" | ||
MemViews = "a791c907-b98b-4e44-8f4d-e4c2362c6b2f" | ||
MemoryViews = "a791c907-b98b-4e44-8f4d-e4c2362c6b2f" | ||
|
||
[extensions] | ||
BioAlignmentsExt = "BioAlignments" | ||
|
||
[compat] | ||
BenchmarkTools = "1.5.0" | ||
BioAlignments = "3.1.0" | ||
FormatSpecimens = "1.3.0" | ||
MemoryViews = "0.2.1" | ||
julia = "1.11" | ||
Test = "1.11" | ||
|
||
[extras] | ||
BioAlignments = "00701ae9-d1dc-5365-b64a-a3a3ebf5695e" | ||
FormatSpecimens = "3372ea36-2a1a-11e9-3eb7-996970b6ffbd" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
MemoryViews = "a791c907-b98b-4e44-8f4d-e4c2362c6b2f" | ||
|
||
[targets] | ||
test = ["Test", "MemoryViews", "FormatSpecimens", "BioAlignments"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module BioAlignmentsExt | ||
|
||
using BioAlignments: BioAlignments as BA | ||
import CIGARStrings: CIGAR, Anchor, advance, CIGAROp | ||
|
||
function BA.AlignmentAnchor(anchor::Anchor, op::CIGAROp) | ||
BA.AlignmentAnchor(anchor.query, anchor.ref, anchor.aln, reinterpret(BA.Operation, op)) | ||
end | ||
|
||
function BA.Alignment(cigar::CIGAR, refpos::Int) | ||
if refpos < 1 | ||
error("Alignment cannot start before ref position 1") | ||
end | ||
anchor = Anchor(0, refpos - 1, 0) | ||
anchors = Vector{BA.AlignmentAnchor}(undef, length(cigar) + 1) | ||
anchors[1] = (BA.AlignmentAnchor(0, anchor.ref, 0, BA.OP_START)) | ||
for (i, element) in enumerate(cigar) | ||
anchor = advance(anchor, element) | ||
anchors[i+1] = BA.AlignmentAnchor(anchor, element.op) | ||
end | ||
# Note: CIGAR constructor checks everything that Alignment needs. | ||
BA.Alignment(anchors, false) | ||
end | ||
|
||
end # module BioAlignmentsExt |
Oops, something went wrong.