esl-mask
Quick Start
- Command:
esl-mask [options] <sqfile> <maskfile> - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/esl-mask - Full reference: See
references/help.mdfor detailed options (runesl-mask -h)
When To Use This Tool
- Use
esl-maskwhen you have named sequences plus a coordinate table describing which residues to mask or keep. - It is useful for masking low-confidence intervals, trimming flanks, hiding specific motif regions, or generating region-only views with reverse masking.
- Reach for
-lto lowercase masked residues instead of replacing them, or-m <c>to mask with a custom character such asNorX. - Use
-Rwhen your mask file is not in the exact same order as the sequence file and you have an SSI index available.
Common Patterns
# Mask listed regions with the default X character
esl-mask sequences.fa mask.tsv > masked.fa
# Lowercase the masked residues instead of replacing them
esl-mask -l sequences.fa mask.tsv > masked-lower.fa
# Keep only the listed region and mask everything else
esl-mask -r sequences.fa keep-regions.tsv > region-only.fa
# Random-access masking from an SSI-indexed sequence file, padding each region by 5 nt
esl-mask -R -x 5 -m N sequences.fa mask.tsv > padded.fa
Recommended Workflow
- Prepare a supported sequence file such as FASTA, EMBL, GenBank, or another Easel-recognized format.
- Build a mask file with at least three whitespace-delimited fields per line: sequence name, 1-based start, and 1-based end.
- Decide whether you want normal masking, reverse masking (
-r), lowercasing (-l), or a replacement character (-m). - If mask rows are not aligned to the sequence-file order, create an SSI index with
esl-sfetch --indexand rerun with-R. - Inspect output around interval boundaries, especially if you used
-xto extend masked regions.
Guardrails
- The mask file uses 1-based inclusive coordinates and ignores blank lines plus
#comments. - By default, sequence names must appear in the same order and number in both files;
-Ris the escape hatch, but it requires an.ssiindex. -rmasks everything outsidestart..end, not the interval itself.-hworks;--helpand--versionare rejected by the local executable.-x <n>extends masking by up tonresidues on both sides, which can change behavior near sequence ends.