convert2blastmask
Quick Start
- Command:
convert2blastmask -in masked.fa -out mask.asn1 -masking_algorithm <name> -masking_options <text> [options] - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/convert2blastmask - Full reference: See
references/help.md
When To Use This Tool
- Convert lower-case soft-masked FASTA into mask files that
makeblastdbcan consume. - Preserve masking provenance by recording the masking program name and options used upstream.
- Emit interval or ASN.1/XML mask representations for BLAST database preparation.
- Carry sequence IDs through with
-parse_seqidswhen the masking data must stay aligned to parsed FASTA identifiers.
Common Patterns
# 1) Convert soft-masked FASTA to the default ASN.1 text format
convert2blastmask \
-in masked.fa \
-out masked.asn1.txt \
-masking_algorithm windowmasker \
-masking_options "-mk_counts true -ustat counts.obinary"
# 2) Emit interval output for inspection
convert2blastmask \
-in masked.fa \
-out masked.interval \
-outfmt interval \
-masking_algorithm dust \
-masking_options "20 64 1"
# 3) Keep parsed FASTA identifiers aligned with downstream BLAST DB creation
convert2blastmask \
-in masked.fa \
-out masked.xml \
-outfmt maskinfo_xml \
-parse_seqids \
-masking_algorithm other \
-masking_options "custom repeat masking"
Recommended Workflow
- Start from a FASTA whose masked regions are represented in lower case.
- Record the masking method faithfully with
-masking_algorithmand-masking_options; treat those fields as provenance, not decoration. - Choose the output format that matches how
makeblastdbor your downstream tooling expects mask data. - Build the BLAST database immediately afterward so the mask file and FASTA stay synchronized.
Guardrails
-masking_algorithmand-masking_optionsare required.- The input is lower-case masked FASTA, not BED, GFF, or interval text.
- Use BLAST+ style flags such as
-helpand-version; the common--helppattern is wrong here. -parse_seqidsonly helps if the FASTA deflines are parseable and you will preserve those IDs consistently intomakeblastdb.- The default input and output are stdin and stdout, so explicit
-inand-outare safer in batch workflows.