Kalign is a fast multiple sequence alignment program for biological sequences.
Allocate an interactive session and run the program.
Sample session (user input in bold):
[user@biowulf]$ sinteractive salloc.exe: Pending job allocation 46116226 salloc.exe: job 46116226 queued and waiting for resources salloc.exe: job 46116226 has been allocated resources salloc.exe: Granted job allocation 46116226 salloc.exe: Waiting for resource configuration salloc.exe: Nodes cn3144 are ready for job [user@cn3144 ~]$ module load kalign [user@cn3144 ~]$ kalign -f fasta -i $KALIGN_HOME/test/small.fa -o out.afa Kalign (3.4.0) Copyright (C) 2006,2019,2020,2021,2023 Timo Lassmann This program comes with ABSOLUTELY NO WARRANTY; for details type: `kalign -showw'. This is free software, and you are welcome to redistribute it under certain conditions; consult the COPYING file for details. Please cite: Lassmann, Timo. "Kalign 3: multiple sequence alignment of large data sets." Bioinformatics (2019) https://doi.org/10.1093/bioinformatics/btz795 [2024-08-23 17:47:26] : LOG : Detected DNA sequences. [2024-08-23 17:47:26] : LOG : Read 17 sequences from /usr/local/apps/kalign/3.4.0/test/small.fa. [2024-08-23 17:47:26] : LOG : CPU Time: 0.00u 00:00:00.00 Elapsed: 00:00:00.00 [2024-08-23 17:47:26] : LOG : Calculating pairwise distances [2024-08-23 17:47:26] : LOG : CPU Time: 0.00u 00:00:00.00 Elapsed: 00:00:00.00 [2024-08-23 17:47:26] : LOG : Building guide tree. [2024-08-23 17:47:26] : LOG : CPU Time: 0.00u 00:00:00.00 Elapsed: 00:00:00.00 [2024-08-23 17:47:26] : LOG : Aligning [2024-08-23 17:47:26] : LOG : CPU Time: 0.00u 00:00:00.00 Elapsed: 00:00:00.00 [user@cn3144 ~]$ exit salloc.exe: Relinquishing job allocation 46116226 [user@biowulf ~]$
Create a batch input file (e.g. kalign.sh). For example:
#!/bin/bash set -e module load kalign kalign -f fasta -i $KALIGN_HOME/test/small.fa -o out.afa
Submit this job using the Slurm sbatch command.
sbatch [--cpus-per-task=#] [--mem=#] kalign.sh
Create a swarmfile (e.g. kalign.swarm). For example:
kalign -f fasta -i set1.fa -o set1.afa kalign -f fasta -i set2.fa -o set2.afa kalign -f fasta -i set3.fa -o set3.afa kalign -f fasta -i set4.fa -o set4.afa
Submit this job using the swarm command.
swarm -f kalign.swarm [-g #] [-t #] --module kalignwhere
-g # | Number of Gigabytes of memory required for each process (1 line in the swarm command file) |
-t # | Number of threads/CPUs required for each process (1 line in the swarm command file). |
--module kalign | Loads the Kalign module for each subjob in the swarm |