annotate testing.sh @ 0:a5f1638b73be draft

Uploaded
author petr-novak
date Wed, 26 Jun 2019 08:01:42 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
1 #!/bin/bash
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
2
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
3 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
4 test_data="$DIR/test_data"
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
5 classification_tbl='!!!! set up the path !!!!!'
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
6 pdb='!!! set up the path'
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
7
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
8 ######## Protein Domais Finder
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
9 ## single_seq, for/rev strand of mapping
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
10 $DIR/protein_domains_pd.py -q $test_data/GEPY_test_long_1 -pdb $pdb -cs $classification_tbl -dir $PWD/tmp/single_fasta/
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
11 ## multifasta
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
12 $DIR/protein_domains_pd.py -q $test_data/vyber-Ty1_01.fasta -pdb $pdb -cs $classification_tbl -dir $PWD/tmp/multifasta/
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
13 ## multifasta_win
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
14 $DIR/protein_domains_pd.py -q $test_data/vyber-Ty1_01.fasta -pdb $pdb -cs $classification_tbl -wd 3100 -od 1500 -dir $PWD/tmp/multifasta_win
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
15
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
16 ## testing if outputs are the same in case of using sliding window and not
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
17 if [[ $(diff $PWD/tmp/multifasta/output_domains.gff $PWD/tmp/multifasta_win/output_domains.gff) -eq 0 ]];then
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
18 echo "Testing output of sliding window comparing to no window accomplished sucessfuly"
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
19 else
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
20 echo "WARNING! There is difference between outputs of sliding window and no window used"
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
21 fi
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
22 ######## Protein Domains Filter
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
23 ## default params
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
24 $DIR/domains_filtering.py -dom_gff $PWD/tmp/single_fasta/output_domains.gff
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
25 if [[ -e $PWD/tmp/single_fasta/domains_filtered.gff ]] && [[ -e $PWD/tmp/single_fasta/dom_prot_seq.txt ]] ; then
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
26 echo -e "Filtered file and protein seqs file for default parameters exists"
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
27 else
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
28 echo -e "Filtered outputs for default parameters are missing"
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
29 fi
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
30 if [[ $(cat $PWD/tmp/single_fasta/domains_filtered.gff | wc -l) -gt 1 ]];then
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
31 echo "File was correctly filtered using default parameters"
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
32 fi
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
33 ## Ty1-RT filtering
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
34 $DIR/domains_filtering.py -dom_gff $PWD/tmp/multifasta/output_domains.gff -sd Ty1-RT
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
35 if [[ -e $PWD/tmp/multifasta/domains_filtered.gff ]] && [[ -e $PWD/tmp/multifasta/dom_prot_seq.txt ]]; then
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
36 echo -e "Filtered file and protein seqs file of Ty1-RT domains exist"
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
37 else
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
38 echo -e "Filtered outputs of Ty1-RT domains are missing"
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
39 fi
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
40 if [[ $(cat $PWD/tmp/multifasta/domains_filtered.gff | wc -l) -gt 1 ]];then
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
41 echo "File was correctly filtered for Ty1-RT domains"
a5f1638b73be Uploaded
petr-novak
parents:
diff changeset
42 fi