bamsort
Sort BAM files.
Five sort modes are supported:
coordinate (Picard-compatible)
coordinate (fgbio-compatible)
queryname (Picard-compatible)
queryname (fgbio-compatible)
template coordinate sort (fgbio-compatible)
Allowed values for --sort-order are as follows:
coordinate [default]
queryname
templatecoordinate
Allowed values for --sort-compatibility are as follows:
picard [default]
fgbio
coordinate and queryname sorting can be done in either picard or fgbio mode. templatecoordinate can only be done in fgbio mode.
$ pbrun bamsort \
--ref Homo_sapiens_assembly38.fasta \
--in-bam input.bam \
--out-bam output.bam \
--sort-order coordinate
Sort BAM files. Five modes: Coordinate sort (Picard-compatible), Coordinate sort (fgbio-compatible), queryname sort (Picard-compatible), queryname sort (fgbio-compatible), and template coordinate sort (fgbio-compatible).
Input/Output file options
- --in-bam IN_BAM
- --out-bam OUT_BAM
- --ref REF
Path of BAM/CRAM for sorting. This option is required. (default: None)
Option is required.
Path of BAM file after sorting. (default: None)
Option is required.
Path to the reference file. (default: None)
Option is required.
Pipeline Options:
- --num-zip-threads NUM_ZIP_THREADS
- --num-sort-threads NUM_SORT_THREADS
- --max-records-in-ram MAX_RECORDS_IN_RAM
- --sort-order SORT_ORDER
- --sort-compatibility SORT_COMPATIBILITY
Number of CPUs to use for zipping BAM files in a run (default 16 for coordinate sorts and 10 otherwise). (default: None)
Number of CPUs to use for sorting in a run (default 10 for coordinate sorts and 16 otherwise). (default: None)
Maximum number of records in RAM when using a queryname or template coordinate sort mode; lowering this number will decrease maximum memory usage. (default: 65000000)
Type of sort to be done. Possible values are {coordinate,queryname,templatecoordinate}. (default: coordinate)
Sort comparator compatibility to be used for compatibility with other tools. Possible values are {picard,fgbio}. TemplateCoordinate will only use fgbio. (default: picard)
Common options:
- --logfile LOGFILE
- --tmp-dir TMP_DIR
- --with-petagene-dir WITH_PETAGENE_DIR
- --keep-tmp
- --license-file LICENSE_FILE
- --no-seccomp-override
- --version
Path to the log file. If not specified, messages will only be written to the standard error output. (default: None)
Full path to the directory where temporary files will be stored.
Full path to the PetaGene installation directory. By default, this should have been installed at /opt/petagene. Use of this option also requires that the PetaLink library has been preloaded by setting the LD_PRELOAD environment variable. Optionally set the PETASUITE_REFPATH and PGCLOUD_CREDPATH environment variables that are used for data and credentials (default: None)
Do not delete the directory storing temporary files after completion.
Path to license file license.bin if not in the installation directory.
Do not override seccomp options for docker (default: None).
View compatible software versions.
GPU options:
- --num-gpus NUM_GPUS
- --gpu-devices GPU_DEVICES
Number of GPUs to use for a run. GPUs 0..(NUM_GPUS-1) will be used.
GPU devices to use for a run. By default, all GPU devices will be used.
To use specific GPU devices, enter a comma-separated list of GPU device
numbers. Possible device numbers can be found by examining the output of
the nvidia-smi
command. For example, using --gpu-devices 0,1
would only use the first two GPUs.