bedtools/bedtools_shift
Description
Shift genomic intervals by a specified number of base pairs.
bedtools shift moves genomic intervals (BED/GFF/VCF) by a user-specified number of base pairs.
The tool can shift all features by the same amount, or apply strand-specific shifts to features
on the positive and negative strands separately. Shifts can be absolute values or proportional
to feature length.
This tool is commonly used for:
Adjusting genomic coordinates for analysis offsets
Creating flanking regions around features
Simulating experimental bias or systematic shifts
Generating control regions at specified distances
Converting between different coordinate systems
Modeling positional uncertainty in genomic data
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input -i | file required | Input file containing genomic intervals to shift. **Format:** BED, GFF, or VCF file **Content:** Genomic intervals with coordinates to be shifted **Requirements:** Must contain valid genomic coordinates **Usage:** Each interval will be shifted according to specified parameters |
--genome -g | file required | Genome file defining chromosome sizes. **Format:** Tab-delimited text file with chromosome names and sizes **Content:** Each line contains: <chromName><TAB><chromSize> **Usage:** Prevents shifted coordinates from exceeding chromosome boundaries **Creation:** Can be generated with 'samtools faidx' or UCSC Table Browser **Example format:** chr1 249250621 chr2 243199373 |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file required output | Output file with shifted genomic intervals. **Format:** Same format as input file **Content:** Original intervals with shifted coordinates **Boundaries:** Coordinates clamped to [0, chromosome_length] range |
Shift Options
Name | Type & Properties | Description |
|---|---|---|
--shift -s | double | Shift all features by this number of base pairs. **Usage:** Positive values shift downstream, negative values shift upstream **Interaction:** Cannot be used together with --plus_shift and --minus_shift **Percentage mode:** When --pct is used, this becomes a fraction (e.g., 0.1 = 10%) **Boundary handling:** Results clamped to valid chromosome coordinates |
--plus_shift -p | double | Shift features on the positive strand by this number of base pairs. **Usage:** Applied only to features on the + strand **Requirement:** Must be used together with --minus_shift **Interaction:** Cannot be used with --shift parameter **Percentage mode:** When --pct is used, this becomes a fraction |
--minus_shift -m | double | Shift features on the negative strand by this number of base pairs. **Usage:** Applied only to features on the - strand **Requirement:** Must be used together with --plus_shift **Interaction:** Cannot be used with --shift parameter **Percentage mode:** When --pct is used, this becomes a fraction |
--percentage -pct | boolean_true | Interpret shift values as fractions of feature length. **Effect:** Shift distances calculated as fraction × feature_length **Example:** -s 0.5 shifts each feature by 50% of its length **Applications:** Proportional shifts, relative positioning **Default:** false (absolute base pair values) |
Output Options
Name | Type & Properties | Description |
|---|---|---|
--header | boolean_true | Include the original file header in output. **Usage:** Preserves metadata and format information from input **Applications:** Maintaining file structure, format compatibility **Formats:** Particularly useful for VCF and GFF files **Default:** false (no header included) |
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.0 \
-main-script target/nextflow/bedtools/bedtools_shift/main.nf \
-params-file params.yaml Relationships
Used by
No components use this component.
Current component
Uses
No component dependencies found.