Skip to content

Commit

Permalink
only rerun failed annotation 3 times
Browse files Browse the repository at this point in the history
  • Loading branch information
fei0810 committed May 10, 2021
1 parent 7c43e7e commit 19587bb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions tritimap/scripts/format_blastout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,16 @@ for j in $(ls ${dir}/temp.blast.${name}split/*.fasta); do
if [ ! -f "${j}.out.txt" ]; then
echo $j
python $blastpath --email $email --stype dna --program blastn --database $database --outformat out,json --outfile ${j} $j
#TODO Control the number of cycle runs
while [ $? -ne 0 ]; do
echo "rerun"
python $blastpath --email $email --stype dna --program blastn --database $database --outformat out,json --outfile ${j} $j
k=0
while ((++k)); do
if ((k > 3)); then
echo "blast ${j} failed"
break
fi
echo "rerun"
python $blastpath --email $email --stype dna --program blastn --database $database --outformat out,json --outfile ${j} $j
done
done
echo "blast ${j} done"
shuf -i 2-5 -n1 | xargs sleep
Expand Down
12 changes: 9 additions & 3 deletions tritimap/scripts/format_pfamout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,16 @@ for j in $(ls ${dir}/temp.pfam.${name}long.pep.split/*.pep); do
if [ ! -f "${j}.out.txt" ]; then
echo $j
python $scanpath --email $email --database pfam --outformat out,sequence --outfile ${j} --sequence $j
#TODO Control the number of cycle runs
while [ $? -ne 0 ]; do
echo "rerun"
python $scanpath --email $email --database pfam --outformat out,sequence --outfile ${j} --sequence $j
k=0
while ((++k)); do
if ((k > 3)); then
echo "pfam ${j} failed"
break
fi
echo "rerun"
python $scanpath --email $email --database pfam --outformat out,sequence --outfile ${j} --sequence $j
done
done
echo "pfam ${j} done"
shuf -i 2-5 -n1 | xargs sleep
Expand Down

0 comments on commit 19587bb

Please sign in to comment.