Question: bash script to run clustalw and fetching sequences
0
gravatar for Biocode_user
5.9 years ago by
Biocode_user20
Sweden
Biocode_user20 wrote:

Hello,
I'm trying to run a bash script. I need to execute on all the files in the folder.
Here i'm posting the script
 #!/bin/bash
module bash load clustalw pal2nal exonerate
file_path="/dirname/"
source=`pwd`
dir=`mktemp -d` && cd $dir
for file in file_path;do
echo "processsing "$file" file";
ln -fs "$file" pep
clustalw -INFILE=pep -PWGAPOPEN=10 PWGAPEXT=1 > pep.out
extract_value.py pep.out
fastaindex pep pep.idx
fastafetch -f pep -i pep.idx -q sequence_lst -F > $source/$1pep.fa

rm -r $dir
done

When i run this i get processsing file_path file
Error: unknown option -wgapext.

My understanding is that it is not reading the files one by one at all.Any input will be appreciated. 
Thanks in advance

software error • 2.3k views
ADD COMMENTlink written 5.9 years ago by Biocode_user20
2
gravatar for RamRS
5.9 years ago by
RamRS30k
Baylor College of Medicine, Houston, TX
RamRS30k wrote:

You've missed a hyphen near PWGAPEXT:

#!/bin/bash
module bash load clustalw pal2nal exonerate
file_path="/dirname/"
source=`pwd`
dir=`mktemp -d` && cd $dir
for file in file_path;do
echo "processsing "$file" file";
ln -fs "$file" pep
clustalw -INFILE=pep -PWGAPOPEN=10 -PWGAPEXT=1 > pep.out
extract_value.py pep.out
fastaindex pep pep.idx
fastafetch -f pep -i pep.idx -q sequence_lst -F > $source/$1pep.fa

rm -r $dir
done
ADD COMMENTlink modified 5.9 years ago • written 5.9 years ago by RamRS30k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1952 users visited in the last hour