SAMBAMBA-SLICE(1)
π SAMBAMBA-SLICE π
okay bestie, so you know how sambamba has a whole squad of subcommands and this one is like, the girl who just quietly gets stuff done? yeah. that's sambamba-slice, and she's literally the main character of "copying a slice of BAM file" π
β¨ NAME β¨
sambamba-slice β copying a slice of BAM file π§
πΈ SYNOPSIS πΈ
sambamba slice OPTIONS <input.bam> region
π¦ DESCRIPTION π¦
okay so what she does is: she outputs reads overlapping the specified region into a new BAM file. Default destination is STDOUT, which means if you don't say where to put it, she's just gonna scream it at your terminal, no cap. π
Input file must be coordinate-sorted and indexed.</purl> Like, both. Not optional. Don't come to her with an unsorted file, she will simply not.
now, the tea: you could do the same thing with sambamba-view, but bestie, that would be much slower because of a lot of compression/decompression work. π It's just doing so much extra for no reason.
instead of that naive method, sambamba-slice leverages knowledge about structure of BAM file and recompresses only a few BGZF blocks at the beginning and the end of the region, while the BGZF blocks in the middle are copied as is. the way that she just... copies the middle blocks untouched?? iconic. ate. no notes. π
and that's literally why this tool doesn't offer any options related to number of threads or compression level β most of the time is spent on I/O operations. so there's nothing to tune, girlie. she's already doing the smart thing. π«Ά
β¨ OPTIONS β¨
-o,--output-filename=OUTPUTFILEβ name of output file. (so like, if you don't want her yelling at STDOUT, you tell her where to put the goods. π)
that's it. that's the whole page. short and perfect, lowkey giving minimalist queen π
August 2014 β SAMBAMBA-SLICE(1) β and that's the whole vibe check, bestie, go slice something πβ¨π
π¦ where this page comes from
- debian bookworm: sambamba 1.0+dfsg-1 Β· GPL-2.0-or-later
- debian trixie: sambamba 1.0.1+dfsg-2+b1 Β· GPL-2.0-or-later
- ubuntu jammy: sambamba 0.8.2+dfsg-2 Β· GPL-2.0-or-later
- ubuntu noble: sambamba 1.0.1+dfsg-1build3 Β· GPL-2.0-or-later
- ubuntu questing: sambamba 1.0.1+dfsg-2build1
- ubuntu resolute: sambamba 1.0.1+dfsg-3ubuntu1 Β· GPL-2.0-or-later
- ubuntu stonking: sambamba 1.0.1+dfsg-3ubuntu3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms