-
Notifications
You must be signed in to change notification settings - Fork 29
Add a samtools split task #328
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
15 commits
Select commit
Hold shift + click to select a range
319501e
Add a samtools split task
hexylena 60dcef7
Register in changelog
hexylena 4030091
Directory not yet available
hexylena 8a0de27
Must be defined
hexylena b70891c
noticed in wdl-aid that only these are permitted
hexylena 1ec8855
Add compression level parameter, defaulting to 1
hexylena 153db04
default to indexing
hexylena 1522785
Remove control of output format
hexylena 2bba90e
include indexes
hexylena bd4a856
write index is non-optional
hexylena be0aabe
make subdirectory as well
hexylena 10e83c1
emits csi extension instead
hexylena 6ebf7cd
missing threads
hexylena 4267c2b
Merge branch 'develop' into samtools-split
rhpvorderman d2df344
Merge branch 'develop' into samtools-split
rhpvorderman 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
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.
You could add a
Int compressionLevel = 1parameter and use--output-fmt level=~{compressionLevel}in the command section.Some thing to be aware of is that most bioinformatics formats use DEFLATE. Either as some form of gzip (bgzip = blocked gzip, concatenated gzip blocks) or in some custom format. Level 5 is chosen by default in samtools. IMNSHO this was a very bad design choice. Level 5 is multiple times slower than level 1 for only 20% smaller filesize. In fact, this makes most bioinformatics tools behave like compression tools with a bioinformatic side effect. I am not interested in heavy compression for intermediate files. For BAM files, if you need compression, CRAM is always the better option. So there is no reason to compress BAM with anything more than level 1.
Additionaly Intel's ISA-L project has a DEFLATE implementation that decompresses 2x faster and compresses 5x (!!!!!) faster at level 1 while being completely compatible. It does not support levels higher than 3. So even if the project supports vastly faster runtimes, these are not enabled if the compression level is too high and zlib is used as a fallback.
Sorry something of a pet peeve of mine. The impact is quite huge.
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.
Q.E.D
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.
Jeez that's a big different.
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.
Yes and 21207544 / 19728672 = 1.07. So the level 1 file is just 7% bigger. Presumably because this is ONT data. Due to the 32KB window size on gzip Illumina compresses better than ONT data.