Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
CiaranOMara committed Jan 27, 2024
2 parents 5079f1b + beefc45 commit c9f2e64
Show file tree
Hide file tree
Showing 17 changed files with 198 additions and 130 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ jobs:
Documenter:
permissions:
contents: write
name: Documentation
statuses: write
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: actions/checkout@v4
- uses: julia-actions/julia-buildpkg@v1 # if package requires Pkg.build()
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
11 changes: 11 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@ on:
lookback:
default: 3
permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read

jobs:
TagBot:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/UnitTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,19 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Julia
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
- name: Run Tests
uses: julia-actions/julia-runtest@v1
with:
annotate: true
- name: Create CodeCov
uses: julia-actions/julia-processcoverage@v1
- name: Upload CodeCov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2
with:
file: ./lcov.info
flags: unittests
Expand Down
49 changes: 39 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,73 @@
# Changelog

All notable changes to HapLink.jl will be documented in this file.
All notable changes to XAM.jl will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]


## [0.4.0]

### Added
- Added BAM.Reader index support for BAI object ([#56](https://github.com/BioJulia/XAM.jl/pull/56/files))
- Added doi badge
- Added BAM.Reader index support for BAI object ([#56](https://github.com/BioJulia/XAM.jl/pull/56)).
- Added doi badge.
- Added test to ensure EOF_BLOCK gets written.
- Added `isreversestrand`.
- Added `isfirstsegment`.
- Added `islastsegment`.

### Changed

- Subtype from XAMReader and XAMWriter from common abstract types.
- Subtype from XAMRecord.
- Unified flag queries.
- Improved Slack link.
- Updated to use [Automa](https://github.com/BioJulia/Automa.jl) v1 ([#65](https://github.com/BioJulia/XAM.jl/pull/65)).
- Pointed the Unit Tests badge at the develop branch.
- Pluralised flag.
- Renamed `ismateunmapped` to `isnextunmapped`.
- Renamed `isreverse` to `isreversecomplemented`.
- Renamed `isforward` to `isforwardstrand`.
- `ispositivestrand` aliases `isforwardstrand`.
- `isnegativestrand` aliases `isreversestrand`.
- Renamed `ismatereverse` to `isnextreversecomplemented`.
- `isread1` aliases `isfirstsegment`.
- `isread2` aliases `islastsegment`.

### Fixed
- Updated hts-files.md ([#62](https://github.com/BioJulia/XAM.jl/pull/62)).
- Corrected the behaviour of `isprimaryalignment` with `isprimary`.

### Removed
- Moved the functionality of `isprimary` into `isprimaryalignment`.


## [0.3.1]

### Changed

- Upgraded to BioAlignments v3 ([#55](https://github.com/BioJulia/XAM.jl/pull/55))
- Upgraded to BioAlignments v3 ([#55](https://github.com/BioJulia/XAM.jl/pull/55)).


## [0.3.0] - 2022-10-10

## Added

- Crosschecks for SAM and BAM ([#29](https://github.com/BioJulia/XAM.jl/pull/29))
- Improved documentation for flags ([#43](https://github.com/BioJulia/XAM.jl/pull/43))
- Crosschecks for SAM and BAM ([#29](https://github.com/BioJulia/XAM.jl/pull/29)).
- Improved documentation for flags ([#43](https://github.com/BioJulia/XAM.jl/pull/43)).

### Changed

- `BAM.quality` performance improved ([#21](https://github.com/BioJulia/XAM.jl/issues/21))
- Updated BioAlignments to v2.2 and BioSequences to v3 ([#48](https://github.com/BioJulia/XAM.jl/pull/48))
- `BAM.quality` performance improved ([#21](https://github.com/BioJulia/XAM.jl/issues/21)).
- Updated BioAlignments to v2.2 and BioSequences to v3 ([#48](https://github.com/BioJulia/XAM.jl/pull/48)).

### Fixed

- `BAM.Record` layout now matches the BAM specs ([#26](https://github.com/BioJulia/XAM.jl/pull/26))
- `BAM.Record` layout now matches the BAM specs ([#26](https://github.com/BioJulia/XAM.jl/pull/26)).

[Unreleased]: https://github.com/BioJulia/XAM.jl/compare/v0.3.1...HEAD
[Unreleased]: https://github.com/BioJulia/XAM.jl/compare/v0.4.0...HEAD
[0.4.0]: https://github.com/BioJulia/XAM.jl/compare/v0.3.1...0.4.0
[0.3.1]: https://github.com/BioJulia/XAM.jl/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/BioJulia/XAM.jl/compare/v0.2.8...v0.3.0
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "XAM"
uuid = "d759349c-bcba-11e9-07c2-5b90f8f05f7c"
authors = ["Kenta Sato <[email protected]>", "Ben J. Ward <[email protected]>", "Ciarán O'Mara <[email protected]>"]
version = "0.3.1"
version = "0.4.0"

[deps]
Automa = "67c07d97-cdcb-5c2c-af73-a7f9c32a568b"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ XAM is tested against Julia `1.X` on Linux, OS X, and Windows.

**Latest build status:**

[![Unit tests](https://github.com/BioJulia/XAM.jl/workflows/Unit%20tests/badge.svg?branch=master)](https://github.com/BioJulia/XAM.jl/actions?query=workflow%3A%22Unit+tests%22+branch%3Amaster)
[![Unit Tests](https://github.com/BioJulia/XAM.jl/actions/workflows/UnitTests.yml/badge.svg?branch=develop)](https://github.com/BioJulia/XAM.jl/actions/workflows/UnitTests.yml)
[![Documentation](https://github.com/BioJulia/XAM.jl/workflows/Documentation/badge.svg?branch=master)](https://github.com/BioJulia/XAM.jl/actions?query=workflow%3ADocumentation+branch%3Amaster)
[![codecov](https://codecov.io/gh/BioJulia/XAM.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/BioJulia/XAM.jl)

Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ XAM is tested against Julia `1.X` on Linux, OS X, and Windows.

**Latest build status:**

[![Unit tests](https://github.com/BioJulia/XAM.jl/workflows/Unit%20tests/badge.svg?branch=master)](https://github.com/BioJulia/XAM.jl/actions?query=workflow%3A%22Unit+tests%22+branch%3Amaster)
[![Unit Tests](https://github.com/BioJulia/XAM.jl/actions/workflows/UnitTests.yml/badge.svg?branch=develop)](https://github.com/BioJulia/XAM.jl/actions/workflows/UnitTests.yml)
[![Documentation](https://github.com/BioJulia/XAM.jl/workflows/Documentation/badge.svg?branch=master)](https://github.com/BioJulia/XAM.jl/actions?query=workflow%3ADocumentation+branch%3Amaster)
[![codecov](https://codecov.io/gh/BioJulia/XAM.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/BioJulia/XAM.jl)

Expand Down
8 changes: 4 additions & 4 deletions docs/src/man/hts-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ In the above we can see there were 7 sequences in the reference: 5 chromosomes,
The `XAM` package supports the following accessors for `SAM.Record` types.

```@docs
XAM.SAM.flag
XAM.SAM.flags
XAM.SAM.ismapped
XAM.SAM.isprimary
XAM.SAM.isprimaryalignment
XAM.SAM.refname
XAM.SAM.position
XAM.SAM.rightposition
Expand All @@ -135,9 +135,9 @@ XAM.SAM.auxdata
The `XAM` package supports the following accessors for `BAM.Record` types.

```@docs
XAM.BAM.flag
XAM.BAM.flags
XAM.BAM.ismapped
XAM.BAM.isprimary
XAM.BAM.isprimaryalignment
XAM.BAM.refid
XAM.BAM.refname
XAM.BAM.reflen
Expand Down
4 changes: 2 additions & 2 deletions src/bam/bam.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ module BAM
using BioGenerics
using GenomicFeatures
using XAM.SAM
import ..XAM: flag, XAMRecord, XAMReader, XAMWriter,
ismapped, isprimary, ispositivestrand, isnextmapped #TODO: Deprecate import of flag queries. These were imported to preseve existing API.
import ..XAM: flags, XAMRecord, XAMReader, XAMWriter,
ismapped, isprimaryalignment, ispositivestrand, isnextmapped #TODO: Deprecate import of flag queries. These were imported to preseve existing API.

import BGZFStreams
import BioAlignments
Expand Down
14 changes: 7 additions & 7 deletions src/bam/record.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mutable struct Record <: XAMRecord
mapq::UInt8
bin::UInt16
n_cigar_op::UInt16
flag::UInt16
flags::UInt16
l_seq::Int32
next_refid::Int32
next_pos::Int32
Expand Down Expand Up @@ -56,7 +56,7 @@ function Base.:(==)(a::Record, b::Record)
a.mapq == b.mapq &&
a.bin == b.bin &&
a.n_cigar_op == b.n_cigar_op &&
a.flag == b.flag &&
a.flags == b.flags &&
a.l_seq == b.l_seq &&
a.next_refid == b.next_refid &&
a.next_pos == b.next_pos &&
Expand All @@ -83,7 +83,7 @@ function Base.empty!(record::Record)
record.l_read_name = 0
record.mapq = 0
record.bin = 0
record.flag = 0
record.flags = 0
record.n_cigar_op = 0
record.l_seq = 0
record.next_refid = 0
Expand All @@ -100,7 +100,7 @@ function Base.show(io::IO, record::Record)
if isfilled(record)
println(io)
println(io, " template name: ", tempname(record))
println(io, " flag: ", flag(record))
println(io, " flags: ", flags(record))
println(io, " reference ID: ", refid(record))
println(io, " position: ", position(record))
println(io, " mapping quality: ", mappingquality(record))
Expand Down Expand Up @@ -128,12 +128,12 @@ end
# Accessor Fuctions
# -----------------

function flag(record::Record)::UInt16
function flags(record::Record)::UInt16
checkfilled(record)
return record.flag
return record.flags
end

function hasflag(record::Record)
function hasflags(record::Record)
return isfilled(record)
end

Expand Down
Loading

0 comments on commit c9f2e64

Please sign in to comment.