| 1 | #!/bin/bash |
| 2 | # check if all files for utr-training are there before train with utr-modell |
| 3 | |
| 4 | workDir=$1 |
| 5 | |
| 6 | # check if augustus.gff and augustus.gtf exist, make augustus.gtf if it's possible and necessary |
| 7 | |
| 8 | cd ${workDir}/predictions/hints.E.1 |
| 9 | |
| 10 | if [ ! -f augustus.gff ] |
| 11 | |
| 12 | then |
| 13 | echo "Can not find the file ${workDir}/predictions/hints.E.1/augustus.gff" |
| 14 | exit 1 |
| 15 | |
| 16 | elif [ ! -f augustus.gtf ] |
| 17 | |
| 18 | then |
| 19 | grep AUGUSTUS augustus.gff > augustus.gtf |
| 20 | fi |
| 21 | |
| 22 | # check if ${workDir}/seq/genome.fa exists |
| 23 | |
| 24 | cd ${workDir} |
| 25 | |
| 26 | cd ${workDir}/seq |
| 27 | |
| 28 | if [ ! -f genome.fa ] |
| 29 | |
| 30 | then |
| 31 | echo "Can not find the file ${workDir}/seq/genome.fa." |
| 32 | exit 2 |
| 33 | fi |
| 34 | |
| 35 | # check if cdna.f.psl exists |
| 36 | |
| 37 | cd ${workDir}/cdna/alignments |
| 38 | |
| 39 | if [ ! -f cdna.f.psl ] |
| 40 | |
| 41 | then |
| 42 | echo "Can not find the file ${workDir}/cdna/alignments/cdna.f.psl" |
| 43 | exit 3 |
| 44 | fi |
| 45 | |
| 46 | # check if training.gb.train.test and training.gb.onlytrain exist |
| 47 | |
| 48 | cd ${workDir}/training |
| 49 | |
| 50 | if [ ! -f training.gb.train.test ] |
| 51 | |
| 52 | then |
| 53 | echo "Can not find ${workDir}/training/training.gb.train.test" |
| 54 | exit 4 |
| 55 | |
| 56 | elif [ ! -f training.gb.onlytrain ] |
| 57 | |
| 58 | then |
| 59 | echo "Can not find ${workDir}/training/training.gb.onlytrain" |
| 60 | exit 5 |
| 61 | fi |
| 62 | |
| 63 | # if no error, exit with 6 |
| 64 | |
| 65 | exit 6 |
| 66 | |
| 67 | |
| 68 |