ClustalW
In this section:
Description
ClustalW is a multiple sequence alignment program for DNA or proteins. Clustal Omega is a newer version offering significantly greater scalability, allowing alignment of hundreds of thousands of sequences in a few hours.
Available Versions
clustalw/2.1 (default)
clustalw-mpi/0.13 (default)
Serial Job Submission
#!/bin/bash
#SBATCH -J clustalw
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 02:00:00
#SBATCH --mem=4G
export INPUT="sequences.fasta"
export OUTPUT="alignment.aln"
module load clustalw/2.1
job-nanny clustalw2 -infile=sequences.fasta -outfile=alignment.aln
MPI Job Submission
#!/bin/bash
#SBATCH -J clustalw_mpi
#SBATCH -N 2
#SBATCH --ntasks-per-node=28
#SBATCH -t 04:00:00
#SBATCH --mem-per-cpu=2G
export INPUT="sequences.fasta"
export OUTPUT="alignment.aln"
module load clustalw-mpi
job-nanny srun -n $SLURM_NTASKS clustalw-mpi -infile=sequences.fasta -outfile=alignment.aln
Important Options
Option |
Description |
|---|---|
|
Input file with sequences |
|
Output file with alignment |
|
Sequence type |
|
Output format |
|
Perform alignment |
|
Calculate phylogenetic tree |
|
Number of bootstraps |
Alignment with Specific Parameters
#!/bin/bash
#SBATCH -J clustalw_params
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 02:00:00
#SBATCH --mem=4G
export INPUT="sequences.fasta"
export OUTPUT="alignment.phy"
module load clustalw/2.1
job-nanny clustalw2 -infile=sequences.fasta \
-outfile=alignment.phy \
-output=phylip \
-type=PROTEIN \
-gapopen=10 \
-gapext=0.2 \
-pwgapext=0.1 \
-pwdnamatrix=iub
ClustalW with Profiles
To align sequences against an existing profile:
#!/bin/bash
#SBATCH -J clustalw_profile
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 02:00:00
#SBATCH --mem=4G
export INPUT="new_sequences.fasta existing_profile.aln"
export OUTPUT="profile_alignment.aln"
module load clustalw/2.1
job-nanny clustalw2 -infile=new_sequences.fasta \
-profile1=existing_profile.aln \
-outfile=profile_alignment.aln
Job Array for Multiple Alignments
#!/bin/bash
#SBATCH -J clustalw_array
#SBATCH --array=1-10
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 02:00:00
#SBATCH --mem=4G
FILES=(
"gene1.fasta"
"gene2.fasta"
"gene3.fasta"
"gene4.fasta"
"gene5.fasta"
"gene6.fasta"
"gene7.fasta"
"gene8.fasta"
"gene9.fasta"
"gene10.fasta"
)
INPUT_FILE=${FILES[$SLURM_ARRAY_TASK_ID-1]}
OUTPUT_FILE="aln_${INPUT_FILE%.fasta}.aln"
export INPUT="$INPUT_FILE"
export OUTPUT="$OUTPUT_FILE"
module load clustalw/2.1
job-nanny clustalw2 -infile=$INPUT_FILE -outfile=$OUTPUT_FILE
References
ClustalW documentation: http://www.clustal.org/clustal2/
Clustal Omega: http://www.clustal.org/omega/
Tutorial: http://www.clustal.org/omega/ClustalO-1.2.4-QuickStart.html
See also
RAxML - Phylogenetic analysis
BEAST - Bayesian analysis
Running Simulations - How to submit jobs