clustalw
Quick Start
- Command:
clustalw -infile=seqs.fa -align - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/clustalw - Full reference: See
references/help.md
When To Use This Tool
- Build multiple sequence alignments for protein or nucleotide sequences.
- Generate CLUSTAL-style guide trees or distance trees as part of alignment workflows.
- Convert between alignment output formats such as CLUSTAL, FASTA, PHYLIP, NEXUS, and GCG.
- Merge alignments or add sequences with profile-alignment workflows.
Common Patterns
# 1) Align FASTA sequences and write a CLUSTAL alignment
clustalw \
-infile=seqs.fa \
-align \
-outfile=seqs.aln \
-output=clustal
# 2) Align DNA sequences and write a PHYLIP tree
clustalw \
-infile=markers.fa \
-type=dna \
-align \
-tree \
-outputtree=phylip
# 3) Merge two existing alignments by profile alignment
clustalw \
-profile \
-profile1=alignment1.aln \
-profile2=alignment2.aln \
-outfile=merged.aln
Recommended Workflow
- Decide whether you are doing a fresh alignment, tree generation from an existing alignment, or profile alignment between two existing alignments.
- Set
-type=proteinor-type=dnaexplicitly when auto-detection would be ambiguous. - Run the alignment and inspect the emitted alignment file plus any guide-tree outputs such as
.dnd. - If the downstream goal is rigorous phylogenetic inference, treat the CLUSTAL tree as a quick guide and move to a dedicated tree-inference tool afterward.
Guardrails
clustalwexpects its classic long-option style such as-infile=...; bare GNU-style--help,--version, and-hare not valid help invocations.- Use
-help,-fullhelp, or-optionsto inspect available parameters. - Do not run
clustalwwith no arguments in automation; it can drop into its legacy interactive behavior instead of doing useful batch work. - The tree output is primarily a guide/distance tree, not a substitute for model-based maximum-likelihood phylogeny.