# 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) {
}
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";
}
}
$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/) {
}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 {
}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") {
}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") {
}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") {