bash script to run clustalw and fetching sequences
1
0
Entering edit mode
9.9 years ago
Biocode_user ▴ 30

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 • 3.5k views
ADD COMMENT
2
Entering edit mode
9.9 years ago
Ram 44k

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
# ---------------------------here--^
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 COMMENT

Login before adding your answer.

Traffic: 2201 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6