From 6b14d46c6fd519635b2a56f96eb2659a2a65384a Mon Sep 17 00:00:00 2001 From: elserj Date: Wed, 2 Jun 2010 20:39:48 +0000 Subject: [PATCH] Updated scripts svn path=/; revision=17 --- interactome_scripts/find_ortho_super.pl | 21 ++++++++++++++++++--- interactome_scripts/find_species.pl | 16 +++++++++------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/interactome_scripts/find_ortho_super.pl b/interactome_scripts/find_ortho_super.pl index 45cbfa9..ca7af46 100755 --- a/interactome_scripts/find_ortho_super.pl +++ b/interactome_scripts/find_ortho_super.pl @@ -52,6 +52,10 @@ for (my $i = 1; $i<$spec_array_size; $i++) { # set up db query statement to get the orthologs using the cluster id my $sth_get_ortho = $dbh->prepare("select gene from $table where super_id = ? and species = '$species_array[$i]'"); + #my $sth_get_ortho = $dbh->prepare("select gene,species from $table where super_id = ?"); + + # setup query to make sure there is an ortholog gene in the cluster + my $sth_check_ortho = $dbh->prepare("select species from $table where super_id = ? and species = '$species_array[0]'"); foreach my $gene (@in_gene_array) { @@ -61,12 +65,23 @@ for (my $i = 1; $i<$spec_array_size; $i++) { } while (my $id = $sth_get_id->fetchrow_array()) { - my $rv2 = $sth_get_ortho->execute($id); - if (!$rv2) { + #my $rv2 = $sth_check_ortho->execute($id); + #if (!$rv2) { + # next; + #} + #my $check = $sth_check_ortho->fetchrow_array(); + #print "$id\t$check\n"; + #if ($check ne "$species_array[0]") { + # print "no match\t\t$id\t$check\n"; + # next; + #} + + my $rv3 = $sth_get_ortho->execute($id); + if (!$rv3) { next; } - while (my $ortho = $sth_get_ortho->fetchrow_array()) { + while (my ($ortho, $species) = $sth_get_ortho->fetchrow_array()) { print out_file "$gene\t$ortho\n"; } } diff --git a/interactome_scripts/find_species.pl b/interactome_scripts/find_species.pl index 17c7a88..1e6c16e 100755 --- a/interactome_scripts/find_species.pl +++ b/interactome_scripts/find_species.pl @@ -32,8 +32,10 @@ sub find_species { $temp = "Neurospora"; }elsif ($temp =~ /Oryza\_sativa/) { $temp = "Oryza_sativa"; + }elsif ($temp =~ /Cpapaya/) { + $temp = "Carica_papaya"; }elsif ($temp =~ /Physcomit/) { - $temp = "Physcomitreall"; + $temp = "Physcomitrella"; }elsif ($temp =~ /Populus/) { $temp = "Poplar"; }elsif ($temp =~ /Ppersica/) { @@ -41,13 +43,13 @@ sub find_species { }elsif ($temp =~ /cerevisiae/) { $temp = "Sacc_cerevisiae"; }elsif ($temp =~ /pombe/) { - $temp = "Sacc_pombe"; + $temp = "Schizo_pombe"; }elsif ($temp =~ /Selaginella/) { $temp = "Selaginella"; }elsif ($temp =~ /Sorghum/) { $temp = "Sorghum"; - }elsif ($temp =~ /Synechosystis/) { - $temp = "Synechosystis"; + }elsif ($temp =~ /Synechocystis/) { + $temp = "Synechocystis"; }elsif ($temp =~ /Vitis\_vinifera/) { $temp = "Vitis"; }else { @@ -100,7 +102,7 @@ sub find_gene { }elsif ($species eq "Oryza_sativa") { my ($isomer,$temp,$type) = split(/\|/,$gene_header); $gene = $isomer; - }elsif ($species eq "Physcomitreall") { + }elsif ($species eq "Physcomitrella") { my ($name,$locus_id,$chrom_id,$prot_id) = split(/\|/,$gene_header); $gene = $prot_id; #??? }elsif ($species eq "Poplar") { @@ -112,7 +114,7 @@ sub find_gene { }elsif ($species eq "Sacc_cerevisiae") { my ($gene_id,$temp) = split(/\s/,$gene_header); $gene = $gene_id; - }elsif ($species eq "Sacc_pombe") { + }elsif ($species eq "Schizo_pombe") { my ($gene_id,$temp) = split(/\s/,$gene_header); $gene = $gene_id; }elsif ($species eq "Selaginella") { @@ -121,7 +123,7 @@ sub find_gene { }elsif ($species eq "Sorghum") { my ($name,$locus_id,$scaff_id,$prot_id) = split(/\|/,$gene_header); $gene = $prot_id; #??? - }elsif ($species eq "Synechosystis") { + }elsif ($species eq "Synechocystis") { my ($gene_id,$type,$temp) = split(" ",$gene_header); $gene = $gene_id; #??? }elsif ($species eq "Vitis") { -- 2.34.1