9 use SGN::Test::Fixture;
13 my $f = SGN::Test::Fixture->new();
15 my $dbs = CXGN::DbStats->new( { dbh => $f->dbh() });
17 my $types = $dbs->trial_types();
19 my $trial_count_by_breeding_program = $dbs->trial_count_by_breeding_program();
21 my $phenotype_count_by_breeding_program = $dbs->phenotype_count_by_breeding_program();
23 my $traits = $dbs->traits();
25 is($traits->[0]->[1], 999, "spot check trait result");
27 print STDERR "Traits: ".Dumper($traits);
29 my $stocks = $dbs->stocks();
31 is($stocks->[0]->[1], 1955, "spot check stock result");
33 print STDERR "Stocks: ".Dumper($stocks);
35 my $projects = $dbs->projects();
37 is($projects, 30, "project check");
39 print STDERR "Projects: ".Dumper($projects);
41 my $activity = $dbs->activity();
43 print STDERR "Activity: ".Dumper($activity);
45 my $stock_stats = $dbs->stock_stats();
47 is($stock_stats->[0]->[1], 479, "stock stats check");
49 print STDERR "Stock stats: ".Dumper($stock_stats);
51 my $accession_count_by_breeding_program = $dbs->accession_count_by_breeding_program();
53 is($accession_count_by_breeding_program->[0]->[1], 45, "accession by breeding program test");
55 print STDERR "Accession_count : ".Dumper($accession_count_by_breeding_program);
57 my $accession_count_by_breeding_program_without_trials = $dbs->accession_count_by_breeding_program_without_trials();
59 is(scalar(@$accession_count_by_breeding_program_without_trials), 0, "accessions without trials");
61 print STDERR "Accession_count without trials: ".Dumper($accession_count_by_breeding_program_without_trials);
63 my $plot_count_by_breeding_program = $dbs->plot_count_by_breeding_program();
65 is($plot_count_by_breeding_program->[0]->[1], 5456, "plot count by breeding program check");
67 print STDERR "Plot count : ".Dumper($plot_count_by_breeding_program);
69 my $germplasm_count_with_pedigree = $dbs->germplasm_count_with_pedigree();
71 print STDERR "Germplasm count with pedigrees: ".Dumper($germplasm_count_with_pedigree);
73 my $germplasm_count_with_phenotypes = $dbs->germplasm_count_with_phenotypes();
75 print STDERR "Germplasm_count_with_phenotypes : ".Dumper($germplasm_count_with_phenotypes);
77 my $germplasm_count_with_genotypes = $dbs->germplasm_count_with_genotypes();
79 print STDERR "Germpalsm count with genotypes: ".Dumper($germplasm_count_with_genotypes);
81 my $phenotype_count_per_trial = $dbs->phenotype_count_per_trial();
83 print STDERR "PHenotype count per trial: ".Dumper($phenotype_count_per_trial);