Provean Sus scrofa

From HPCwiki
Revision as of 11:53, 27 December 2013 by Megen002 (talk | contribs) (Created page with "<source lang='bash'> !/bin/bash #SBATCH --time=4800 #SBATCH --ntasks=1 #SBATCH --mem-per-cpu=16000 #SBATCH --nice=1000 #SBATCH --output=output_%j.txt #SBATCH --error=error_out...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<source lang='bash'> !/bin/bash

  1. SBATCH --time=4800
  2. SBATCH --ntasks=1
  3. SBATCH --mem-per-cpu=16000
  4. SBATCH --nice=1000
  5. SBATCH --output=output_%j.txt
  6. SBATCH --error=error_output_%j.txt
  7. SBATCH --job-name=Provean
  8. SBATCH --partition=ABGC_Research
  9. cat outVEP_*.txt | awk '$11~/\//' | sed 's/:/\t/' | sort -k6 >prot_alt.txt

TELLER=100 echo $TELLER; let TELLER+=1; echo $TELLER; while [ $TELLER -gt 99 ]; do

 PROVS=`squeue | grep Provean | sed 's/^ \+//' | sed 's/ \+/\t/' | cut -f1`;
 for PROV in $PROVS; do scancel $PROV; done;
 sleep 10;
 for i in `seq 1 2`; do ssh fat00$i 'rm -rf /tmp/provean*'; done;
 for i in `seq 10 60`; do ssh node0$i 'rm -rf /tmp/provean*'; done;
 for i in `seq 1 9`; do ssh node00$i 'rm -rf /tmp/provean*'; done;
 TRANS=`cat prot_alt.txt | head -15000 | cut -f6 | sort | uniq`;
 TELLER2=0;
 for TRAN in $TRANS; do
    if [ $TELLER2 -lt 300 ]; then
      echo "transcript: $TRAN";
      echo "teller boven: $TELLER2";
      PROT=`cat /lustre/nobackup/WUR/ABGC/shared/public_data_store/genomes/pig/Ensembl74/pep/Sus_scrofa.Sscrofa10.2.74.pep.all.fa | grep $TRAN | sed 's/ \+/\t/g' | sed 's/^>//' | cut -f1`;
      echo "protein: $PROT";
      if [ -f $PROT.sss ];
       then
         echo "$PROT $TRAN already done";
       else
         echo "will do sbatch testProvean_sub.sh $TRAN'";
         sbatch testProvean_sub.sh $TRAN;
         let TELLER2+=1;
         echo "teller onder: $TELLER2";
      fi;
   fi;
 done;
 sleep 3600;

done

</source>