Merge pull request #5248 from solgenomics/topic/batch_update_trials
[sgn.git] / t / legacy / integration / tools / sigpep_find.t
blob385ff2ea1e0bd084973678b9def1e29e376814ce
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4 use English;
6 use Test::More tests => 11;
8 use lib 't/lib';
9 use SGN::Test::WWW::Mechanize;
11 my @invalid_seqs =
12 ( [ 'SGN-U409494-translated',
13 'MGRMNGNPSARKSKGGEYLYDLCFLPFDSADQIGGIILYCCVGLSSFLASSLSASSSSRMSFENAPGFAFIQFCRATKGWTQSEPXKRVD
14 TIRALFFCRAFEETEESTRELSTTGAVPQMSNARAVQGFLSLPSRDSFSSSAPYAAASAIKESREGCGEGDWGVGAVAVAAAVDEFDPPR
15 RHLPSRSGSALDP*'
17 [ 'SGN-U442055-translated',
18 'TPHAAAEDILFFAQHSAGTENAAVIKQRLGSLRKKSGHETANXAAVKIIVAIIPNLXAAWAYYQVNDLLQFQSKRWLSKLNFVRDKQNVF
19 LHWIMQRKVNHLSLLIVNLMGNDHGCVIFISVLAFEVVYASLNPVMTNYSEIELDEPIRRPNIVDEAAKTAASQHLTPPISDRKSWGQPK
20 YFTCWSIENSLSTDTVGVRFAYYLSFPHPX ',
24 my @no_hits_seqs =
25 (['SGN-U569791','VIRQFILSVLRTYTFFSFSLSECGQIMSLKNRERPTESIILNKETEGSCINTSENSSEI'],
28 my $input_page = "/tools/sigpep_finder/input.pl";
30 my $mech = SGN::Test::WWW::Mechanize->new;
32 # single sequence submission, no ending newline
34 $mech->get_ok( $input_page );
36 # a few checks on the title
37 $mech->title_like( qr/Signal peptide finder/i, "Make sure we're on sigpep input page" );
39 # a few checks on the content
40 $mech->content_contains( "HMMER", "mentions HMMER" );
42 $mech->submit_form_ok({ form_name => 'sigseq_form',
43 fields =>
45 sequences => ">$invalid_seqs[0]->[0]\n$invalid_seqs[0]->[1]",
46 display_opt => 'filter',
47 # use_eval_cutoff => 1,
48 # eval_cutoff => 2,
49 # use_bval_cutoff => 1,
50 # bval_cutoff => 0,
53 'submit a single sequence',
56 $mech->content_like( qr/illegal character/i, "mentions illegal characters" );
57 $mech->content_like( qr/re-enter input/i, "says to re-enter input" );
60 #submit a valid sequence
61 $mech->get_ok( $input_page );
62 $mech->submit_form_ok({ form_name => 'sigseq_form',
63 fields =>
65 sequences => ">$no_hits_seqs[0]->[0]\n$no_hits_seqs[0]->[1]\n\n",
66 display_opt => 'filter',
67 # use_eval_cutoff => 1,
68 # eval_cutoff => 2,
69 # use_bval_cutoff => 1,
70 # bval_cutoff => 0,
73 'submit a single sequence',
76 $mech->content_like( qr/no hits/i, "mentions no hits" );
77 $mech->content_like( qr/Results/i, "mentions results" );
78 $mech->content_like( qr/histogram/i, "mentions histogram" );