Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env perl
- use Ace;
- my $db = Ace->connect(-path => shift)||die(Ace::Error);
- my $genes = $db->fetch_many(-query => 'find Gene Species="Pristionchus pacificus"; Ortholog');
- while (my $gene = $genes->next){
- foreach my $o ($gene->Ortholog){
- # map {print "$gene ",$gene->Species," => $o ",$o->right," ($_)\n"}$o->right(3)
- unless ($o->right(3)){
- reverseO($o,$gene);
- }
- }
- }
- sub reverseO {
- my($g,$id) = @_;
- foreach my $or ($g->Ortholog){
- if ("$or" eq "$id"){
- my @e = $or->right(3);
- print "Gene : $id\n";
- map{ print "Ortholog $g \"${\$g->Species}\" From_analysis $_\n"} @e;
- print "\n";
- }
- }
- }
Add Comment
Please, Sign In to add comment