Hello!

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

Note that updates take place every 10 minutes, commits may not be seen immediately.
Add ability to do 6 (won't create diagram)
authorelserj <elserj@localhost>
Wed, 21 Apr 2021 20:06:04 +0000 (20:06 +0000)
committerelserj <elserj@localhost>
Wed, 21 Apr 2021 20:06:04 +0000 (20:06 +0000)
svn path=/; revision=681

interactome_scripts/create_venn_diagram.pl

index fb944956a1fcbf5b2e2183c4243826678d40961b..bacb99fcff279ff454869d0b18f19a0d6d688ccd 100755 (executable)
@@ -60,6 +60,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]' 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]'");
+}elsif ($species_array_size == 7) {
+$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]' or `species` = '$species_array[6]'");
 }
 
 my $rv = $sth->execute();
@@ -156,7 +158,7 @@ foreach my $key (keys %count_hash) {
        #}
        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
        my $fh = "genes_$key";
@@ -524,6 +526,7 @@ if($species_array_size == 5) {
                my @spec_145_pos = (405,405);
                my @spec_234_pos = (580,468);
                my @spec_235_pos = (540,300);
+               my @spec_245_pos = (530,525);
                my @spec_345_pos = (470,505);
                 
                $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_123_pos[0],$spec_123_pos[1],"$venn_hash{spec_123_count}");
@@ -534,6 +537,7 @@ if($species_array_size == 5) {
                $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_145_pos[0],$spec_145_pos[1],"$venn_hash{spec_145_count}");
                $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_234_pos[0],$spec_234_pos[1],"$venn_hash{spec_234_count}");
                $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_235_pos[0],$spec_235_pos[1],"$venn_hash{spec_235_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_245_pos[0],$spec_245_pos[1],"$venn_hash{spec_245_count}");
                $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_345_pos[0],$spec_345_pos[1],"$venn_hash{spec_345_count}");
                 
                # 4 species combinations
@@ -557,7 +561,7 @@ if($species_array_size == 5) {
 
 # convert the image to PNG and print it
 
-open (TESTOUT, ">test.png") || die;
+open (TESTOUT, ">venn_diagram.png") || die;
 my $png_data = $img->png;
 binmode TESTOUT;
 print TESTOUT $png_data;