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 πŸŒˆβœ¨πŸ’–