biod / sambamba

Tools for working with SAM/BAM data
http://thebird.nl/blog/D_Dragon.html
GNU General Public License v2.0
555 stars 104 forks source link

Can you add sort by tag function? #499

Open cherryamme opened 1 year ago

cherryamme commented 1 year ago

hi, there is a '-t' arg in sammtools to Sort by value of TAG. but i can't find alternative arg in sambamba . I've seen some closed issue #309 in 2017 also Mentioned. but there is no solution . How can i sort by value of tag.

cherryamme commented 1 year ago

I have tried the latest release of Sambamba 0.8.2

sambamba 0.8.2 by Artem Tarasov and Pjotr Prins (C) 2012-2021 LDC 1.27.1 / DMD v2.097.2 / LLVM11.0.0 / bootstrap LDC - the LLVM D compiler (1.27.1)

Usage: sambamba-sort [options]

Options: -m, --memory-limit=LIMIT approximate total memory limit for all threads (by default 2GB) --tmpdir=TMPDIR directory for storing intermediate files; default is system directory for temporary files -o, --out=OUTPUTFILE output file name; if not provided, the result is written to a file with .sorted.bam extension -n, --sort-by-name sort by read name instead of coordinate (lexicographical order) --sort-picard sort by query name like in picard -N, --natural-sort sort by read name instead of coordinate (so-called 'natural' sort as in samtools) -M, --match-mates pull mates of the same alignment together when sorting by read name -l, --compression-level=COMPRESSION_LEVEL level of compression for sorted BAM, from 0 to 9 -u, --uncompressed-chunks write sorted chunks as uncompressed BAM (default is writing with compression level 1), that might be faster in some cases but uses more disk space -p, --show-progress show progressbar in STDERR -t, --nthreads=NTHREADS use specified number of threads -F, --filter=FILTER keep only reads that satisfy FILTER