#!/bin/bash
#SBATCH --job-name=mafft
#SBATCH --mem=64G
#SBATCH -c 2 #cores per task
#SBATCH -n 1 #tasks
#SBATCH -N 1 #nodes
#SBATCH -o slurm_output-mafft.%J
#SBATCH -e slurm_error-mafft.%J
#SBATCH -p main
#SBATCH --qos main
#SBATCH --mail-type=ALL
#SBATCH --mail-user=

for FILENAME in *.fas
do
/share/apps/src/mafft-7.427-with-extensions/scripts/mafft --auto --thread 2 $FILENAME > $FILENAME.mafft
rename $FILENAME $FILENAME.bak $FILENAME
rename $FILENAME.mafft $FILENAME $FILENAME.mafft
done

