Skip to content
Snippets Groups Projects
Select Git revision
  • 0d0b74ad8941554e2fa0c7c16404f1d77cd88140
  • master default protected
  • 1.6
  • v1.6.40
  • v1.6.39
  • v1.6.38
  • v1.6.37
  • v1.6.37.rc1
  • v1.6.36
  • 1.6.35
  • 1.6.34
  • 1.6.33
  • 1.6.32.pre2
  • 1.6.32.pre1
  • 1.6.31
  • 1.6.30
  • 1.6.29
  • 1.6.28
  • 1.6.26
  • 1.6.27
  • 1.6.26.pre1
  • 1.6.25
  • 1.6.25.pre2
23 results

FX4Splitter.i

Blame
  • go_associations.pl 2.22 KiB
    #!/usr/local/bin/perl5.6.1
    
    use strict;
    
    BEGIN 
    {
    
    #  my $configFile = "/nfs/pathdb/dev/go-cgi/config.pl";
      my $configFile = "/nfs/pathdb/amigo/conf/config.pl";
    
      if (-f $configFile) 
      {
        require $configFile;
      }
    
    }
    
    use Getopt::Long;
    
    my $associations;
    my $definition;
    
    &GetOptions("assoc" => \$associations,
                "def"   => \$definition);
    
    use GO::AppHandle;
    
    if(@ARGV == 0) 
    {
     print "USAGE: go -def -assoc acc\n"; exit 0;
    }
    
    my $acc_num = $ARGV[0];
    
    
    my $dbname = $ENV{GO_DBNAME};
    my $dbport = $ENV{GO_DBPORT};
    my $dbhost = $ENV{GO_DBHOST};
    my $dbuser = $ENV{GO_DBUSER};
    my $dbauth = $ENV{GO_DBAUTH};
    
    if (not $dbname =~ /^go/) {
      print STDERR "GO database name uncorrect, must start 'go...' !!";
      exit 1;
    }
    
    my $apph = GO::AppHandle->connect (
                                       -dbname => $dbname,
                                       -dbport => $dbport,
                                       -dbhost => $dbhost,
                                       -dbuser => $dbuser,
                                       -dbauth => $dbauth,
                                      ) 
        or die "can't connect to GO database, $dbname!!!\n";
    
    
    #my @accs = qw(O00221);
    my @accs;
    push(@accs, $acc_num);
    
    my @pqlist = map { {acc=>$_} } @accs;
    my $term_l = $apph->get_terms({products=>[@pqlist]});
    
    foreach my $term (@$term_l) 
    {
      my $type = $term->term_type;
      if($type =~ m/_component/i)
      {
        printf "/GO_component=\"";
      }