bedtools/bedtools_maskfasta
genomics
fasta
masking
sequences
bed
Description
Mask regions in a FASTA file based on genomic coordinates.
bedtools maskfasta masks sequences in a FASTA file based on coordinates defined
in a BED/GFF/VCF file. Masked regions can be replaced with Ns (hard masking),
converted to lowercase (soft masking), or replaced with custom characters.
This tool is commonly used for:
Masking repetitive elements or low-quality regions
Creating masked reference genomes for alignment
Removing specific genomic features from sequences
Preparing sequences for downstream analysis
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input_fasta -fi | file required | Input FASTA file to mask. **Format:** FASTA format with nucleotide sequences **Content:** Reference sequences or assembled contigs **Usage:** Sequences will be masked at coordinates specified in the BED file **Requirements:** Must contain sequences referenced in the BED file |
--input_bed -bed | file required | BED/GFF/VCF file specifying regions to mask. **Format:** BED, GFF, or VCF file with genomic coordinates **Content:** Coordinates of regions to mask in the FASTA file **Usage:** Each interval defines a region to be masked **Requirements:** Chromosome names must match FASTA headers |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output -fo | file required output | Output FASTA file with masked sequences. **Format:** FASTA format with masked sequences **Content:** Same sequences as input with specified regions masked **Masking:** Regions replaced with Ns, lowercase, or custom characters |
Masking Options
Name | Type & Properties | Description |
|---|---|---|
--soft_mask -soft | boolean_true | Use soft masking (lowercase bases) instead of hard masking (Ns). **Default:** Hard masking with N characters **Soft masking:** Converts masked regions to lowercase letters **Usage:** Preserves sequence information while indicating masked regions **Applications:** Useful for some alignment tools that recognize soft masking |
--mask_character -mc | string | Custom character to use for masking instead of N. **Default:** N (hard masking) or lowercase (soft masking) **Usage:** Replace masked regions with specified character **Example:** X, -, or any single character **Note:** Overrides soft masking when specified |
--full_header -fullHeader | boolean_true | Use complete FASTA headers in output. **Default:** Use only text before first space/tab in header **Full header:** Preserves entire header line including descriptions **Usage:** Maintains complete sequence annotations and metadata **Applications:** Important when headers contain essential information |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
output: "$id.$key.output.fasta"
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_maskfasta/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
bedtools/bedtools_maskfastabiobox v0.4.1
Uses
0 relationships
No component dependencies found.