mirror of https://github.com/MillironX/XAM.jl
commit
946e77a734
@ -1,17 +1,45 @@
|
||||
name: CompatHelper
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
- cron: 0 0 * * *
|
||||
workflow_dispatch:
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
jobs:
|
||||
CompatHelper:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add CompatHelper
|
||||
run: julia --color=yes -e 'using Pkg; Pkg.add("CompatHelper")'
|
||||
- name: Run CompatHelper
|
||||
- name: Check if Julia is already available in the PATH
|
||||
id: julia_in_path
|
||||
run: which julia
|
||||
continue-on-error: true
|
||||
- name: Install Julia, but only if it is not already available in the PATH
|
||||
uses: julia-actions/setup-julia@v1
|
||||
with:
|
||||
version: '1'
|
||||
arch: ${{ runner.arch }}
|
||||
if: steps.julia_in_path.outcome != 'success'
|
||||
- name: "Add the General registry via Git"
|
||||
run: |
|
||||
import Pkg
|
||||
ENV["JULIA_PKG_SERVER"] = ""
|
||||
Pkg.Registry.add("General")
|
||||
shell: julia --color=yes {0}
|
||||
- name: "Install CompatHelper"
|
||||
run: |
|
||||
import Pkg
|
||||
name = "CompatHelper"
|
||||
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
|
||||
version = "3"
|
||||
Pkg.add(; name, uuid, version)
|
||||
shell: julia --color=yes {0}
|
||||
- name: "Run CompatHelper"
|
||||
run: |
|
||||
import CompatHelper
|
||||
CompatHelper.main()
|
||||
shell: julia --color=yes {0}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
|
||||
run: julia --color=yes -e 'using CompatHelper; CompatHelper.main(master_branch = "master")'
|
||||
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
|
||||
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
|
||||
|
@ -1,12 +1,22 @@
|
||||
name: TagBot
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
issue_comment:
|
||||
types:
|
||||
- created
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
lookback:
|
||||
default: 3
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
TagBot:
|
||||
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: JuliaRegistries/TagBot@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
ssh: ${{ secrets.TAGBOT_KEY }}
|
||||
ssh: ${{ secrets.DOCUMENTER_KEY }}
|
||||
|
@ -0,0 +1,27 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to HapLink.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.3.0]
|
||||
|
||||
## 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))
|
||||
|
||||
### 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))
|
||||
|
||||
### Fixed
|
||||
|
||||
- `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.0...HEAD
|
||||
[0.3.0]: https://github.com/BioJulia/XAM.jl/compare/v0.2.8...v0.3.0
|
@ -0,0 +1,54 @@
|
||||
@testset "Cross Check Properties" begin
|
||||
|
||||
Broadcast.broadcastable(x::XAM.BAM.Record) = Ref(x) #TODO: consider moving to XAM.jl.
|
||||
Broadcast.broadcastable(x::XAM.SAM.Record) = Ref(x) #TODO: consider moving to XAM.jl
|
||||
|
||||
function crosscheck(bam::BAM.Record, sam::SAM.Record, property::Symbol)
|
||||
|
||||
bam_property = getproperty(XAM.BAM, property)
|
||||
sam_property = getproperty(XAM.SAM, property)
|
||||
|
||||
if bam_property(bam) != sam_property(sam)
|
||||
@warn "$property result is not the same" bam_property(bam) sam_property(sam)
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
samdir = path_of_format("SAM")
|
||||
bamdir = path_of_format("BAM")
|
||||
|
||||
filenames = [
|
||||
"ce#1",
|
||||
"ce#2",
|
||||
"ce#5",
|
||||
"ce#5b",
|
||||
"ce#unmap",
|
||||
"ce#unmap1",
|
||||
"ce#unmap2",
|
||||
]
|
||||
|
||||
properties = [
|
||||
:position,# POS
|
||||
:tempname,# QNAME
|
||||
:mappingquality,# MAPQ
|
||||
:cigar, # CIGAR
|
||||
:flag, # FLAG
|
||||
:sequence, # SEQ
|
||||
:nextposition, # PNEXT
|
||||
:templength, # TLEN
|
||||
]
|
||||
|
||||
for filename in filenames
|
||||
|
||||
records_bam = collect(open(BAM.Reader, joinpath(bamdir, filename * ".bam")))
|
||||
records_sam = collect(open(SAM.Reader, joinpath(samdir, filename * ".sam")))
|
||||
|
||||
for (bam, sam) in zip(records_bam, records_sam)
|
||||
@test all(crosscheck.(bam, sam, properties)) == true
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end # testset Crosscheck
|
Loading…
Reference in New Issue