-
Notifications
You must be signed in to change notification settings - Fork 1
/
Clustal_All.sh
26 lines (23 loc) · 939 Bytes
/
Clustal_All.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
#Clustal_all will perform clustal omega on all FASTA files in a given input directory
#The input directory is provided as the first argument passed to the script.
#Directory must be specified with a forward slash at the end for the script to run properly.
INDIR=$1
OUTDIR=$2
SUFFIX=$3
for FILE in $INDIR*
do
#Slice filename between "/" and "_" to yield protein name
PROTEIN=${FILE##*/}
PROTEIN=${PROTEIN%%_*}
echo "Protein: ${PROTEIN}"
echo "Input file: $FILE"
#Forming new filename: use the output directory, the protein name, and the suffix (download date)
OUTPUT="${OUTDIR}${PROTEIN}_${SUFFIX}_msa.fasta"
echo "Output file: $OUTPUT"
echo ""
#Perform Clustal Omega with three iterations
echo "Performing Clustal Omega on ${PROTEIN}:"
time clustalo -i $FILE -t Protein --infmt fa -o $OUTPUT --outfmt fa -v --iter=3
echo "--------------------------------------------------------------------------------"
done