bedtools/bedtools_sort
Sort
Sorting
BED
GFF
VCF
Chromosome
Description
Sorts genomic feature files by chromosome and other criteria.
This tool provides flexible sorting options for BED, GFF, and VCF files,
including chromosome-based sorting, feature size sorting, score-based sorting,
and custom chromosome ordering using genome files.
Default behavior: Sorts by chromosome name, then by start position
Custom ordering: Use --genome or --faidx to specify chromosome order
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input -i | file required | Input genomic feature file to be sorted. **Supported formats:** BED, GFF, VCF **Requirements:** File should contain valid genomic intervals **Note:** File does not need to be pre-sorted |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output -o | file required output | Output file containing sorted genomic features. The output will be in the same format as the input file, with features sorted according to the specified criteria. |
Options
Name | Type & Properties | Description |
|---|---|---|
--sizeA | boolean_true | Sort by feature size in ascending order. Features are sorted by their span (end - start) from smallest to largest, regardless of chromosome location. |
--sizeD | boolean_true | Sort by feature size in descending order. Features are sorted by their span (end - start) from largest to smallest, regardless of chromosome location. |
--chrThenSizeA | boolean_true | Sort by chromosome, then by feature size (ascending). **Primary sort:** Chromosome name (lexicographic) **Secondary sort:** Feature size (smallest to largest) |
--chrThenSizeD | boolean_true | Sort by chromosome, then by feature size (descending). **Primary sort:** Chromosome name (lexicographic) **Secondary sort:** Feature size (largest to smallest) |
--chrThenScoreA | boolean_true | Sort by chromosome, then by score (ascending). **Primary sort:** Chromosome name (lexicographic) **Secondary sort:** Score field (lowest to highest) **Requirements:** Input must have score column (typically column 5 in BED) |
--chrThenScoreD | boolean_true | Sort by chromosome, then by score (descending). **Primary sort:** Chromosome name (lexicographic) **Secondary sort:** Score field (highest to lowest) **Requirements:** Input must have score column (typically column 5 in BED) |
--genome -g | file | Custom chromosome ordering file. Text file with one chromosome name per line, defining the desired chromosome order. Features will be sorted according to this order rather than lexicographic sorting. **Format:** One chromosome name per line (e.g., "chr1", "chr2", etc.) |
--faidx | file | FASTA index file for chromosome ordering. Uses a FASTA index file (.fai) to determine chromosome order. The chromosomes will be sorted according to their order in the index file. **Format:** Standard samtools faidx output format |
--header | boolean_true | Preserve header lines in output. Header lines (starting with '#' or other format-specific prefixes) from the input file will be printed before the sorted features. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
output: "$id.$key.output.bed"
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/biobox.git \
-revision v0.4.1 \
-main-script target/nextflow/bedtools/bedtools_sort/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
bedtools/bedtools_sortbiobox v0.4.1
Uses
0 relationships
No component dependencies found.