Repository navigation
switch BGZFStreams for BGZFLib #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
bfa76df
switch BGZFStreams for BGZFLib
jonathan-bieler c408d23
added test for quality and sequence methods
jonathan-bieler 128be8f
removed type piracy
jonathan-bieler 62f6fbc
use read_all
jonathan-bieler b39e1d7
use resize! in sequence
jonathan-bieler bbee5d1
fix some bugs
jonathan-bieler 680e5e4
update docs & workflow
jonathan-bieler e95cf35
update compat
jonathan-bieler 2f7a24e
removed non-allocating methods
jonathan-bieler ff1b091
use store_le/load_le methods, added BGZFStream writer as extension
jonathan-bieler fa2adb0
removed LongDNA from tests
jonathan-bieler 3873c2a
check unsafe_read and widen io input types
jonathan-bieler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -1,35 +1,46 @@ | ||
| name = "XAM" | ||
| uuid = "d759349c-bcba-11e9-07c2-5b90f8f05f7c" | ||
| authors = ["Kenta Sato <bicycle1885@gmail.com>", "Ben J. Ward <ward9250@gmail.com>", "Ciarán O'Mara <Ciaran.OMara@utas.edu.au>"] | ||
| version = "0.4.2" | ||
| authors = ["Kenta Sato <bicycle1885@gmail.com>", "Ben J. Ward <ward9250@gmail.com>", "Ciarán O'Mara <Ciaran.OMara@utas.edu.au>"] | ||
|
|
||
| [deps] | ||
| Automa = "67c07d97-cdcb-5c2c-af73-a7f9c32a568b" | ||
| BGZFStreams = "28d598bf-9b8f-59f1-b38c-5a06b4a0f5e6" | ||
| BGZFLib = "b86bd9b6-aa64-492d-a0e2-e61a004d8aed" | ||
| BioAlignments = "00701ae9-d1dc-5365-b64a-a3a3ebf5695e" | ||
| BioGenerics = "47718e42-2ac5-11e9-14af-e5595289c2ea" | ||
| BioSequences = "7e6ae17a-c86d-528c-b3b9-7f778a29fe59" | ||
| BufferIO = "ff366017-094f-4144-bd70-a828a0d67152" | ||
| GenomicFeatures = "899a7d2d-5c61-547b-bef9-6698a8d05446" | ||
| Indexes = "4ffb77ac-cb80-11e8-1b35-4b78cc642f6d" | ||
| MemoryViews = "a791c907-b98b-4e44-8f4d-e4c2362c6b2f" | ||
| Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" | ||
| TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" | ||
|
|
||
| [weakdeps] | ||
| BGZFStreams = "28d598bf-9b8f-59f1-b38c-5a06b4a0f5e6" | ||
|
|
||
| [compat] | ||
| Automa = "1" | ||
| BGZFStreams = "0.3.1" | ||
| BGZFLib = "0.1" | ||
| BioAlignments = "3" | ||
| BioGenerics = "0.1" | ||
| BioSequences = "3" | ||
| BufferIO = "0.2.5" | ||
| FormatSpecimens = "1.1" | ||
| GenomicFeatures = "2" | ||
| Indexes = "0.1" | ||
| MemoryViews = "0.4" | ||
| TranscodingStreams = "0.6, 0.7, 0.8, 0.9, 0.10, 0.11" | ||
| julia = "1.6" | ||
| julia = "1.11" | ||
|
|
||
| [extensions] | ||
| BGZFStreamsExt = "BGZFStreams" | ||
|
|
||
| [extras] | ||
| Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
| FormatSpecimens = "3372ea36-2a1a-11e9-3eb7-996970b6ffbd" | ||
| Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
|
||
| [targets] | ||
| test = ["Documenter", "FormatSpecimens", "Test"] | ||
| test = ["Documenter", "FormatSpecimens", "Test", "BGZFStreams"] |
This file contains hidden or 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
This file contains hidden or 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,33 @@ | ||
| module BGZFStreamsExt | ||
|
|
||
| using XAM | ||
| using BGZFStreams | ||
|
|
||
| import XAM.BAM: write_header | ||
|
|
||
| function write_header(stream::BGZFStreams.BGZFStream, header, refseqnames, refseqlens) | ||
| @assert length(refseqnames) == length(refseqlens) "Lengths of refseq names and lengths must match." | ||
| n = 0 | ||
|
|
||
| # magic bytes | ||
| n += write(stream, "BAM\1") | ||
|
|
||
| # SAM header | ||
| buf = IOBuffer() | ||
| l = write(SAM.Writer(buf), header) | ||
| n += write(stream, Int32(l)) | ||
| n += write(stream, take!(buf)) | ||
|
|
||
| # reference sequences | ||
| n += write(stream, Int32(length(refseqnames))) | ||
| for (seqname, seqlen) in zip(refseqnames, refseqlens) | ||
| namelen = length(seqname) | ||
| n += write(stream, Int32(namelen + 1)) | ||
| n += write(stream, seqname, '\0') | ||
| n += write(stream, Int32(seqlen)) | ||
| end | ||
|
|
||
| return n | ||
| end | ||
|
|
||
| end |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not ideal to lose the current LTS, but I don't think it's a dealbreaker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's MemoryViews that requires 1.11