Hello!

To see the file structure, click on "tree".

Note that updates take place every 10 minutes, commits may not be seen immediately.
Add db handler for 6 species, will not draw venn diagram, just generate data. Also...
authorelserj <elserj@localhost>
Thu, 30 Apr 2020 17:00:58 +0000 (17:00 +0000)
committerelserj <elserj@localhost>
Thu, 30 Apr 2020 17:00:58 +0000 (17:00 +0000)
svn path=/; revision=677

interactome_scripts/create_venn_diagram.pl

index 6e19896ee08b8ee5eca8ed062e855ffdfe6b0b75..fb944956a1fcbf5b2e2183c4243826678d40961b 100755 (executable)
@@ -58,6 +58,8 @@ $sth=$dbh->prepare("select * from super_clust where `species` = '$species_array[
 $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();
@@ -137,6 +139,7 @@ foreach my $clust_id (keys %clust_hash) {
 # variables needed for venn diagram printing
 my %venn_hash;
 
+open(SUMMFILE, ">summary.txt");
 
 print "\n\n";
 foreach my $key (keys %count_hash) {
@@ -152,6 +155,7 @@ 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
@@ -205,6 +209,7 @@ for (my $i = 0; $i < $species_array_size; $i++) {
                
                
                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;
@@ -254,10 +259,12 @@ my $sth_get_total_species_count=$dbh->prepare("select count(distinct species) fr
 $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);