forked from eead-csic-compbio/get_homologues
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_get_homologues.t
90 lines (59 loc) · 4.09 KB
/
test_get_homologues.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
use strict;
use warnings;
use Test::More tests => 30;
use lib "lib";
use lib "lib/bioperl-1.5.2_102/";
BEGIN { use_ok('ForkManager') };
BEGIN { use_ok('HPCluster') };
BEGIN { use_ok('phyTools') };
BEGIN { use_ok('marfil_homology') };
my ($testR,$testSP) = (0,0);
if(defined($ARGV[0])){
if($ARGV[0] eq 'testR'){ $testR = 1 }
elsif($ARGV[0] eq 'swiss'){ $testSP = 1 }
}
ok( eval{ `perl ./add_pancore_matrices.pl ` } =~ /\[options\]/ , 'add_pancore_matrices.pl' );
ok( eval{ `perl ./add_pangenome_matrices.pl` } =~ /\[options\]/ , 'add_pangenome_matrices.pl' );
ok( eval{ `perl ./check_BDBHs.pl` } =~ /this message/ , 'check_BDBHs.pl' );
ok( eval{ `perl ./_cluster_makeHomolog.pl` } =~ /\[options\]/ , '_cluster_makeHomolog.pl' );
ok( eval{ `perl ./_cluster_makeInparalog.pl` } =~ /\[options\]/ , '_cluster_makeInparalog.pl' );
ok( eval{ `perl ./_cluster_makeIsoform.pl` } =~ /\[options\]/ , '_cluster_makeIsoform.pl' );
ok( eval{ `perl ./_cluster_makeOrtholog.pl` } =~ /\[options\]/ , '_cluster_makeOrtholog.pl' );
ok( eval{ `perl ./download_genomes_ncbi.pl test` } =~ /\$NCBIHOST ok/ , 'download_genomes_ncbi.pl test' );
ok( eval{ `perl ./install.pl test` } =~ /testing only/ , 'install.pl test' );
ok( eval{ `perl ./make_nr_pangenome_matrix.pl` } =~ /\[options\]/ , 'make_nr_pangenome_matrix.pl' );
ok( eval{ `perl ./pfam_enrich.pl` } =~ /\[options\]/ , 'pfam_enrich.pl' );
ok( eval{ `perl ./plot_pancore_matrix.pl` } =~ /\[options\]/ , 'plot_pancore_matrix.pl' );
ok( eval{ `perl ./_split_blast.pl` } =~ /Usage/ , '_split_blast.pl' );
ok( eval{ `perl ./_split_hmmscan.pl` } =~ /Usage/ , '_split_hmmscan.pl' );
ok( eval{ `perl ./transcripts2cds.pl` } =~ /\[options\]/ , 'transcripts2cds.pl' );
# implicitly tests modules in libs/est/
if($testSP){
ok( eval{ `perl ./transcripts2cdsCPP.pl sample_cluster.fna` } =~ /sample_cluster.fna_l50_E1e-05.cds/ , 'transcripts2cdsCPP.pl' );
} else {
ok( eval{ `perl ./transcripts2cdsCPP.pl` } =~ /\[options\]/ , 'transcripts2cdsCPP.pl' );
# requires optional module Inline::CPP
}
ok( eval{ `perl ./get_homologues-est.pl -v ` } =~ /Checking required binaries/ , 'get_homologues-est.pl -v' );
ok( eval{ `perl ./get_homologues-est.pl -d sample_transcripts_fasta -m dryrun` } =~ /check the list of pending commands/ , 'get_homologues-est.pl -dryrun' );
ok( eval{ `perl ./get_homologues.pl -d sample_plasmids_gbk -M -t 0` } =~ /number_of_clusters = 19\d+/, 'get_homologues.pl -d sample_plasmids_gbk -M' );
ok( eval{ `perl ./get_homologues.pl -d sample_plasmids_gbk -G -t 0` } =~ /number_of_clusters = 19\d+/, 'get_homologues.pl -d sample_plasmids_gbk -G' );
ok( eval{ `perl ./compare_clusters.pl -d sample_plasmids_gbk_homologues/UnculturedbacteriumplasmidpRSB203_f0_0taxa_algOMCL_e0_,sample_plasmids_gbk_homologues/UnculturedbacteriumplasmidpRSB203_f0_0taxa_algCOG_e0_ -o sample_intersection -m` } =~ /pangenome_matrix_t0.tab/ , 'compare_clusters.pl ' );
ok( eval{ `perl ./parse_pangenome_matrix.pl -m sample_intersection/pangenome_matrix_t0.tab -s` } =~ /sample_intersection\/pangenome_matrix_t0__shell.png/, 'parse_pangenome_matrix.pl -s' );
# requires module GD and package libgd-dev
ok( eval{ `perl ./parse_pangenome_matrix.pl -m sample_intersection/pangenome_matrix_t0.tab -A sample_plasmids_gbk/A.txt -B sample_plasmids_gbk/B.txt -g -p 'Klebsiella oxytoca KOX105'` } =~ /chromosome\/contig/, 'parse_pangenome_matrix.pl -p' );
# uses lib/mview
ok( eval{ `perl ./annotate_cluster.pl -f sample_cluster.fna -b 2>&1` } =~ /taxa included in alignment: 14/, 'annotate_cluster.pl -f sample_cluster -b' );
# require R dependencies
if($testR == 1){
ok( eval{ `bash ./hcluster_pangenome_matrix.sh -i sample_intersection/pangenome_matrix_t0.tab 2>&1` } =~
/heatmap.pdf was generated/ , 'hcluster_pangenome_matrix.sh -i ' );
} else {
ok( eval{ `bash ./hcluster_pangenome_matrix.sh` } =~ /synopsis/ , 'hcluster_pangenome_matrix.sh' );
}
if($testR == 1){
ok( eval{ `bash ./plot_matrix_heatmap.sh -i sample_intersection/pangenome_matrix_t0.tab -o pdf 2>&1` } =~
/heatmap.pdf was produced/ , 'plot_matrix_heatmap.sh -i' );
} else {
ok( eval{ `bash ./plot_matrix_heatmap.sh` } =~ /synopsis/ , 'plot_matrix_heatmap.sh' );
}