annotate tests.sh @ 12:ff01d4263391 draft

"planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
author petr-novak
date Thu, 21 Jul 2022 08:23:15 +0000
parents c33d6583e548
children 559940c04c44
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
1 #!/bin/bash
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
2 # set to stop in case of error
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
3 set -e
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
4 # first argument is cpu number
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
5 NCPU_TO_USE=$1
12
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
6
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
7 # test if NCPU_TO_USE is set:
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
8 if [ -z "${NCPU_TO_USE}" ]; then
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
9 echo "NCPU_TO_USE is not set, using 10"
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
10 NCPU_TO_USE=10
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
11 fi
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
12
7
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
13 eval "$(conda shell.bash hook)"
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
14 conda activate dante_ltr
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
15 echo "Running tests 1, detection of LTRs"
12
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
16 ./detect_putative_ltr.R -s test_data/sample_genome.fasta \
7
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
17 -g test_data/sample_DANTE.gff3 -o tmp/test_output1 -c $NCPU_TO_USE
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
18
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
19
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
20 cat tmp/test_output1_statistics.csv
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
21
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
22 echo "Running tests 2, filtering gff"
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
23 ./clean_ltr.R -g tmp/test_output1.gff3 -s test_data/sample_genome.fasta \
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
24 -o tmp/test_output2 -c $NCPU_TO_USE
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
25
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
26 echo "Running tests 3, detection of LTRs, allow missing domains"
12
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
27 ./detect_putative_ltr.R -s test_data/sample_genome.fasta \
7
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
28 -g test_data/sample_DANTE.gff3 -o tmp/test_output3 -c $NCPU_TO_USE -M 2
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
29
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
30
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
31 cat tmp/test_output3_statistics.csv
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
32
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
33 echo "Running tests 4, filtering gff"
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
34 ./clean_ltr.R -g tmp/test_output3.gff3 -s test_data/sample_genome.fasta \
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
35 -o tmp/test_output4 -c $NCPU_TO_USE
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
36
c33d6583e548 "planemo upload commit 50884f7f0269a0bbde078f24fe5020975693bcd9"
petr-novak
parents:
diff changeset
37
12
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
38 echo "Running tests 5, detection of LTRs using python wrapper"
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
39 ./detect_putative_ltr_wrapper.py -s test_data/sample_genome.fasta \
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
40 -g test_data/sample_DANTE.gff3 -o tmp/test_output5 -c $NCPU_TO_USE \
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
41 -S 10000000
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
42 cat tmp/test_output5_statistics.csv
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
43
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
44 echo "Running tests 4, filtering gff"
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
45 ./clean_ltr.R -g tmp/test_output5.gff3 -s test_data/sample_genome.fasta \
ff01d4263391 "planemo upload commit 414119ad7c44562d2e956b765e97ca113bc35b2b-dirty"
petr-novak
parents: 7
diff changeset
46 -o tmp/test_output6 -c $NCPU_TO_USE