Skip to content

Commit beefc45

Browse files
authored
Merge branch 'release/v0.4.0'
2 parents 22f939f + 456d820 commit beefc45

File tree

23 files changed

+478
-324
lines changed

23 files changed

+478
-324
lines changed

.github/workflows/Documentation.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ jobs:
1212
Documenter:
1313
permissions:
1414
contents: write
15-
name: Documentation
15+
statuses: write
16+
name: Documentation
1617
runs-on: ubuntu-latest
1718
steps:
18-
- uses: actions/checkout@v2
19-
- uses: julia-actions/julia-buildpkg@v1
19+
- uses: actions/checkout@v4
20+
- uses: julia-actions/julia-buildpkg@v1 # if package requires Pkg.build()
2021
- uses: julia-actions/julia-docdeploy@v1
2122
env:
22-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
24+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key

.github/workflows/TagBot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,18 @@ on:
99
lookback:
1010
default: 3
1111
permissions:
12+
actions: read
13+
checks: read
1214
contents: write
15+
deployments: read
16+
issues: read
17+
discussions: read
18+
packages: read
19+
pages: read
20+
pull-requests: read
21+
repository-projects: read
22+
security-events: read
23+
statuses: read
1324

1425
jobs:
1526
TagBot:

.github/workflows/UnitTests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,19 @@ jobs:
2929

3030
steps:
3131
- name: Checkout Repository
32-
uses: actions/checkout@v2
32+
uses: actions/checkout@v4
3333
- name: Setup Julia
3434
uses: julia-actions/setup-julia@v1
3535
with:
3636
version: ${{ matrix.julia-version }}
3737
- name: Run Tests
3838
uses: julia-actions/julia-runtest@v1
39+
with:
40+
annotate: true
3941
- name: Create CodeCov
4042
uses: julia-actions/julia-processcoverage@v1
4143
- name: Upload CodeCov
42-
uses: codecov/codecov-action@v1
44+
uses: codecov/codecov-action@v2
4345
with:
4446
file: ./lcov.info
4547
flags: unittests

CHANGELOG.md

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,73 @@
11
# Changelog
22

3-
All notable changes to HapLink.jl will be documented in this file.
3+
All notable changes to XAM.jl will be documented in this file.
44

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

88
## [Unreleased]
99

10+
11+
## [0.4.0]
12+
13+
### Added
14+
- Added BAM.Reader index support for BAI object ([#56](https://github.com/BioJulia/XAM.jl/pull/56)).
15+
- Added doi badge.
16+
- Added test to ensure EOF_BLOCK gets written.
17+
- Added `isreversestrand`.
18+
- Added `isfirstsegment`.
19+
- Added `islastsegment`.
20+
21+
### Changed
22+
23+
- Subtype from XAMReader and XAMWriter from common abstract types.
24+
- Subtype from XAMRecord.
25+
- Unified flag queries.
26+
- Improved Slack link.
27+
- Updated to use [Automa](https://github.com/BioJulia/Automa.jl) v1 ([#65](https://github.com/BioJulia/XAM.jl/pull/65)).
28+
- Pointed the Unit Tests badge at the develop branch.
29+
- Pluralised flag.
30+
- Renamed `ismateunmapped` to `isnextunmapped`.
31+
- Renamed `isreverse` to `isreversecomplemented`.
32+
- Renamed `isforward` to `isforwardstrand`.
33+
- `ispositivestrand` aliases `isforwardstrand`.
34+
- `isnegativestrand` aliases `isreversestrand`.
35+
- Renamed `ismatereverse` to `isnextreversecomplemented`.
36+
- `isread1` aliases `isfirstsegment`.
37+
- `isread2` aliases `islastsegment`.
38+
39+
### Fixed
40+
- Updated hts-files.md ([#62](https://github.com/BioJulia/XAM.jl/pull/62)).
41+
- Corrected the behaviour of `isprimaryalignment` with `isprimary`.
42+
43+
### Removed
44+
- Moved the functionality of `isprimary` into `isprimaryalignment`.
45+
46+
1047
## [0.3.1]
1148

1249
### Changed
1350

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

1654
## [0.3.0] - 2022-10-10
1755

1856
## Added
1957

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

2361
### Changed
2462

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

2866
### Fixed
2967

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

32-
[Unreleased]: https://github.com/BioJulia/XAM.jl/compare/v0.3.1...HEAD
70+
[Unreleased]: https://github.com/BioJulia/XAM.jl/compare/v0.4.0...HEAD
71+
[0.4.0]: https://github.com/BioJulia/XAM.jl/compare/v0.3.1...0.4.0
3372
[0.3.1]: https://github.com/BioJulia/XAM.jl/compare/v0.3.0...v0.3.1
3473
[0.3.0]: https://github.com/BioJulia/XAM.jl/compare/v0.2.8...v0.3.0

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "XAM"
22
uuid = "d759349c-bcba-11e9-07c2-5b90f8f05f7c"
33
authors = ["Kenta Sato <bicycle1885@gmail.com>", "Ben J. Ward <ward9250@gmail.com>", "Ciarán O'Mara <Ciaran.OMara@utas.edu.au>"]
4-
version = "0.3.1"
4+
version = "0.4.0"
55

66
[deps]
77
Automa = "67c07d97-cdcb-5c2c-af73-a7f9c32a568b"
@@ -15,15 +15,15 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
1515
TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
1616

1717
[compat]
18-
Automa = "0.7, 0.8"
18+
Automa = "1"
1919
BGZFStreams = "0.3.1"
2020
BioAlignments = "3"
2121
BioGenerics = "0.1"
2222
BioSequences = "3"
2323
FormatSpecimens = "1.1"
2424
GenomicFeatures = "2"
2525
Indexes = "0.1"
26-
TranscodingStreams = "0.6, 0.7, 0.8, 0.9"
26+
TranscodingStreams = "0.6, 0.7, 0.8, 0.9, 0.10"
2727
julia = "1.6"
2828

2929
[extras]

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
44
[![Latest Release](https://img.shields.io/github/release/BioJulia/XAM.jl.svg)](https://github.com/BioJulia/XAM.jl/releases/latest)
5+
[![DOI](https://zenodo.org/badge/201858041.svg)](https://zenodo.org/badge/latestdoi/201858041)
56
[![MIT license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/BioJulia/XAM.jl/blob/master/LICENSE)
67
[![Stable documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://biojulia.github.io/XAM.jl/stable)
78
[![Latest documentation](https://img.shields.io/badge/docs-dev-blue.svg)](https://biojulia.github.io/XAM.jl/dev/)
@@ -26,7 +27,7 @@ XAM is tested against Julia `1.X` on Linux, OS X, and Windows.
2627

2728
**Latest build status:**
2829

29-
[![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)
30+
[![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)
3031
[![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)
3132
[![codecov](https://codecov.io/gh/BioJulia/XAM.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/BioJulia/XAM.jl)
3233

@@ -65,4 +66,4 @@ Your logo will show up here with a link to your website.
6566

6667

6768
## Questions?
68-
If you have a question about contributing or using BioJulia software, come on over and chat to us on [the Julia Slack workspace](https://julialang.org/slack/), or you can try the [Bio category of the Julia discourse site](https://discourse.julialang.org/c/domain/bio).
69+
If you have a question about contributing or using BioJulia software, come on over and chat to us on [the Julia Slack workspace](https://julialang.slack.com/channels/biology), or you can try the [Bio category of the Julia discourse site](https://discourse.julialang.org/c/domain/bio).

docs/src/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ XAM is tested against Julia `1.X` on Linux, OS X, and Windows.
2525

2626
**Latest build status:**
2727

28-
[![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)
28+
[![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)
2929
[![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)
3030
[![codecov](https://codecov.io/gh/BioJulia/XAM.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/BioJulia/XAM.jl)
3131

@@ -64,4 +64,4 @@ Your logo will show up here with a link to your website.
6464

6565

6666
## Questions?
67-
If you have a question about contributing or using BioJulia software, come on over and chat to us on [the Julia Slack workspace](https://julialang.org/slack/), or you can try the [Bio category of the Julia discourse site](https://discourse.julialang.org/c/domain/bio).
67+
If you have a question about contributing or using BioJulia software, come on over and chat to us on [the Julia Slack workspace](https://julialang.slack.com/channels/biology), or you can try the [Bio category of the Julia discourse site](https://discourse.julialang.org/c/domain/bio).

docs/src/man/hts-files.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ end
6767
## SAM and BAM Headers
6868

6969
Both `SAM.Reader` and `BAM.Reader` implement the `header` function, which returns a `SAM.Header` object.
70-
To extract certain information out of the headers, you can use the `find` method on the header to extract information according to SAM/BAM tag.
70+
To extract certain information out of the headers, you can use the `findall` method on the header to extract information according to SAM/BAM tag.
7171
Again we refer you to the [specification](https://samtools.github.io/hts-specs/SAMv1.pdf) for full details of all the different tags that can occur in headers, and what they mean.
7272

7373
Below is an example of extracting all the info about the reference sequences from the BAM header.
@@ -76,7 +76,7 @@ In SAM/BAM, any description of a reference sequence is stored in the header, und
7676
```jlcon
7777
julia> reader = open(SAM.Reader, "data.sam");
7878
79-
julia> find(header(reader), "SQ")
79+
julia> findall(SAM.header(reader), "SQ")
8080
7-element Array{Bio.Align.SAM.MetaInfo,1}:
8181
Bio.Align.SAM.MetaInfo:
8282
tag: SQ
@@ -110,9 +110,9 @@ In the above we can see there were 7 sequences in the reference: 5 chromosomes,
110110
The `XAM` package supports the following accessors for `SAM.Record` types.
111111

112112
```@docs
113-
XAM.SAM.flag
113+
XAM.SAM.flags
114114
XAM.SAM.ismapped
115-
XAM.SAM.isprimary
115+
XAM.SAM.isprimaryalignment
116116
XAM.SAM.refname
117117
XAM.SAM.position
118118
XAM.SAM.rightposition
@@ -135,9 +135,9 @@ XAM.SAM.auxdata
135135
The `XAM` package supports the following accessors for `BAM.Record` types.
136136

137137
```@docs
138-
XAM.BAM.flag
138+
XAM.BAM.flags
139139
XAM.BAM.ismapped
140-
XAM.BAM.isprimary
140+
XAM.BAM.isprimaryalignment
141141
XAM.BAM.refid
142142
XAM.BAM.refname
143143
XAM.BAM.reflen

src/XAM.jl

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,17 @@
11
module XAM
22

3+
using BioGenerics
4+
import BioGenerics: isfilled #Note: used by `ismapped`.
5+
36
export
47
SAM,
58
BAM
69

7-
"""
8-
flag(record::Union{SAM.Record, BAM.Record})::UInt16
9-
10-
Get the bitwise flags of `record`. The returned value is a `UInt16` of each flag
11-
being OR'd together. The possible flags are:
10+
abstract type XAMRecord end
11+
abstract type XAMReader <: BioGenerics.IO.AbstractReader end
12+
abstract type XAMWriter <: BioGenerics.IO.AbstractWriter end
1213

13-
0x0001 template having multiple segments in sequencing
14-
0x0002 each segment properly aligned according to the aligner
15-
0x0004 segment unmapped
16-
0x0008 next segment in the template unmapped
17-
0x0010 SEQ being reverse complemented
18-
0x0020 SEQ of the next segment in the template being reverse complemented
19-
0x0040 the first segment in the template
20-
0x0080 the last segment in the template
21-
0x0100 secondary alignment
22-
0x0200 not passing filters, such as platform/vendor quality controls
23-
0x0400 PCR or optical duplicate
24-
0x0800 supplementary alignment
25-
"""
26-
function flag end
14+
include("flags.jl")
2715

2816
include("sam/sam.jl")
2917
include("bam/bam.jl")

src/bam/bam.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ module BAM
66
using BioGenerics
77
using GenomicFeatures
88
using XAM.SAM
9-
import ..XAM: flag
9+
import ..XAM: flags, XAMRecord, XAMReader, XAMWriter,
10+
ismapped, isprimaryalignment, ispositivestrand, isnextmapped #TODO: Deprecate import of flag queries. These were imported to preseve existing API.
1011

1112
import BGZFStreams
1213
import BioAlignments

0 commit comments

Comments
 (0)