automation of shell script where I want to change filename after every result
0
0
Entering edit mode
4.6 years ago

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 • 899 views
ADD COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 2476 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