4 qtl_analysis.t - tests for cgi-bin/phenome/qtl_analysis.pl. This page takes 2 - 4 min to run R computations.
8 Tests for cgi-bin/phenome/qtl_analysis.pl
17 use SGN::Test::WWW::Mechanize;
20 my $mech = SGN::Test::WWW::Mechanize->new;
23 '/phenome/qtl_analysis.pl?population_id=12&cvterm_id=39945',
24 ' got a qtl_analysis.pl page. (In case of failure, try to run it again. Takes 2 - 4 min to run R computations)' );
26 $mech->content_contains($_)
30 'Phenotype Frequency Distribution',
32 'Literature Annotation',
38 my @qtl_images = $mech->find_all_images(alt_regex => qr/chromosome/i );
39 cmp_ok( scalar(@qtl_images), '>=', 12, 'got 12 or more qtl map images' );
41 $mech->content_contains( 'lines', 'frequency distribution plot generated');
42 $mech->content_contains( 'Trait data', 'Phenotype data table generated');
43 $mech->content_contains( 'Abstract', 'abstract content');
44 $mech->content_contains( 'QTL genotype probability method', 'Legend for QTL map: key');
45 $mech->content_contains( 'Based on 95%', 'Legend for QTL map: value');
46 $mech->content_contains( 'Abstract', 'abstract content for qtl pub');
47 $mech->content_contains( 'Standard deviation', 'descriptive statistics for trait phenotype data');
50 my $phenotype_download_link =
51 $mech->find_link( text_regex => qr/phenotype data/i );
52 ok( $phenotype_download_link, 'got a phenotype data download link' );
54 $mech->links_ok( $phenotype_download_link->url,
55 'phenotype data download link works' );
57 cmp_ok( length( $mech->content ),
59 'got at least 1KB of data from the phenotype data download' );
61 my $genotype_download_link =
62 $mech->find_link( text_regex => qr/genotype data/i );
64 ok( $genotype_download_link, 'got a genotype data download link' );
66 $mech->links_ok($genotype_download_link->url,
67 'genotype data download link works' );
69 cmp_ok( length( $mech->content ),
71 'got at least 1KB of data from the genotype data download' );