Hello!

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

Note that updates take place every 10 minutes, commits may not be seen immediately.
Change to using isoform_info from protein_sequences for a count of only canonical...
authorelserj <elserj@localhost>
Mon, 26 Aug 2019 22:41:36 +0000 (22:41 +0000)
committerelserj <elserj@localhost>
Mon, 26 Aug 2019 22:41:36 +0000 (22:41 +0000)
svn path=/; revision=666

interactome_scripts/create_venn_diagram.pl

index d9bb4ce973870121a0e548f534aafa1ee0796e1e..092debbd798029a370d33d0d0e9e0e84d15b7902 100755 (executable)
@@ -9,6 +9,8 @@ use Number::Format qw(:subs); # required for adding commas to numbers
 
 use lib "$ENV{HOME}/scripts/jaiswallab/interactome_scripts";
 
+my $venn_src_dir = "$ENV{HOME}/jaiswallab_svn/Personnel/elserj/venn_sources";
+
 use DbiFloret;
 
 print "User credentials for the supercluster database\n";
@@ -19,7 +21,12 @@ my $dbh = DbiFloret::dbconnect;
 print "User credentials for the protein sequences database\n";
 my $dbh_seq = DbiFloret::dbconnect;
 
-my @species_array = ("Aegilops_tauschii", "Hordeum_vulgare", "TmDV92", "TmG3116", "Triticum_urartu");
+# human_mouse_kangaroo_rat_platypus_beaver
+my @species_array = ("Arabidopsis_thaliana", "Cannabis_sativa.CRBRx", "Humulus_lupulus.primary", "Salvia_hispanica", "Vitis_vinifera");
+# beaver_human_mouse_rat_platypus
+#my @species_array = ("Castor_canadensis.brent.proteins", "Homo_sapiens", "Mus_musculus", "Ornithorhynchus_anatinus", "Rattus_norvegicus");
+# human_mouse_beaver_rabbit_ferret
+#my @species_array = ("Castor_canadensis.brent.proteins", "Homo_sapiens", "Mus_musculus", "Mustela_putorius.furo" , "Oryctolagus_cuniculus");
 #my @species_array = ("Aegilops_tauschii", "Hordeum_vulgare", "TmDV92", "TmG3116");
 #my @species_array = ("Aegilops_tauschii", "Hordeum_vulgare", "TmDV92");
 my $species_array_size = @species_array;
@@ -148,6 +155,8 @@ foreach my $key (keys %count_hash) {
                        }
        }
        my $count_string = $string . $sub_count_string . "_count";
+       if(!defined($id_array_size)) {$id_array_size = 0;}
+       if(!defined($gene_array_size)) {$gene_array_size = 0;}
        my $formatted_id_size = format_number($id_array_size);
        my $formatted_gene_size = format_number($gene_array_size);
        $formatted_gene_size = "($formatted_gene_size)";
@@ -174,8 +183,8 @@ for (my $i = 0; $i < $species_array_size; $i++) {
                my $species_gene_count = $sth_get_species_gene_count->fetchrow_array();
                
                my $safe_species_table = $dbh_seq->quote_identifier("$species_array[$i]");
-               my $sth_get_gene_model_count=$dbh_seq->prepare("select count(gene_id) from $safe_species_table");
-               $sth_get_gene_model_count->execute();
+               my $sth_get_gene_model_count=$dbh_seq->prepare("select canonical_genes from isoform_info where species like ?");
+               $sth_get_gene_model_count->execute($species_array[$i]);
                my $species_gene_model_count = $sth_get_gene_model_count->fetchrow_array();
                
                
@@ -185,6 +194,9 @@ for (my $i = 0; $i < $species_array_size; $i++) {
                my $j = $i + 1;
                my $det_string_line_1 = "spec_". $j . "_det_line_1";
                my $det_string = "spec_" . $j . "_det";
+               if(!defined($species_count)) {$species_count =0};
+               if(!defined($species_gene_count)) {$species_gene_count =0};
+               
                my $formatted_species = format_number($species_count);
                my $formatted_genes = format_number($species_gene_count);
                my $formatted_gene_model_count = format_number($species_gene_model_count);
@@ -248,7 +260,7 @@ my $img;
 if($species_array_size == 3) {
                
                # Open the venn diagram png file that already has the shapes
-               $img = newFromPng GD::Image('/home/justin/scripts/jaiswallab/Personnel/elserj/venn_sources/3_set_venn_source.png',1);
+               $img = newFromPng GD::Image("$venn_src_dir/3_set_venn_source.png",1);
                
                # make some colors
                my $white = $img->colorAllocateAlpha(255,255,255,127);
@@ -273,15 +285,15 @@ if($species_array_size == 3) {
                my $spec_3_det = "$venn_hash{spec_3_det_line_1}\n$venn_hash{spec_3_det}";
                
                
-               $img->stringFT($red,'/usr/share/fonts/truetype/arial.ttf',22,0,$spec_1_det[0],$spec_1_det[1],"$spec_1_det");
-               $img->stringFT($green,'/usr/share/fonts/truetype/arial.ttf',22,0,$spec_2_det[0],$spec_2_det[1],"$spec_2_det");
-               $img->stringFT($blue,'/usr/share/fonts/truetype/arial.ttf',22,0,$spec_3_det[0],$spec_3_det[1],"$spec_3_det");
+               $img->stringFT($red,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$spec_1_det[0],$spec_1_det[1],"$spec_1_det");
+               $img->stringFT($green,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$spec_2_det[0],$spec_2_det[1],"$spec_2_det");
+               $img->stringFT($blue,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$spec_3_det[0],$spec_3_det[1],"$spec_3_det");
                
                my @tot_clust = (100,600);
                my @tot = (600,650);
                
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',22,0,$tot_clust[0],$tot_clust[1],"$tot_clust_string");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',22,0,$tot[0],$tot[1],"$tot_string");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$tot_clust[0],$tot_clust[1],"$tot_clust_string");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$tot[0],$tot[1],"$tot_string");
                
                # species individual counts
                my @spec_1_pos = (320,440);
@@ -289,29 +301,29 @@ if($species_array_size == 3) {
                my @spec_3_pos = (650,440);
                
                
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_1_pos[0],$spec_1_pos[1],"$venn_hash{spec_1_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_2_pos[0],$spec_2_pos[1],"$venn_hash{spec_2_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_3_pos[0],$spec_3_pos[1],"$venn_hash{spec_3_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_1_pos[0],$spec_1_pos[1],"$venn_hash{spec_1_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_2_pos[0],$spec_2_pos[1],"$venn_hash{spec_2_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_3_pos[0],$spec_3_pos[1],"$venn_hash{spec_3_count}");
                
                # 2 species combinations
                my @spec_12_pos = (390,310);
                my @spec_13_pos = (490,465);
                my @spec_23_pos = (580,310);
                
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_12_pos[0],$spec_12_pos[1],"$venn_hash{spec_12_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_13_pos[0],$spec_13_pos[1],"$venn_hash{spec_13_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_23_pos[0],$spec_23_pos[1],"$venn_hash{spec_23_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_12_pos[0],$spec_12_pos[1],"$venn_hash{spec_12_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_13_pos[0],$spec_13_pos[1],"$venn_hash{spec_13_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_23_pos[0],$spec_23_pos[1],"$venn_hash{spec_23_count}");
                
                # 3 species combination
                my @spec_123_pos = (490,375);
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_123_pos[0],$spec_123_pos[1],"$venn_hash{spec_123_count}");
+               $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}");
 
 }
 
 if($species_array_size == 4) {
                
                # Open the venn diagram png file that already has the shapes
-               $img = newFromPng GD::Image('/home/justin/scripts/jaiswallab/Personnel/elserj/venn_sources/4_set_venn_source.png',1);
+               $img = newFromPng GD::Image("$venn_src_dir/4_set_venn_source.png",1);
                
                # make some colors
                my $white = $img->colorAllocateAlpha(255,255,255,127);
@@ -340,16 +352,16 @@ if($species_array_size == 4) {
                my $spec_3_det = "$venn_hash{spec_3_det_line_1}\n$venn_hash{spec_3_det}";
                my $spec_4_det = "$venn_hash{spec_4_det_line_1}\n$venn_hash{spec_4_det}";
                
-               $img->stringFT($gray,'/usr/share/fonts/truetype/arial.ttf',22,0,$spec_1_det[0],$spec_1_det[1],"$spec_1_det");
-               $img->stringFT($green,'/usr/share/fonts/truetype/arial.ttf',22,0,$spec_2_det[0],$spec_2_det[1],"$spec_2_det");
-               $img->stringFT($blue,'/usr/share/fonts/truetype/arial.ttf',22,0,$spec_3_det[0],$spec_3_det[1],"$spec_3_det");
-               $img->stringFT($salmon,'/usr/share/fonts/truetype/arial.ttf',22,0,$spec_4_det[0],$spec_4_det[1],"$spec_4_det");
+               $img->stringFT($gray,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$spec_1_det[0],$spec_1_det[1],"$spec_1_det");
+               $img->stringFT($green,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$spec_2_det[0],$spec_2_det[1],"$spec_2_det");
+               $img->stringFT($blue,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$spec_3_det[0],$spec_3_det[1],"$spec_3_det");
+               $img->stringFT($salmon,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$spec_4_det[0],$spec_4_det[1],"$spec_4_det");
                
                my @tot_clust = (170,800);
                my @tot = (950,850);
                
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',22,0,$tot_clust[0],$tot_clust[1],"$tot_clust_string");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',22,0,$tot[0],$tot[1],"$tot_string");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$tot_clust[0],$tot_clust[1],"$tot_clust_string");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$tot[0],$tot[1],"$tot_string");
                 
                # species individual counts
                my @spec_1_pos = (390,540);
@@ -357,10 +369,10 @@ if($species_array_size == 4) {
                my @spec_3_pos = (820,360);
                my @spec_4_pos = (1030,540);
                
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_1_pos[0],$spec_1_pos[1],"$venn_hash{spec_1_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_2_pos[0],$spec_2_pos[1],"$venn_hash{spec_2_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_3_pos[0],$spec_3_pos[1],"$venn_hash{spec_3_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_4_pos[0],$spec_4_pos[1],"$venn_hash{spec_4_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_1_pos[0],$spec_1_pos[1],"$venn_hash{spec_1_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_2_pos[0],$spec_2_pos[1],"$venn_hash{spec_2_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_3_pos[0],$spec_3_pos[1],"$venn_hash{spec_3_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_4_pos[0],$spec_4_pos[1],"$venn_hash{spec_4_count}");
                 
                # 2 species combinations
                my @spec_12_pos = (490,450);
@@ -371,12 +383,12 @@ if($species_array_size == 4) {
                my @spec_34_pos = (920,450);
                
                
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_12_pos[0],$spec_12_pos[1],"$venn_hash{spec_12_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_13_pos[0],$spec_13_pos[1],"$venn_hash{spec_13_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_14_pos[0],$spec_14_pos[1],"$venn_hash{spec_14_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_23_pos[0],$spec_23_pos[1],"$venn_hash{spec_23_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_24_pos[0],$spec_24_pos[1],"$venn_hash{spec_24_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_34_pos[0],$spec_34_pos[1],"$venn_hash{spec_34_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_12_pos[0],$spec_12_pos[1],"$venn_hash{spec_12_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_13_pos[0],$spec_13_pos[1],"$venn_hash{spec_13_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_14_pos[0],$spec_14_pos[1],"$venn_hash{spec_14_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_23_pos[0],$spec_23_pos[1],"$venn_hash{spec_23_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_24_pos[0],$spec_24_pos[1],"$venn_hash{spec_24_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_34_pos[0],$spec_34_pos[1],"$venn_hash{spec_34_count}");
                # 
                # 3 species combinations
                my @spec_123_pos = (620,570);
@@ -384,22 +396,22 @@ if($species_array_size == 4) {
                my @spec_134_pos = (815,570);
                my @spec_234_pos = (590,750);
                
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_123_pos[0],$spec_123_pos[1],"$venn_hash{spec_123_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_124_pos[0],$spec_124_pos[1],"$venn_hash{spec_124_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_134_pos[0],$spec_134_pos[1],"$venn_hash{spec_134_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.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_123_pos[0],$spec_123_pos[1],"$venn_hash{spec_123_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_124_pos[0],$spec_124_pos[1],"$venn_hash{spec_124_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_134_pos[0],$spec_134_pos[1],"$venn_hash{spec_134_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}");
                
                # 4 species combination
                my @spec_1234_pos = (700,650);
                
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_1234_pos[0],$spec_1234_pos[1],"$venn_hash{spec_1234_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_1234_pos[0],$spec_1234_pos[1],"$venn_hash{spec_1234_count}");
 }
 
 
 if($species_array_size == 5) {
                
                # Open the venn diagram png file that already has the shapes
-               $img = newFromPng GD::Image('/home/justin/scripts/jaiswallab/Personnel/elserj/venn_sources/5_set_venn_source.png',1);
+               $img = newFromPng GD::Image("$venn_src_dir/5_set_venn_source.png",1);
                
                # make some colors
                my $white = $img->colorAllocateAlpha(255,255,255,127);
@@ -430,17 +442,17 @@ if($species_array_size == 5) {
                my $spec_4_det = "$venn_hash{spec_4_det_line_1}\n$venn_hash{spec_4_det}";
                my $spec_5_det = "$venn_hash{spec_5_det_line_1}\n$venn_hash{spec_5_det}";
                
-               $img->stringFT($blue,'/usr/share/fonts/truetype/arial.ttf',22,0,$spec_1_det[0],$spec_1_det[1],"$spec_1_det");
-               $img->stringFT($green,'/usr/share/fonts/truetype/arial.ttf',22,0,$spec_2_det[0],$spec_2_det[1],"$spec_2_det");
-               $img->stringFT($maroon,'/usr/share/fonts/truetype/arial.ttf',22,0,$spec_3_det[0],$spec_3_det[1],"$spec_3_det");
-               $img->stringFT($yellow,'/usr/share/fonts/truetype/arial.ttf',22,0,$spec_4_det[0],$spec_4_det[1],"$spec_4_det");
-               $img->stringFT($orange,'/usr/share/fonts/truetype/arial.ttf',22,0,$spec_5_det[0],$spec_5_det[1],"$spec_5_det");
+               $img->stringFT($blue,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$spec_1_det[0],$spec_1_det[1],"$spec_1_det");
+               $img->stringFT($green,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$spec_2_det[0],$spec_2_det[1],"$spec_2_det");
+               $img->stringFT($maroon,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$spec_3_det[0],$spec_3_det[1],"$spec_3_det");
+               $img->stringFT($yellow,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$spec_4_det[0],$spec_4_det[1],"$spec_4_det");
+               $img->stringFT($orange,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$spec_5_det[0],$spec_5_det[1],"$spec_5_det");
                
                my @tot_clust = (50,50);
                my @tot = (430,700);
                
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',22,0,$tot_clust[0],$tot_clust[1],"$tot_clust_string");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',22,0,$tot[0],$tot[1],"$tot_string");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$tot_clust[0],$tot_clust[1],"$tot_clust_string");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',22,0,$tot[0],$tot[1],"$tot_string");
                 
                # species individual counts
                my @spec_1_pos = (260,380);
@@ -449,11 +461,11 @@ if($species_array_size == 5) {
                my @spec_4_pos = (660,540);
                my @spec_5_pos = (365,600);
                
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_1_pos[0],$spec_1_pos[1],"$venn_hash{spec_1_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_2_pos[0],$spec_2_pos[1],"$venn_hash{spec_2_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_3_pos[0],$spec_3_pos[1],"$venn_hash{spec_3_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_4_pos[0],$spec_4_pos[1],"$venn_hash{spec_4_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_5_pos[0],$spec_5_pos[1],"$venn_hash{spec_5_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_1_pos[0],$spec_1_pos[1],"$venn_hash{spec_1_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_2_pos[0],$spec_2_pos[1],"$venn_hash{spec_2_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_3_pos[0],$spec_3_pos[1],"$venn_hash{spec_3_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_4_pos[0],$spec_4_pos[1],"$venn_hash{spec_4_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_5_pos[0],$spec_5_pos[1],"$venn_hash{spec_5_count}");
                
                 
                # 2 species combinations
@@ -469,16 +481,16 @@ if($species_array_size == 5) {
                my @spec_45_pos = (500,560);
                
                 
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_12_pos[0],$spec_12_pos[1],"$venn_hash{spec_12_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_13_pos[0],$spec_13_pos[1],"$venn_hash{spec_13_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_14_pos[0],$spec_14_pos[1],"$venn_hash{spec_14_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_15_pos[0],$spec_15_pos[1],"$venn_hash{spec_15_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_23_pos[0],$spec_23_pos[1],"$venn_hash{spec_23_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_24_pos[0],$spec_24_pos[1],"$venn_hash{spec_24_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_25_pos[0],$spec_25_pos[1],"$venn_hash{spec_25_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_34_pos[0],$spec_34_pos[1],"$venn_hash{spec_34_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_35_pos[0],$spec_35_pos[1],"$venn_hash{spec_35_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_45_pos[0],$spec_45_pos[1],"$venn_hash{spec_45_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_12_pos[0],$spec_12_pos[1],"$venn_hash{spec_12_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_13_pos[0],$spec_13_pos[1],"$venn_hash{spec_13_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_14_pos[0],$spec_14_pos[1],"$venn_hash{spec_14_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_15_pos[0],$spec_15_pos[1],"$venn_hash{spec_15_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_23_pos[0],$spec_23_pos[1],"$venn_hash{spec_23_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_24_pos[0],$spec_24_pos[1],"$venn_hash{spec_24_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_25_pos[0],$spec_25_pos[1],"$venn_hash{spec_25_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_34_pos[0],$spec_34_pos[1],"$venn_hash{spec_34_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_35_pos[0],$spec_35_pos[1],"$venn_hash{spec_35_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_45_pos[0],$spec_45_pos[1],"$venn_hash{spec_45_count}");
                
                # 3 species combinations
                my @spec_123_pos = (575,350);
@@ -491,15 +503,15 @@ if($species_array_size == 5) {
                my @spec_235_pos = (540,300);
                my @spec_345_pos = (470,505);
                 
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_123_pos[0],$spec_123_pos[1],"$venn_hash{spec_123_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_124_pos[0],$spec_124_pos[1],"$venn_hash{spec_124_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_125_pos[0],$spec_125_pos[1],"$venn_hash{spec_125_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_134_pos[0],$spec_134_pos[1],"$venn_hash{spec_134_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_135_pos[0],$spec_135_pos[1],"$venn_hash{spec_135_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_145_pos[0],$spec_145_pos[1],"$venn_hash{spec_145_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_234_pos[0],$spec_234_pos[1],"$venn_hash{spec_234_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_235_pos[0],$spec_235_pos[1],"$venn_hash{spec_235_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_345_pos[0],$spec_345_pos[1],"$venn_hash{spec_345_count}");
+               $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}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_124_pos[0],$spec_124_pos[1],"$venn_hash{spec_124_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_125_pos[0],$spec_125_pos[1],"$venn_hash{spec_125_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_134_pos[0],$spec_134_pos[1],"$venn_hash{spec_134_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_135_pos[0],$spec_135_pos[1],"$venn_hash{spec_135_count}");
+               $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_345_pos[0],$spec_345_pos[1],"$venn_hash{spec_345_count}");
                 
                # 4 species combinations
                my @spec_1234_pos = (570,415);
@@ -508,16 +520,16 @@ if($species_array_size == 5) {
                my @spec_1345_pos = (440,450);
                my @spec_2345_pos = (520,480);
                 
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_1234_pos[0],$spec_1234_pos[1],"$venn_hash{spec_1234_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_1235_pos[0],$spec_1235_pos[1],"$venn_hash{spec_1235_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_1245_pos[0],$spec_1245_pos[1],"$venn_hash{spec_1245_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_1345_pos[0],$spec_1345_pos[1],"$venn_hash{spec_1345_count}");
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_2345_pos[0],$spec_2345_pos[1],"$venn_hash{spec_2345_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_1234_pos[0],$spec_1234_pos[1],"$venn_hash{spec_1234_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_1235_pos[0],$spec_1235_pos[1],"$venn_hash{spec_1235_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_1245_pos[0],$spec_1245_pos[1],"$venn_hash{spec_1245_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_1345_pos[0],$spec_1345_pos[1],"$venn_hash{spec_1345_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_2345_pos[0],$spec_2345_pos[1],"$venn_hash{spec_2345_count}");
                
                # 5 species combination
                my @spec_12345_pos = (495,410);
                
-               $img->stringFT($black,'/usr/share/fonts/truetype/arial.ttf',14,0,$spec_12345_pos[0],$spec_12345_pos[1],"$venn_hash{spec_12345_count}");
+               $img->stringFT($black,'/usr/share/fonts/liberation/LiberationSans-Regular.ttf',14,0,$spec_12345_pos[0],$spec_12345_pos[1],"$venn_hash{spec_12345_count}");
 }
 
 # convert the image to PNG and print it