From f50f5650abd488b9e24b876d6350e2b5d554fc21 Mon Sep 17 00:00:00 2001 From: elserj Date: Wed, 29 Apr 2020 18:43:02 +0000 Subject: [PATCH] Generalize it to take in species_array from a file so the program doesn't need to modified each run svn path=/; revision=676 --- interactome_scripts/create_venn_diagram.pl | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/interactome_scripts/create_venn_diagram.pl b/interactome_scripts/create_venn_diagram.pl index 092debb..6e19896 100755 --- a/interactome_scripts/create_venn_diagram.pl +++ b/interactome_scripts/create_venn_diagram.pl @@ -11,6 +11,11 @@ use lib "$ENV{HOME}/scripts/jaiswallab/interactome_scripts"; my $venn_src_dir = "$ENV{HOME}/jaiswallab_svn/Personnel/elserj/venn_sources"; +if($#ARGV != 0) { + print "Usage: create_venn_diagram.pl species_list_file\n"; + exit; +} + use DbiFloret; print "User credentials for the supercluster database\n"; @@ -21,14 +26,25 @@ my $dbh = DbiFloret::dbconnect; print "User credentials for the protein sequences database\n"; my $dbh_seq = DbiFloret::dbconnect; +# read species from file +my @species_array; +my $infile = $ARGV[0]; +open(INFILE, $infile) || die "Error: File $infile can not be opened"; +while() { + my $line = $_; + chomp $line; + push(@species_array, $line); +} +close(INFILE); + # human_mouse_kangaroo_rat_platypus_beaver -my @species_array = ("Arabidopsis_thaliana", "Cannabis_sativa.CRBRx", "Humulus_lupulus.primary", "Salvia_hispanica", "Vitis_vinifera"); +#my @species_array = ("Arabidopsis_thaliana", "Cannabis_sativa.CRBRx", "Humulus_lupulus.haplotig", "Humulus_lupulus.primary", "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 = ("Arabidopsis_thaliana", "Homo_sapiens", "Oryza_sativa.japonica.IRGSP"); my $species_array_size = @species_array; my %gene_hash; -- 2.34.1