{"id":6251,"projects":[69],"description":"Sort alignments by leftmost coordinates, or by read name when -n is used. An appropriate @HD-SO sort order header tag will be added or an existing one updated if necessary.\n\nUsage: samtools sort [-l level] [-m maxMem] [-o out.bam] [-O format] [-n] -T out.prefix [-@ threads] [in.bam]\n\nOptions:\n-l INT\nSet the desired compression level for the final output file, ranging from 0 (uncompressed) or 1 (fastest but minimal compression) to 9 (best compression but slowest to write), similarly to gzip(1)'s compression level setting.\n\nIf -l is not used, the default compression level will apply.\n\n-m INT\nApproximately the maximum required memory per thread, specified either in bytes or with a K, M, or G suffix. [768 MiB]\n\n-n\nSort by read names (i.e., the QNAME field) rather than by chromosomal coordinates.\n\n-o FILE\nWrite the final sorted output to FILE, rather than to standard output.\n\n-O FORMAT\nWrite the final output as sam, bam, or cram.\n\nBy default, samtools tries to select a format based on the -o filename extension; if output is to standard output or no format can be deduced, -O must be used.\n\n-T PREFIX\nWrite temporary files to PREFIX.nnnn.bam. This option is required.\n\n-@ INT\nSet number of sorting and compression threads. By default, operation is single-threaded","image":"","tags":"","type":"","title":"dockstore-tool-samtools-sort","url":"https://dockstore.org/api/api/ga4gh/v2/tools/quay.io%2Fcancercollaboratory%2Fdockstore-tool-samtools-sort","authors":[1],"rubrics":[25]}