mapping/samtools_sort
Description
Sort and (optionally) index alignments.
Reads are sorted by leftmost coordinates, or by read name when --sort_by_read_names is used.
An appropriate @HD-SO sort order header tag will be added or an existing one updated if necessary.
Note that to generate an index file (by specifying --output_bai), the default coordinate sort must be used.
Thus the --sort_by_read_names and --sort_by <TAG> options are incompatible with --output_bai.
Input
Name | Type & Properties | Description |
|---|---|---|
--input | file required | Path to the SAM/BAM/CRAM files containing the mapped reads. |
Output
Name | Type & Properties | Description |
|---|---|---|
--output_bam | file required output | Filename to output the counts to. |
--output_bai | file output | BAI-format index for BAM file. |
--output_format | string | The output format. By 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, bam is selected. |
--compression | integer | Compression level, from 0 (uncompressed) to 9 (best |
Arguments
Name | Type & Properties | Description |
|---|---|---|
--minimizer_cluster | boolean_true | Sort unmapped reads (those in chromosome "*") by their sequence minimiser (Schleimer et al., 2003; Roberts et al., 2004), also reverse complementing as appropriate. This has the effect of collating some similar data together, improving the compressibility of the unmapped sequence. The minimiser kmer size is adjusted using the -K option. Note data compressed in this manner may need to be name collated prior to conversion back to fastq. Mapped sequences are sorted by chromosome and position. |
--minimizer_kmer | integer | Sets the kmer size to be used in the -M option. |
--sort_by_read_names | boolean_true | Sort by read names (i.e., the QNAME field) rather than by chromosomal coordinates. |
--sort_by | string | Sort first by this value in the alignment tag, then by position or name (if also using -n). |
--no_pg | boolean_true | Do not add a @PG line to the header of the output file. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
output_bam: "$id.$key.output_bam.bam"
output_bai: "$id.$key.output_bai.bai"
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline.git \
-revision v4.0.2 \
-main-script target/nextflow/mapping/samtools_sort/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
mapping/samtools_sortopenpipeline v4.0.2
Uses
0 relationships
No component dependencies found.