Guest User

Untitled

a guest
Nov 22nd, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #!/usr/bin/env perl
  2.  
  3. use Ace;
  4.  
  5. my $db = Ace->connect(-path => shift)||die(Ace::Error);
  6.  
  7. my $genes = $db->fetch_many(-query => 'find Gene Species="Pristionchus pacificus"; Ortholog');
  8.  
  9. while (my $gene = $genes->next){
  10. foreach my $o ($gene->Ortholog){
  11. # map {print "$gene ",$gene->Species," => $o ",$o->right," ($_)\n"}$o->right(3)
  12. unless ($o->right(3)){
  13. reverseO($o,$gene);
  14. }
  15. }
  16. }
  17.  
  18. sub reverseO {
  19. my($g,$id) = @_;
  20. foreach my $or ($g->Ortholog){
  21. if ("$or" eq "$id"){
  22. my @e = $or->right(3);
  23. print "Gene : $id\n";
  24. map{ print "Ortholog $g \"${\$g->Species}\" From_analysis $_\n"} @e;
  25. print "\n";
  26. }
  27. }
  28. }
Add Comment
Please, Sign In to add comment