$sth=$dbh->prepare("select * from super_clust where `species` = '$species_array[0]' or `species` = '$species_array[1]' or `species` = '$species_array[2]' or `species` = '$species_array[3]'");
}elsif ($species_array_size == 5) {
$sth=$dbh->prepare("select * from super_clust where `species` = '$species_array[0]' or `species` = '$species_array[1]' or `species` = '$species_array[2]' or `species` = '$species_array[3]' or `species` = '$species_array[4]'");
+}elsif ($species_array_size == 6) {
+$sth=$dbh->prepare("select * from super_clust where `species` = '$species_array[0]' or `species` = '$species_array[1]' or `species` = '$species_array[2]' or `species` = '$species_array[3]' or `species` = '$species_array[4]' or `species` = '$species_array[5]'");
}
my $rv = $sth->execute();
# variables needed for venn diagram printing
my %venn_hash;
+open(SUMMFILE, ">summary.txt");
print "\n\n";
foreach my $key (keys %count_hash) {
# print "$key\t$id\n";
#}
print "$key\t$id_array_size\t$gene_array_size\n";
+ print SUMMFILE "$key\t$id_array_size\t$gene_array_size\n";
# create the file to output the genes involved in each Venn set
$key =~ s/\t/__/g; # replace the \t in the filename with two working spaces
print "\nFor species $species_array[$i], there were $species_count unique clusters with $species_gene_count genes from $species_gene_model_count genes in the fasta file\n";
+ print SUMMFILE "\nFor species $species_array[$i], there were $species_count unique clusters with $species_gene_count genes from $species_gene_model_count genes in the fasta file\n";
# make the text to put on the venn diagram
my $j = $i + 1;
$sth_get_total_species_count->execute();
my $tot_species_count = $sth_get_total_species_count->fetchrow_array();
print "\nTotal number of clusters across all species was $tot_count across $tot_species_count species\n";
+print SUMMFILE "\nTotal number of clusters across all species was $tot_count across $tot_species_count species\n";
my $tot_count_clusters = keys %clust_hash;
print "\nTotal number of clusters among the $species_array_size species = $tot_count_clusters\n";
+print SUMMFILE "\nTotal number of clusters among the $species_array_size species = $tot_count_clusters\n";
# make the strings to store this info to put on the figure
my $formatted_tot_count = format_number($tot_count);