Question: automation of shell script where I want to change filename after every result
0
gravatar for shalinikaushik1293
7 months ago by
shalinikaushik12930 wrote:

Hello everyone

I want to run the pGenThreader script for a 7,000 proteins but for that I need to replace the protein file after every result of previous protein. I need to automate the script. If anyone can help me with this.

The pGenThreader script is

#JOB name 
JOB=testing
#input file
FSA=/media/kakarot/ppi/unmodelled_fasta_1/NP_000496.fasta
#path to psiblast
PSIB=/media/kakarot/ppi/ncbi/ncbi-blast-2.9.0+/bin
# MAT=/media/kakarot/ppi/ncbi/blast-2.2.26/bin
#path to database
DB=/media/kakarot/ppi/genthreader/uniref_test_db/uniref100.fasta
#path to PSIPRED data files
PDATA=/media/kakarot/ppi/psipred/data 
#path to pGenTHREADER data files
DATA=/media/kakarot/ppi/genthreader/data
#path to PGenThreader binary directory
PGT=/media/kakarot/ppi/genthreader/bin
#path to PSIPRED binary directory
PSIP=/media/kakarot/ppi/psipred/bin
#path to fold library
TDB=/media/kakarot/ppi/genthreader/tdb/cath_domain_tdb
#TDB=/scratch0/NOT_BACKED_UP/dbuchan/tdb
echo "started again"
make a masked copy of input file
$PSIP/pfilt -b $FSA > $JOB.fsa
cp $FSA $JOB.fsa
export TDB_DIR=$TDB
export THREAD_DIR=/media/kakarot/ppi/genthreader/data

The fouth line in the script needs to change the file name after every run for last protein.

 FSA=/media/kakarot/ppi/unmodelled_fasta_1/NP_000496.fasta
shell automation • 193 views
ADD COMMENTlink modified 9 weeks ago by Biostar ♦♦ 20 • written 7 months ago by shalinikaushik12930

First, why do you have these lines ?

$PSIP/pfilt -b $FSA > $JOB.fsa
cp $FSA $JOB.fsa

Aren't you just overwriting the output of $PSIP/pfilt ?

Can you state exactly what you want to do instead of copy-pasting their script from github ? Whats the input data and what are you expecting and what you want to change ?

ADD REPLYlink modified 7 months ago • written 7 months ago by geek_y11k
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: 2198 users visited in the last hour