[Bio] / FigKernelPackages / FIG.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.644, Mon Dec 3 20:05:26 2007 UTC revision 1.645, Thu Dec 6 13:47:40 2007 UTC
# Line 182  Line 182 
182    
183  =head3 new  =head3 new
184    
185  C<< my $fig = FIG->new(); >>      my $fig = FIG->new();
186    
187  This is the constructor for a FIG object. It uses no parameters. If tracing  This is the constructor for a FIG object. It uses no parameters. If tracing
188  has not yet been turned on, it will be turned on here. The tracing type and  has not yet been turned on, it will be turned on here. The tracing type and
# Line 250  Line 250 
250    
251  =head3 CacheTrick  =head3 CacheTrick
252    
253  C<< my $value = $fig->CacheTrick($self, $field => $evalString); >>      my $value = $fig->CacheTrick($self, $field => $evalString);
254    
255  This is a helper method used to create simple field caching in another object. If the  This is a helper method used to create simple field caching in another object. If the
256  named field is found in $self, then it will be returned directly. Otherwise, the eval  named field is found in $self, then it will be returned directly. Otherwise, the eval
# Line 326  Line 326 
326    
327  =head3 db_handle  =head3 db_handle
328    
329  C<< my $dbh = $fig->db_handle; >>      my $dbh = $fig->db_handle;
330    
331  Return the handle to the internal B<DBrtns> object. This allows direct access to  Return the handle to the internal B<DBrtns> object. This allows direct access to
332  the database methods.  the database methods.
# Line 347  Line 347 
347    
348  =head3 cached  =head3 cached
349    
350  C<< my $x = $fig->cached($name); >>      my $x = $fig->cached($name);
351    
352  Return a reference to a hash containing transient data. If no hash exists with the  Return a reference to a hash containing transient data. If no hash exists with the
353  specified name, create an empty one under that name and return it.  specified name, create an empty one under that name and return it.
# Line 384  Line 384 
384    
385  =head3 get_system_name  =head3 get_system_name
386    
387  C<< my $name = $fig->get_system_name; >>      my $name = $fig->get_system_name;
388    
389  Returns C<seed>, indicating that this is object is using the SEED  Returns C<seed>, indicating that this is object is using the SEED
390  database. The same method on an SFXlate object will return C<sprout>.  database. The same method on an SFXlate object will return C<sprout>.
# Line 412  Line 412 
412    
413  =head3 same_seqs  =head3 same_seqs
414    
415  C<< my $sameFlag = FIG::same_seqs($s1, $s2); >>      my $sameFlag = FIG::same_seqs($s1, $s2);
416    
417  Return TRUE if the specified protein sequences are considered equivalent and FALSE  Return TRUE if the specified protein sequences are considered equivalent and FALSE
418  otherwise. The sequences should be presented in I<nr-analysis> form, which is in  otherwise. The sequences should be presented in I<nr-analysis> form, which is in
# Line 456  Line 456 
456    
457  =head3 is_locked_fid  =head3 is_locked_fid
458    
459  C<< $fig->is_locked_fid($fid); >>      $fig->is_locked_fid($fid);
460    
461  returns 1 iff $fid is locked  returns 1 iff $fid is locked
462    
# Line 473  Line 473 
473    
474  =head3 lock_fid  =head3 lock_fid
475    
476  C<< $fig->lock_fid($user,$fid); >>      $fig->lock_fid($user,$fid);
477    
478  Sets a lock on annotations for $fid.  Sets a lock on annotations for $fid.
479    
# Line 509  Line 509 
509    
510  =head3 unlock_fid  =head3 unlock_fid
511    
512  C<< $fig->unlock_fid($user,$fid); >>      $fig->unlock_fid($user,$fid);
513    
514  Sets a unlock on annotations for $fid.  Sets a unlock on annotations for $fid.
515    
# Line 540  Line 540 
540    
541  =head3 delete_genomes  =head3 delete_genomes
542    
543  C<< $fig->delete_genomes(\@genomes); >>      $fig->delete_genomes(\@genomes);
544    
545  Delete the specified genomes from the data store. This requires making  Delete the specified genomes from the data store. This requires making
546  system calls to move and delete files.  system calls to move and delete files.
# Line 664  Line 664 
664    
665  =head3 add_genome  =head3 add_genome
666    
667  C<< my $ok = $fig->add_genome($genomeF, $force, $skipnr); >>      my $ok = $fig->add_genome($genomeF, $force, $skipnr);
668    
669  Add a new genome to the data store. A genome's data is kept in a directory  Add a new genome to the data store. A genome's data is kept in a directory
670  by itself, underneath the main organism directory. This method essentially  by itself, underneath the main organism directory. This method essentially
# Line 1127  Line 1127 
1127    
1128  =head3 parse_genome_args  =head3 parse_genome_args
1129    
1130  C<< my ($mode, @genomes) = FIG::parse_genome_args(@args); >>      my ($mode, @genomes) = FIG::parse_genome_args(@args);
1131    
1132  Extract a list of genome IDs from an argument list. If the argument list is empty,  Extract a list of genome IDs from an argument list. If the argument list is empty,
1133  return all the genomes in the data store.  return all the genomes in the data store.
# Line 1185  Line 1185 
1185    
1186  =head3 reload_table  =head3 reload_table
1187    
1188  C<< $fig->reload_table($mode, $table, $flds, $xflds, $fileName, $keyList, $keyName); >>      $fig->reload_table($mode, $table, $flds, $xflds, $fileName, $keyList, $keyName);
1189    
1190  Reload a database table from a sequential file. If I<$mode> is C<all>, the table  Reload a database table from a sequential file. If I<$mode> is C<all>, the table
1191  will be dropped and re-created. If I<$mode> is C<some>, the data for the individual  will be dropped and re-created. If I<$mode> is C<some>, the data for the individual
# Line 1259  Line 1259 
1259    
1260  =head3 enqueue_similarities  =head3 enqueue_similarities
1261    
1262  C<< FIG::enqueue_similarities(\@fids); >>      FIG::enqueue_similarities(\@fids);
1263    
1264  Queue the passed Feature IDs for similarity computation. The actual  Queue the passed Feature IDs for similarity computation. The actual
1265  computation is performed by L</create_sim_askfor_pool>. The queue is a  computation is performed by L</create_sim_askfor_pool>. The queue is a
# Line 1444  Line 1444 
1444    
1445  =head3 create_sim_askfor_pool  =head3 create_sim_askfor_pool
1446    
1447  C<< $fig->create_sim_askfor_pool($chunk_size); >>      $fig->create_sim_askfor_pool($chunk_size);
1448    
1449  Creates an askfor pool, which a snapshot of the current NR and similarity  Creates an askfor pool, which a snapshot of the current NR and similarity
1450  queue. This process clears the old queue.  queue. This process clears the old queue.
# Line 1654  Line 1654 
1654    
1655  =head3 get_sim_work  =head3 get_sim_work
1656    
1657  C<< my ($nrPath, $fasta) = $fig->get_sim_work(); >>      my ($nrPath, $fasta) = $fig->get_sim_work();
1658    
1659  Get the next piece of sim computation work to be performed. Returned are  Get the next piece of sim computation work to be performed. Returned are
1660  the path to the NR and a string containing the fasta data.  the path to the NR and a string containing the fasta data.
# Line 1717  Line 1717 
1717    
1718  =head3 sim_work_done  =head3 sim_work_done
1719    
1720  C<< $fig->sim_work_done($pool_id, $chunk_id, $out_file); >>      $fig->sim_work_done($pool_id, $chunk_id, $out_file);
1721    
1722  Declare that the work in pool_id/chunk_id has been completed, and output written  Declare that the work in pool_id/chunk_id has been completed, and output written
1723  to the pool directory (get_sim_work gave it the path).  to the pool directory (get_sim_work gave it the path).
# Line 1782  Line 1782 
1782    
1783  =head3 schedule_sim_pool_postprocessing  =head3 schedule_sim_pool_postprocessing
1784    
1785  C<< $fig->schedule_sim_pool_postprocessing($pool_id); >>      $fig->schedule_sim_pool_postprocessing($pool_id);
1786    
1787  Schedule a job to do the similarity postprocessing for the specified pool.  Schedule a job to do the similarity postprocessing for the specified pool.
1788    
# Line 1830  Line 1830 
1830    
1831  =head3 postprocess_computed_sims  =head3 postprocess_computed_sims
1832    
1833  C<< $fig->postprocess_computed_sims($pool_id); >>      $fig->postprocess_computed_sims($pool_id);
1834    
1835  Set up to reduce, reformat, and split the similarities in a given pool. We build  Set up to reduce, reformat, and split the similarities in a given pool. We build
1836  a pipe to this pipeline:  a pipe to this pipeline:
# Line 1921  Line 1921 
1921    
1922  =head3 get_active_sim_pools  =head3 get_active_sim_pools
1923    
1924  C<< @pools = $fig->get_active_sim_pools(); >>      @pools = $fig->get_active_sim_pools();
1925    
1926  Return a list of the pool IDs for the sim processing queues that have  Return a list of the pool IDs for the sim processing queues that have
1927  entries awaiting computation.  entries awaiting computation.
# Line 1941  Line 1941 
1941    
1942  =head3 compute_clusters  =head3 compute_clusters
1943    
1944  C<< my @clusterList = $fig->compute_clusters(\@pegList, $subsystem, $distance); >>      my @clusterList = $fig->compute_clusters(\@pegList, $subsystem, $distance);
1945    
1946  Partition a list of PEGs into sections that are clustered close together on  Partition a list of PEGs into sections that are clustered close together on
1947  the genome. The basic algorithm used builds a graph connecting PEGs to  the genome. The basic algorithm used builds a graph connecting PEGs to
# Line 2019  Line 2019 
2019    
2020  =head3 get_sim_pool_info  =head3 get_sim_pool_info
2021    
2022  C<< my ($total_entries, $n_finished, $n_assigned, $n_unassigned) = $fig->get_sim_pool_info($pool_id); >>      my ($total_entries, $n_finished, $n_assigned, $n_unassigned) = $fig->get_sim_pool_info($pool_id);
2023    
2024  Return information about the given sim pool.  Return information about the given sim pool.
2025    
# Line 2097  Line 2097 
2097    
2098  =head3 get_local_hostname  =head3 get_local_hostname
2099    
2100  C<< my $result = FIG::get_local_hostname(); >>      my $result = FIG::get_local_hostname();
2101    
2102  Return the local host name for the current processor. The name may be  Return the local host name for the current processor. The name may be
2103  stored in a configuration file, or we may have to get it from the  stored in a configuration file, or we may have to get it from the
# Line 2187  Line 2187 
2187    
2188  =head3 get_hostname_by_adapter  =head3 get_hostname_by_adapter
2189    
2190  C<< my $name = FIG::get_hostname_by_adapter(); >>      my $name = FIG::get_hostname_by_adapter();
2191    
2192  Return the local host name for the current network environment.  Return the local host name for the current network environment.
2193    
# Line 2332  Line 2332 
2332    
2333  =head3 get_seed_id  =head3 get_seed_id
2334    
2335  C<< my $id = FIG::get_seed_id(); >>      my $id = FIG::get_seed_id();
2336    
2337  Return the Universally Unique ID for this SEED instance. If one  Return the Universally Unique ID for this SEED instance. If one
2338  does not exist, it will be created.  does not exist, it will be created.
# Line 2370  Line 2370 
2370    
2371  =head3 get_release_info  =head3 get_release_info
2372    
2373  C<< my ($name, $id, $inst, $email, $parent_id, $description) = FIG::get_release_info();  >>      my ($name, $id, $inst, $email, $parent_id, $description) = FIG::get_release_info();
2374    
2375  Return the current data release information..  Return the current data release information..
2376    
# Line 2456  Line 2456 
2456    
2457  =head3 Title  =head3 Title
2458    
2459  C<< my $title = $fig->Title(); >>      my $title = $fig->Title();
2460    
2461  Return the title of this database. For SEED, this will return SEED, for Sprout  Return the title of this database. For SEED, this will return SEED, for Sprout
2462  it will return NMPDR, and so forth.  it will return NMPDR, and so forth.
# Line 2469  Line 2469 
2469    
2470  =head3 FIG  =head3 FIG
2471    
2472  C<< my $realFig = $fig->FIG(); >>      my $realFig = $fig->FIG();
2473    
2474  Return this object. This method is provided for compatability with SFXlate.  Return this object. This method is provided for compatability with SFXlate.
2475    
# Line 2482  Line 2482 
2482    
2483  =head3 get_peer_last_update  =head3 get_peer_last_update
2484    
2485  C<< my $date = $fig->get_peer_last_update($peer_id); >>      my $date = $fig->get_peer_last_update($peer_id);
2486    
2487  Return the timestamp from the last successful peer-to-peer update with  Return the timestamp from the last successful peer-to-peer update with
2488  the given peer. If the specified peer has made updates, comparing this  the given peer. If the specified peer has made updates, comparing this
# Line 2526  Line 2526 
2526    
2527  =head3 set_peer_last_update  =head3 set_peer_last_update
2528    
2529  C<< $fig->set_peer_last_update($peer_id, $time); >>      $fig->set_peer_last_update($peer_id, $time);
2530    
2531  Manually set the update timestamp for a specified peer. This informs  Manually set the update timestamp for a specified peer. This informs
2532  the SEED that you have all of the assignments and updates from a  the SEED that you have all of the assignments and updates from a
# Line 2571  Line 2571 
2571    
2572  =head3 cgi_url  =head3 cgi_url
2573    
2574  C<< my $url = FIG::$fig->cgi_url(); >>      my $url = FIG::$fig->cgi_url();
2575    
2576  Return the URL for the CGI script directory.  Return the URL for the CGI script directory.
2577    
# Line 2590  Line 2590 
2590    
2591  =head3 top_link  =head3 top_link
2592    
2593  C<< my $url = FIG::top_link(); >>      my $url = FIG::top_link();
2594    
2595  Return the relative URL for the top of the CGI script directory.  Return the relative URL for the top of the CGI script directory.
2596    
# Line 2630  Line 2630 
2630    
2631  =head3 temp_url  =head3 temp_url
2632    
2633  C<< my $url = FIG::temp_url(); >>      my $url = FIG::temp_url();
2634    
2635  Return the URL of the temporary file directory.  Return the URL of the temporary file directory.
2636    
# Line 2647  Line 2647 
2647    
2648  =head3 plug_url  =head3 plug_url
2649    
2650  C<< my $url2 = $fig->plug_url($url); >>      my $url2 = $fig->plug_url($url);
2651    
2652  or  or
2653    
2654  C<< my $url2 = $fig->plug_url($url); >>      my $url2 = $fig->plug_url($url);
2655    
2656  Change the domain portion of a URL to point to the current domain. This essentially  Change the domain portion of a URL to point to the current domain. This essentially
2657  relocates URLs into the current environment.  relocates URLs into the current environment.
# Line 2696  Line 2696 
2696    
2697  =head3 file_read  =head3 file_read
2698    
2699  C<< my $text = $fig->file_read($fileName); >>      my $text = $fig->file_read($fileName);
2700    
2701  or  or
2702    
2703  C<< my @lines = $fig->file_read($fileName); >>      my @lines = $fig->file_read($fileName);
2704    
2705  or  or
2706    
2707  C<< my $text = FIG::file_read($fileName); >>      my $text = FIG::file_read($fileName);
2708    
2709  or  or
2710    
2711  C<< my @lines = FIG::file_read($fileName); >>      my @lines = FIG::file_read($fileName);
2712    
2713  Read an entire file into memory. In a scalar context, the file is returned  Read an entire file into memory. In a scalar context, the file is returned
2714  as a single text string with line delimiters included. In a list context, the  as a single text string with line delimiters included. In a list context, the
# Line 2743  Line 2743 
2743    
2744  =head3 file_head  =head3 file_head
2745    
2746  C<< my $text = $fig->file_head($fileName, $count); >>      my $text = $fig->file_head($fileName, $count);
2747    
2748  or  or
2749    
2750  C<< my @lines = $fig->file_head($fileName, $count); >>      my @lines = $fig->file_head($fileName, $count);
2751    
2752  or  or
2753    
2754  C<< my $text = FIG::file_head($fileName, $count); >>      my $text = FIG::file_head($fileName, $count);
2755    
2756  or  or
2757    
2758  C<< my @lines = FIG::file_head($fileName, $count); >>      my @lines = FIG::file_head($fileName, $count);
2759    
2760  Read a portion of a file into memory. In a scalar context, the file portion is  Read a portion of a file into memory. In a scalar context, the file portion is
2761  returned as a single text string with line delimiters included. In a list  returned as a single text string with line delimiters included. In a list
# Line 2820  Line 2820 
2820    
2821  =head3 min  =head3 min
2822    
2823  C<< my $min = FIG::min(@x); >>      my $min = FIG::min(@x);
2824    
2825  or  or
2826    
2827  C<< my $min = $fig->min(@x); >>      my $min = $fig->min(@x);
2828    
2829  Return the minimum numeric value from a list.  Return the minimum numeric value from a list.
2830    
# Line 2858  Line 2858 
2858    
2859  =head3 max  =head3 max
2860    
2861  C<< my $max = FIG::max(@x); >>      my $max = FIG::max(@x);
2862    
2863  or  or
2864    
2865  C<< my $max = $fig->max(@x); >>      my $max = $fig->max(@x);
2866    
2867  Return the maximum numeric value from a list.  Return the maximum numeric value from a list.
2868    
# Line 2896  Line 2896 
2896    
2897  =head3 between  =head3 between
2898    
2899  C<< my $flag = FIG::between($x, $y, $z); >>      my $flag = FIG::between($x, $y, $z);
2900    
2901  or  or
2902    
2903  C<< my $flag = $fig->between($x, $y, $z); >>      my $flag = $fig->between($x, $y, $z);
2904    
2905  Determine whether or not $y is between $x and $z.  Determine whether or not $y is between $x and $z.
2906    
# Line 2943  Line 2943 
2943    
2944  =head3 standard_genetic_code  =head3 standard_genetic_code
2945    
2946  C<< my $code = FIG::standard_genetic_code(); >>      my $code = FIG::standard_genetic_code();
2947    
2948  Return a hash containing the standard translation of nucleotide triples to proteins.  Return a hash containing the standard translation of nucleotide triples to proteins.
2949  Methods such as L</translate> can take a translation scheme as a parameter. This method  Methods such as L</translate> can take a translation scheme as a parameter. This method
# Line 3054  Line 3054 
3054    
3055  =head3 translate  =head3 translate
3056    
3057  C<< my $aa_seq = &FIG::translate($dna_seq, $code, $fix_start);  >>      my $aa_seq = &FIG::translate($dna_seq, $code, $fix_start);
3058    
3059  Translate a DNA sequence to a protein sequence using the specified genetic code.  Translate a DNA sequence to a protein sequence using the specified genetic code.
3060  If I<$fix_start> is TRUE, will translate an initial C<TTG> or C<GTG> code to  If I<$fix_start> is TRUE, will translate an initial C<TTG> or C<GTG> code to
# Line 3120  Line 3120 
3120    
3121  =head3 reverse_comp  =head3 reverse_comp
3122    
3123  C<< my $dnaR = FIG::reverse_comp($dna); >>      my $dnaR = FIG::reverse_comp($dna);
3124    
3125  or  or
3126    
3127  C<< my $dnaR = $fig->reverse_comp($dna); >>      my $dnaR = $fig->reverse_comp($dna);
3128    
3129  Return the reverse complement os the specified DNA sequence.  Return the reverse complement os the specified DNA sequence.
3130    
# Line 3154  Line 3154 
3154    
3155  =head3 rev_comp  =head3 rev_comp
3156    
3157  C<< my $dnaRP = FIG::rev_comp(\$dna); >>      my $dnaRP = FIG::rev_comp(\$dna);
3158    
3159  or  or
3160    
3161  C<< my $dnaRP = $fig->rev_comp(\$dna); >>      my $dnaRP = $fig->rev_comp(\$dna);
3162    
3163  Return the reverse complement of the specified DNA sequence. The DNA sequence  Return the reverse complement of the specified DNA sequence. The DNA sequence
3164  is passed in as a string reference rather than a raw string for performance  is passed in as a string reference rather than a raw string for performance
# Line 3256  Line 3256 
3256    
3257  =head3 verify_dir  =head3 verify_dir
3258    
3259  C<< FIG::verify_dir($dir); >>      FIG::verify_dir($dir);
3260    
3261  or  or
3262    
3263  C<< $fig->verify_dir($dir); >>      $fig->verify_dir($dir);
3264    
3265  Insure that the specified directory exists.  If it must be created, the permissions will  Insure that the specified directory exists.  If it must be created, the permissions will
3266  be set to C<0777>.  be set to C<0777>.
# Line 3291  Line 3291 
3291    
3292  =head3 run  =head3 run
3293    
3294  C<< FIG::run($cmd); >>      FIG::run($cmd);
3295    
3296  or  or
3297    
3298  C<< $fig->run($cmd); >>      $fig->run($cmd);
3299    
3300  Run a command. If the command fails, the error will be traced.  Run a command. If the command fails, the error will be traced.
3301    
# Line 3316  Line 3316 
3316    
3317  =head3 run_gathering_output  =head3 run_gathering_output
3318    
3319  C<< FIG::run_gathering_output($cmd, @args); >>      FIG::run_gathering_output($cmd, @args);
3320    
3321  or  or
3322    
3323  C<< $fig->run_gathering_output($cmd, @args); >>      $fig->run_gathering_output($cmd, @args);
3324    
3325  Run a command, gathering the output. This is similar to the backtick  Run a command, gathering the output. This is similar to the backtick
3326  operator, but it does not invoke the shell. Note that the argument list  operator, but it does not invoke the shell. Note that the argument list
# Line 3378  Line 3378 
3378    
3379  =head3 interpret_error_code  =head3 interpret_error_code
3380    
3381    ($exitcode, $signal, $msg) = &FIG::interpret_error_code($?)      ($exitcode, $signal, $msg) = &FIG::interpret_error_code($rc);
3382    
3383  Determine if the given result code was due to a process exiting abnormally  Determine if the given result code was due to a process exiting abnormally
3384  or by receiving a signal.  or by receiving a signal.
# Line 3412  Line 3412 
3412    
3413  =head3 augment_path  =head3 augment_path
3414    
3415  C<< FIG::augment_path($dirName); >>      FIG::augment_path($dirName);
3416    
3417  Add a directory to the system path.  Add a directory to the system path.
3418    
# Line 3441  Line 3441 
3441    
3442  =head3 read_fasta_record  =head3 read_fasta_record
3443    
3444  C<< my ($seq_id, $seq_pointer, $comment) = FIG::read_fasta_record(\*FILEHANDLE); >>      my ($seq_id, $seq_pointer, $comment) = FIG::read_fasta_record(\*FILEHANDLE);
3445    
3446  or  or
3447    
3448  C<< my ($seq_id, $seq_pointer, $comment) = $fig->read_fasta_record(\*FILEHANDLE); >>      my ($seq_id, $seq_pointer, $comment) = $fig->read_fasta_record(\*FILEHANDLE);
3449    
3450  Read and parse the next logical record of a FASTA file. A FASTA logical record  Read and parse the next logical record of a FASTA file. A FASTA logical record
3451  consists of multiple lines of text. The first line begins with a C<< > >> symbol  consists of multiple lines of text. The first line begins with a C<< > >> symbol
# Line 3506  Line 3506 
3506    
3507  =head3 display_id_and_seq  =head3 display_id_and_seq
3508    
3509  C<< FIG::display_id_and_seq($id_and_comment, $seqP, $fh); >>      FIG::display_id_and_seq($id_and_comment, $seqP, $fh);
3510    
3511  or  or
3512    
3513  C<< $fig->display_id_and_seq($id_and_comment, \$seqP, $fh); >>      $fig->display_id_and_seq($id_and_comment, \$seqP, $fh);
3514    
3515  Display a fasta ID and sequence to the specified open file. This method is designed  Display a fasta ID and sequence to the specified open file. This method is designed
3516  to work well with L</read_fasta_sequence> and L</rev_comp>, because it takes as  to work well with L</read_fasta_sequence> and L</rev_comp>, because it takes as
# Line 3557  Line 3557 
3557    
3558  =head3 display_seq  =head3 display_seq
3559    
3560  C<< FIG::display_seq(\$seqP, $fh); >>      FIG::display_seq(\$seqP, $fh);
3561    
3562  or  or
3563    
3564  C<< $fig->display_seq(\$seqP, $fh); >>      $fig->display_seq(\$seqP, $fh);
3565    
3566  Display a fasta sequence to the specified open file. This method is designed  Display a fasta sequence to the specified open file. This method is designed
3567  to work well with L</read_fasta_sequence> and L</rev_comp>, because it takes as  to work well with L</read_fasta_sequence> and L</rev_comp>, because it takes as
# Line 3610  Line 3610 
3610    
3611  =head3 flatten_dumper  =head3 flatten_dumper
3612    
3613  C<< FIG::flatten_dumper( $perl_ref_or_object_1, ... ); >>      FIG::flatten_dumper( $perl_ref_or_object_1, ... );
3614    
3615  C<< $fig->flatten_dumper( $perl_ref_or_object_1, ... ); >>      $fig->flatten_dumper( $perl_ref_or_object_1, ... );
3616    
3617  Takes a list of perl references or objects, and "flattens" their Data::Dumper() output  Takes a list of perl references or objects, and "flattens" their Data::Dumper() output
3618  so that it can be printed on a single line.  so that it can be printed on a single line.
# Line 3792  Line 3792 
3792    
3793  =head3 ec_name  =head3 ec_name
3794    
3795  C<< my $enzymatic_function = $fig->ec_name($ec); >>      my $enzymatic_function = $fig->ec_name($ec);
3796    
3797  Returns the enzymatic name corresponding to the specified enzyme code.  Returns the enzymatic name corresponding to the specified enzyme code.
3798    
# Line 3825  Line 3825 
3825    
3826  =head3 all_roles  =head3 all_roles
3827    
3828  C<< my @roles = $fig->all_roles; >>      my @roles = $fig->all_roles;
3829    
3830  Return a list of the known roles. Currently, this is a list of the enzyme codes and names.  Return a list of the known roles. Currently, this is a list of the enzyme codes and names.
3831    
# Line 3845  Line 3845 
3845    
3846  =head3 expand_ec  =head3 expand_ec
3847    
3848  C<< my $expanded_ec = $fig->expand_ec($ec); >>      my $expanded_ec = $fig->expand_ec($ec);
3849    
3850  Expands "1.1.1.1" to "1.1.1.1 - alcohol dehydrogenase" or something like that.  Expands "1.1.1.1" to "1.1.1.1 - alcohol dehydrogenase" or something like that.
3851    
# Line 3860  Line 3860 
3860    
3861  =head3 clean_tmp  =head3 clean_tmp
3862    
3863  C<< FIG::clean_tmp(); >>      FIG::clean_tmp();
3864    
3865  Delete temporary files more than two days old.  Delete temporary files more than two days old.
3866    
# Line 3889  Line 3889 
3889    
3890  =head3 genomes  =head3 genomes
3891    
3892  C<< my @genome_ids = $fig->genomes($complete, $restrictions, $domain); >>      my @genome_ids = $fig->genomes($complete, $restrictions, $domain);
3893    
3894  Return a list of genome IDs. If called with no parameters, all genome IDs  Return a list of genome IDs. If called with no parameters, all genome IDs
3895  in the database will be returned.  in the database will be returned.
# Line 3964  Line 3964 
3964    
3965  =head3 is_complete  =head3 is_complete
3966    
3967  C<< my $flag = $fig->is_complete($genome); >>      my $flag = $fig->is_complete($genome);
3968    
3969  Return TRUE if the genome with the specified ID is complete, else FALSE.  Return TRUE if the genome with the specified ID is complete, else FALSE.
3970    
# Line 3993  Line 3993 
3993    
3994  =head3 is_genome  =head3 is_genome
3995    
3996  C<< my $flag = $fig->is_genome($genome); >>      my $flag = $fig->is_genome($genome);
3997    
3998  Return TRUE if the specified genome exists, else FALSE.  Return TRUE if the specified genome exists, else FALSE.
3999    
# Line 4031  Line 4031 
4031    
4032  =head3 assert_genomes  =head3 assert_genomes
4033    
4034  C<< $fig->assert_genomes(gid, gid, ...)>>      $fig->assert_genomes(gid, gid, ...);
4035    
4036  Assert that the given list of genomes does exist, and allow is_genome() to succeed for them.  Assert that the given list of genomes does exist, and allow is_genome() to succeed for them.
4037    
# Line 4051  Line 4051 
4051    
4052  =head3 genome_counts  =head3 genome_counts
4053    
4054  C<< my ($arch, $bact, $euk, $vir, $env, $unk) = $fig->genome_counts($complete); >>      my ($arch, $bact, $euk, $vir, $env, $unk) = $fig->genome_counts($complete);
4055    
4056  Count the number of genomes in each domain. If I<$complete> is TRUE, only complete  Count the number of genomes in each domain. If I<$complete> is TRUE, only complete
4057  genomes will be included in the counts.  genomes will be included in the counts.
# Line 4102  Line 4102 
4102    
4103  =head3 genome_domain  =head3 genome_domain
4104    
4105  C<< my $domain = $fig->genome_domain($genome_id); >>      my $domain = $fig->genome_domain($genome_id);
4106    
4107  Find the domain of a genome.  Find the domain of a genome.
4108    
# Line 4139  Line 4139 
4139    
4140  =head3 genome_pegs  =head3 genome_pegs
4141    
4142  C<< my $num_pegs = $fig->genome_pegs($genome_id); >>      my $num_pegs = $fig->genome_pegs($genome_id);
4143    
4144  Return the number of protein-encoding genes (PEGs) for a specified  Return the number of protein-encoding genes (PEGs) for a specified
4145  genome.  genome.
# Line 4176  Line 4176 
4176    
4177  =head3 genome_rnas  =head3 genome_rnas
4178    
4179  C<< my $num_rnas = $fig->genome_rnas($genome_id); >>      my $num_rnas = $fig->genome_rnas($genome_id);
4180    
4181  Return the number of RNA-encoding genes for a genome.  Return the number of RNA-encoding genes for a genome.
4182  "$genome_id" is indexed in the "genome" database, and 'undef' otherwise.  "$genome_id" is indexed in the "genome" database, and 'undef' otherwise.
# Line 4213  Line 4213 
4213    
4214  =head3 genome_szdna  =head3 genome_szdna
4215    
4216  C<< my $szdna = $fig->genome_szdna($genome_id); >>      my $szdna = $fig->genome_szdna($genome_id);
4217    
4218  Return the number of DNA base-pairs in a genome's contigs.  Return the number of DNA base-pairs in a genome's contigs.
4219    
# Line 4251  Line 4251 
4251    
4252  =head3 genome_version  =head3 genome_version
4253    
4254  C<< my $version = $fig->genome_version($genome_id); >>      my $version = $fig->genome_version($genome_id);
4255    
4256  Return the version number of the specified genome.  Return the version number of the specified genome.
4257    
# Line 4296  Line 4296 
4296    
4297  =head3 genome_md5sum  =head3 genome_md5sum
4298    
4299  C<< my $md5sum = $fig->genome_md5sum($genome_id); >>      my $md5sum = $fig->genome_md5sum($genome_id);
4300    
4301  Returns the MD5 checksum of the specified genome.  Returns the MD5 checksum of the specified genome.
4302    
# Line 4340  Line 4340 
4340    
4341  =head3 genome_with_md5sum  =head3 genome_with_md5sum
4342    
4343  C<< my $genome = $fig->genome_with_md5sum($cksum); >>      my $genome = $fig->genome_with_md5sum($cksum);
4344    
4345  Find a genome with the specified checksum.  Find a genome with the specified checksum.
4346    
# Line 4377  Line 4377 
4377    
4378  =head3 contig_md5sum  =head3 contig_md5sum
4379    
4380  C<< my $cksum = $fig->contig_md5sum($genome, $contig); >>      my $cksum = $fig->contig_md5sum($genome, $contig);
4381    
4382  Return the MD5 checksum for a contig. The MD5 checksum is computed from the content  Return the MD5 checksum for a contig. The MD5 checksum is computed from the content
4383  of the contig. This method retrieves the checksum stored in the database. The checksum  of the contig. This method retrieves the checksum stored in the database. The checksum
# Line 4451  Line 4451 
4451    
4452  =head3 genus_species  =head3 genus_species
4453    
4454  C<< my $gs = $fig->genus_species($genome_id); >>      my $gs = $fig->genus_species($genome_id);
4455    
4456  Return the genus, species, and possibly also the strain of a specified genome.  Return the genus, species, and possibly also the strain of a specified genome.
4457    
# Line 4501  Line 4501 
4501    
4502  =head3 set_genus_species  =head3 set_genus_species
4503    
4504  C<< my $gs = $fig->set_genus_species($genome_id, $genus_species_strain); >>      my $gs = $fig->set_genus_species($genome_id, $genus_species_strain);
4505    
4506  Sets the contents of the GENOME file of the specified genome ID  Sets the contents of the GENOME file of the specified genome ID
4507    
# Line 4557  Line 4557 
4557    
4558  =head3 org_of  =head3 org_of
4559    
4560  C<< my $org = $fig->org_of($prot_id); >>      my $org = $fig->org_of($prot_id);
4561    
4562  Return the genus/species name of the organism containing a protein. Note that in this context  Return the genus/species name of the organism containing a protein. Note that in this context
4563  I<protein> is not a certain string of amino acids but a protein encoding region on a specific  I<protein> is not a certain string of amino acids but a protein encoding region on a specific
# Line 4605  Line 4605 
4605    
4606  =head3 orgid_of_orgname  =head3 orgid_of_orgname
4607    
4608  C<< my $genomeID = $fig->orgid_of_orgname($genomeName); >>      my $genomeID = $fig->orgid_of_orgname($genomeName);
4609    
4610  Return the ID of the genome corresponding to the specified organism name, or a  Return the ID of the genome corresponding to the specified organism name, or a
4611  null string if the genome is not found.  null string if the genome is not found.
# Line 4643  Line 4643 
4643    
4644  =head3 orgname_of_orgid  =head3 orgname_of_orgid
4645    
4646  C<< my $genomeName = $fig->orgname_of_orgid($genomeID); >>      my $genomeName = $fig->orgname_of_orgid($genomeID);
4647    
4648  Return the name of the genome corresponding to the specified organism ID.  Return the name of the genome corresponding to the specified organism ID.
4649    
# Line 4678  Line 4678 
4678    
4679  =head3 genus_species_domain  =head3 genus_species_domain
4680    
4681  C<< my ($gs, $domain) = $fig->genus_species_domain($genome_id); >>      my ($gs, $domain) = $fig->genus_species_domain($genome_id);
4682    
4683  Returns a genome's genus and species (and strain if that has been properly  Returns a genome's genus and species (and strain if that has been properly
4684  recorded) in a printable form, along with its domain. This method is similar  recorded) in a printable form, along with its domain. This method is similar
# Line 4718  Line 4718 
4718    
4719  =head3 domain_color  =head3 domain_color
4720    
4721  C<< my $web_color = FIG::domain_color($domain); >>      my $web_color = FIG::domain_color($domain);
4722    
4723  Return the web color string associated with a specified domain. The colors are  Return the web color string associated with a specified domain. The colors are
4724  extremely subtle (86% luminance), so they absolutely require a black background.  extremely subtle (86% luminance), so they absolutely require a black background.
# Line 4752  Line 4752 
4752    
4753  =head3 org_and_color_of  =head3 org_and_color_of
4754    
4755  C<< my ($org, $color) = $fig->org_and_domain_of($prot_id); >>      my ($org, $color) = $fig->org_and_domain_of($prot_id);
4756    
4757  Return the best guess organism and domain html color string of an organism.  Return the best guess organism and domain html color string of an organism.
4758  In the case of external proteins, we can usually determine an organism, but not  In the case of external proteins, we can usually determine an organism, but not
# Line 4807  Line 4807 
4807    
4808  =head3 abbrev  =head3 abbrev
4809    
4810  C<< my $abbreviated_name = FIG::abbrev($genome_name); >>      my $abbreviated_name = FIG::abbrev($genome_name);
4811    
4812  or  or
4813    
4814  C<< my $abbreviated_name = $fig->abbrev($genome_name); >>      my $abbreviated_name = $fig->abbrev($genome_name);
4815    
4816  Abbreviate a genome name to 10 characters or less.  Abbreviate a genome name to 10 characters or less.
4817    
# Line 4852  Line 4852 
4852    
4853  =head3 wikipedia_link  =head3 wikipedia_link
4854    
4855  C<< my $wikipedia_link = $fig->wikipedia_link($genome_name); >>      my $wikipedia_link = $fig->wikipedia_link($genome_name);
4856    
4857  Check if Wikipedia has a page about this genome. If so, return it's url.  Check if Wikipedia has a page about this genome. If so, return it's url.
4858    
# Line 4877  Line 4877 
4877    
4878  =head3 organism_directory  =head3 organism_directory
4879    
4880  C<< my $organism_directory = $fig->organism_directory($genome_id); >>      my $organism_directory = $fig->organism_directory($genome_id);
4881    
4882  Get the directory that contains the organism data. This is just like the  Get the directory that contains the organism data. This is just like the
4883  FIGV version.  FIGV version.
# Line 5008  Line 5008 
5008    
5009  =head3 ftype  =head3 ftype
5010    
5011  C<< my $type = FIG::ftype($fid); >>      my $type = FIG::ftype($fid);
5012    
5013  or  or
5014    
5015  C<< my $type = $fig->ftype($fid); >>      my $type = $fig->ftype($fid);
5016    
5017  Returns the type of a feature, given the feature ID.  This just amounts  Returns the type of a feature, given the feature ID.  This just amounts
5018  to lifting it out of the feature ID, since features have IDs of the form  to lifting it out of the feature ID, since features have IDs of the form
# Line 5051  Line 5051 
5051    
5052  =head3 genome_of  =head3 genome_of
5053    
5054  C<< my $genome_id = $fig->genome_of($fid); >>      my $genome_id = $fig->genome_of($fid);
5055    
5056  or  or
5057    
5058  C<< my $genome_id = FIG::genome_of($fid); >>      my $genome_id = FIG::genome_of($fid);
5059    
5060  Return the genome ID from a feature ID.  Return the genome ID from a feature ID.
5061    
# Line 5085  Line 5085 
5085    
5086  =head3 genome_and_peg_of  =head3 genome_and_peg_of
5087    
5088  C<< my ($genome_id, $peg_number = FIG::genome_and_peg_of($fid); >>      my ($genome_id, $peg_number = FIG::genome_and_peg_of($fid);
5089    
5090  C<< my ($genome_id, $peg_number = $fig->genome_and_peg_of($fid); >>      my ($genome_id, $peg_number = $fig->genome_and_peg_of($fid);
5091    
5092  Return the genome ID and peg number from a feature ID.  Return the genome ID and peg number from a feature ID.
5093    
# Line 5120  Line 5120 
5120    
5121  =head3 by_fig_id  =head3 by_fig_id
5122    
5123  C<< my @sorted_by_fig_id = sort { FIG::by_fig_id($a,$b) } @fig_ids; >>      my @sorted_by_fig_id = sort { FIG::by_fig_id($a,$b) } @fig_ids;
5124    
5125  Compare two feature IDs.  Compare two feature IDs.
5126    
# Line 5207  Line 5207 
5207    
5208  =head3 by_genome_id  =head3 by_genome_id
5209    
5210  C<< my @sorted_by_genome_id = sort { FIG::by_genome_id($a,$b) } @genome_ids; >>      my @sorted_by_genome_id = sort { FIG::by_genome_id($a,$b) } @genome_ids;
5211    
5212  Compare two genome IDs.  Compare two genome IDs.
5213    
# Line 5247  Line 5247 
5247    
5248  =head3 genes_in_region  =head3 genes_in_region
5249    
5250  C<< my ($features_in_region, $beg1, $end1) = $fig->genes_in_region($genome, $contig, $beg, $end, size_limit); >>      my ($features_in_region, $beg1, $end1) = $fig->genes_in_region($genome, $contig, $beg, $end, size_limit);
5251    
5252  Locate features that overlap a specified region of a contig. This includes features that begin or end  Locate features that overlap a specified region of a contig. This includes features that begin or end
5253  outside that region, just so long as some part of the feature can be found in the region of interest.  outside that region, just so long as some part of the feature can be found in the region of interest.
# Line 5411  Line 5411 
5411    
5412  =head3 regions_spanned  =head3 regions_spanned
5413    
5414  C<< my ( [ $contig, $beg, $end ], ... ) = $fig->regions_spanned( $loc ); >>      my ( [ $contig, $beg, $end ], ... ) = $fig->regions_spanned( $loc );
5415    
5416  or  or
5417    
5418  C<< my ( [ $contig, $beg, $end ], ... ) = FIG::regions_spanned( $loc ); >>      my ( [ $contig, $beg, $end ], ... ) = FIG::regions_spanned( $loc );
5419    
5420  The location of a feature in a scalar context is  The location of a feature in a scalar context is
5421    
# Line 5500  Line 5500 
5500    
5501  =head3 filter_regions  =head3 filter_regions
5502    
5503  C<< my  @regions = FIG::filter_regions( $contig, $min, $max,  @regions ); >>      my  @regions = FIG::filter_regions( $contig, $min, $max,  @regions );
5504    
5505  or  or
5506    
5507  C<< my \@regions = FIG::filter_regions( $contig, $min, $max,  @regions ); >>      my \@regions = FIG::filter_regions( $contig, $min, $max,  @regions );
5508    
5509  or  or
5510    
5511  C<< my @regions = FIG::filter_regions( $contig, $min, $max, \@regions ); >>      my @regions = FIG::filter_regions( $contig, $min, $max, \@regions );
5512    
5513  or  or
5514    
5515  C<< my \@regions = FIG::filter_regions( $contig, $min, $max, \@regions ); >>      my \@regions = FIG::filter_regions( $contig, $min, $max, \@regions );
5516    
5517  Filter a list of regions to those that overlap a specified section of a  Filter a list of regions to those that overlap a specified section of a
5518  particular contig. Region definitions correspond to those produced  particular contig. Region definitions correspond to those produced
# Line 5599  Line 5599 
5599    
5600  =head3 close_genes  =head3 close_genes
5601    
5602  C<< my @features = $fig->close_genes($fid, $dist); >>      my @features = $fig->close_genes($fid, $dist);
5603    
5604  Return all features within a certain distance of a specified other feature.  Return all features within a certain distance of a specified other feature.
5605    
# Line 5657  Line 5657 
5657    
5658  =head3 adjacent_genes  =head3 adjacent_genes
5659    
5660  C<< my ($left_fid, $right_fid) = $fig->adjacent_genes($fid, $dist); >>      my ($left_fid, $right_fid) = $fig->adjacent_genes($fid, $dist);
5661    
5662  Return the IDs of the genes immediately to the left and right of a specified  Return the IDs of the genes immediately to the left and right of a specified
5663  feature.  feature.
# Line 5906  Line 5906 
5906    
5907  =head3 feature_location  =head3 feature_location
5908    
5909  C<< my $loc = $fig->feature_location($fid); >>      my $loc = $fig->feature_location($fid);
5910    
5911  or  or
5912    
5913  C<< my @loc = $fig->feature_location($fid);; >>      my @loc = $fig->feature_location($fid);;
5914    
5915  Return the location of a feature. The location consists  Return the location of a feature. The location consists
5916  of a list of (contigID, begin, end) triples encoded  of a list of (contigID, begin, end) triples encoded
# Line 5969  Line 5969 
5969    
5970  =head3 contig_of  =head3 contig_of
5971    
5972  C<< my $contigID = $fig->contig_of($location); >>      my $contigID = $fig->contig_of($location);
5973    
5974  Return the ID of the contig containing a location.  Return the ID of the contig containing a location.
5975    
# Line 6003  Line 6003 
6003    
6004  =head3 beg_of  =head3 beg_of
6005    
6006  C<< my $beg = $fig->beg_of($location); >>      my $beg = $fig->beg_of($location);
6007    
6008  Return the beginning point of a location.  Return the beginning point of a location.
6009    
# Line 6037  Line 6037 
6037    
6038  =head3 end_of  =head3 end_of
6039    
6040  C<< my $end = $fig->end_of($location); >>      my $end = $fig->end_of($location);
6041    
6042  Return the ending point of a location.  Return the ending point of a location.
6043    
# Line 6071  Line 6071 
6071    
6072  =head3 upstream_of  =head3 upstream_of
6073    
6074  C<< my $dna = $fig->upstream_of($peg, $upstream, $coding); >>      my $dna = $fig->upstream_of($peg, $upstream, $coding);
6075    
6076  Return the DNA immediately upstream of a feature. This method contains code lifted from  Return the DNA immediately upstream of a feature. This method contains code lifted from
6077  the C<upstream.pl> script.  the C<upstream.pl> script.
# Line 6115  Line 6115 
6115    
6116  =head3 strand_of  =head3 strand_of
6117    
6118  C<< my $strand = $fig->contig_of($location); >>      my $strand = $fig->contig_of($location);
6119    
6120  Return the strand (C<+> or C<->) of a location.  Return the strand (C<+> or C<->) of a location.
6121    
# Line 6151  Line 6151 
6151    
6152  =head3 find_contig_with_checksum  =head3 find_contig_with_checksum
6153    
6154  C<< my $contigID = $fig->find_contig_with_checksum($genome, $checksum); >>      my $contigID = $fig->find_contig_with_checksum($genome, $checksum);
6155    
6156  Find a contig in the given genome with the given checksum.  Find a contig in the given genome with the given checksum.
6157    
# Line 6264  Line 6264 
6264    
6265  =head3 contig_checksum  =head3 contig_checksum
6266    
6267  C<< my $checksum = $fig->contig_checksum($genome, $contig); >>      my $checksum = $fig->contig_checksum($genome, $contig);
6268    
6269  or  or
6270    
6271  C<< my @checksum = $fig->contig_checksum($genome, $contig); >>      my @checksum = $fig->contig_checksum($genome, $contig);
6272    
6273  Return the checksum of the specified contig. The checksum is computed from the  Return the checksum of the specified contig. The checksum is computed from the
6274  contig's content in a parallel process. The process returns a space-delimited list  contig's content in a parallel process. The process returns a space-delimited list
# Line 6399  Line 6399 
6399    
6400  =head3 all_features_detailed  =head3 all_features_detailed
6401    
6402  C<< my $featureList = $fig->all_features_detailed($genome); >>      my $featureList = $fig->all_features_detailed($genome);
6403    
6404  Returns a list of all features in the designated genome, with their location, alias,  Returns a list of all features in the designated genome, with their location, alias,
6405  and type information included. This is used in the GenDB import and Sprout load to  and type information included. This is used in the GenDB import and Sprout load to
# Line 6438  Line 6438 
6438    
6439  =head3 all_features_detailed_fast  =head3 all_features_detailed_fast
6440    
6441  C<< my $featureList = $fig->all_features_detailed($genome, $min, $max, $contig); >>      my $featureList = $fig->all_features_detailed($genome, $min, $max, $contig);
6442    
6443  Returns a list of all features in the designated genome, with various useful information  Returns a list of all features in the designated genome, with various useful information
6444  included.  included.
# Line 6519  Line 6519 
6519    
6520  =head3 all_features  =head3 all_features
6521    
6522  C<< my @fidList = $fig->all_features($genome,$type); >>      my @fidList = $fig->all_features($genome,$type);
6523    
6524  Returns a list of all feature IDs of a specified type in the designated genome.  You would  Returns a list of all feature IDs of a specified type in the designated genome.  You would
6525  usually use just  usually use just
# Line 6746  Line 6746 
6746    
6747  =head3 uniprot_aliases_bulk  =head3 uniprot_aliases_bulk
6748    
6749  C<< my $hash = $fig->uniprot_aliases_bulk(\@fids, $no_del_check); >>      my $hash = $fig->uniprot_aliases_bulk(\@fids, $no_del_check);
6750    
6751  Return a hash mapping the specified feature IDs to lists of their uniprot  Return a hash mapping the specified feature IDs to lists of their uniprot
6752  aliases.  aliases.
# Line 7297  Line 7297 
7297    
7298  =head3 abstract_coupled_to  =head3 abstract_coupled_to
7299    
7300  C<< my @coupled_to = $fig->abstract_coupled_to($peg); >>      my @coupled_to = $fig->abstract_coupled_to($peg);
7301    
7302  Return a list of functionally coupled PEGs.  Return a list of functionally coupled PEGs.
7303    
# Line 7337  Line 7337 
7337    
7338  =head3 coupled_to  =head3 coupled_to
7339    
7340  C<< my @coupled_to = $fig->coupled_to($peg); >>      my @coupled_to = $fig->coupled_to($peg);
7341    
7342  Return a list of functionally coupled PEGs.  Return a list of functionally coupled PEGs.
7343    
# Line 7927  Line 7927 
7927    
7928  =head3 get_translation  =head3 get_translation
7929    
7930  C<< my $translation = $fig->get_translation($prot_id); >>      my $translation = $fig->get_translation($prot_id);
7931    
7932  The system takes any number of sources of protein sequences as input (and builds an nr  The system takes any number of sources of protein sequences as input (and builds an nr
7933  for the purpose of computing similarities).  For each of these input fasta files, it saves  for the purpose of computing similarities).  For each of these input fasta files, it saves
# Line 8141  Line 8141 
8141    
8142  =head3 function_of  =head3 function_of
8143    
8144  C<< my $function = $fig->function_of($id, $user); >>      my $function = $fig->function_of($id, $user);
8145    
8146  or  or
8147    
8148  C<< my @functions = $fig->function_of($id); >>      my @functions = $fig->function_of($id);
8149    
8150  In a scalar context, returns the most recently-determined functional  In a scalar context, returns the most recently-determined functional
8151  assignment of a specified feature by a particular user. In a list  assignment of a specified feature by a particular user. In a list
# Line 8241  Line 8241 
8241    
8242  =head3 function_of_bulk  =head3 function_of_bulk
8243    
8244  C<< my $functionHash = $fig->function_of_bulk(\@fids, $no_del_check); >>      my $functionHash = $fig->function_of_bulk(\@fids, $no_del_check);
8245    
8246  Return a hash mapping the specified proteins to their master functional assignments.  Return a hash mapping the specified proteins to their master functional assignments.
8247    
# Line 9628  Line 9628 
9628    
9629  =head3 bbhs  =head3 bbhs
9630    
9631  C<< my @bbhList = $fig->bbhs($peg, $cutoff); >>      my @bbhList = $fig->bbhs($peg, $cutoff);
9632    
9633  Return a list of the bi-directional best hits relevant to the specified PEG.  Return a list of the bi-directional best hits relevant to the specified PEG.
9634    
# Line 9675  Line 9675 
9675    
9676  =head3 bbh_list  =head3 bbh_list
9677    
9678  C<< my $bbhHash = $fig->bbh_list($genomeID, \@featureList); >>      my $bbhHash = $fig->bbh_list($genomeID, \@featureList);
9679    
9680  Return a hash mapping the features in a specified list to their bidirectional best hits  Return a hash mapping the features in a specified list to their bidirectional best hits
9681  on a specified target genome.  on a specified target genome.
# Line 10079  Line 10079 
10079    
10080  =head3 add_annotation  =head3 add_annotation
10081    
10082  C<< my $okFlag = $fig->add_annotation($fid, $user, $annotation, $time_made); >>      my $okFlag = $fig->add_annotation($fid, $user, $annotation, $time_made);
10083    
10084  Add an annotation to a feature.  Add an annotation to a feature.
10085    
# Line 10152  Line 10152 
10152    
10153  =head3 add_annotation_batch  =head3 add_annotation_batch
10154    
10155  C<< my ($n_added, $badList) = $fig->add_annotation_batch($file); >>      my ($n_added, $badList) = $fig->add_annotation_batch($file);
10156    
10157  Install a batch of annotations.  Install a batch of annotations.
10158    
# Line 10298  Line 10298 
10298    
10299  =head3 feature_annotations  =head3 feature_annotations
10300    
10301  C<< my @annotations = $fig->feature_annotations($fid, $rawtime); >>      my @annotations = $fig->feature_annotations($fid, $rawtime);
10302    
10303  Return a list of the specified feature's annotations. Each entry in the list  Return a list of the specified feature's annotations. Each entry in the list
10304  returned is a 4-tuple containing the feature ID, time stamp, user ID, and  returned is a 4-tuple containing the feature ID, time stamp, user ID, and
# Line 10417  Line 10417 
10417    
10418  =head3 read_all_annotations  =head3 read_all_annotations
10419    
10420  C<< my @annotations = $fig->read_all_annotations($genomeID); >>      my @annotations = $fig->read_all_annotations($genomeID);
10421    
10422  Return a list of the specified genome's annotations. Each entry in the list  Return a list of the specified genome's annotations. Each entry in the list
10423  returned is a 4-tuple containing the feature ID, time stamp, user ID, and  returned is a 4-tuple containing the feature ID, time stamp, user ID, and
# Line 10473  Line 10473 
10473    
10474  =head3 read_annotation_record  =head3 read_annotation_record
10475    
10476  C<< my $annoString = FIG::read_annotation_record($fileHandle); >>      my $annoString = FIG::read_annotation_record($fileHandle);
10477    
10478  Read an annotation record from the specified file handle. Will return the  Read an annotation record from the specified file handle. Will return the
10479  annotation record if successful, and C<undef> if end-of-file is read. An  annotation record if successful, and C<undef> if end-of-file is read. An
# Line 11088  Line 11088 
11088    
11089  =head3 get_attributes  =head3 get_attributes
11090    
11091  C<< my @attributeList = $fig->get_attributes($objectID, $key, @values); >>      my @attributeList = $fig->get_attributes($objectID, $key, @values);
11092    
11093  In the database, attribute values are sectioned into pieces using a splitter  In the database, attribute values are sectioned into pieces using a splitter
11094  value specified in the constructor (L</new>). This is not a requirement of  value specified in the constructor (L</new>). This is not a requirement of
# Line 11235  Line 11235 
11235    
11236  =head3 query_attributes  =head3 query_attributes
11237    
11238  C<< my @attributeData = $ca->query_attributes($filter, $filterParms); >>      my @attributeData = $ca->query_attributes($filter, $filterParms);
11239    
11240  Return the attribute data based on an SQL filter clause. In the filter clause,  Return the attribute data based on an SQL filter clause. In the filter clause,
11241  the name C<$object> should be used for the object ID, C<$key> should be used for  the name C<$object> should be used for the object ID, C<$key> should be used for
# Line 11329  Line 11329 
11329    
11330  =head3 delete_attribute  =head3 delete_attribute
11331    
11332  C<< $fig->delete_attribute($objectID, $key, @values); >>      $fig->delete_attribute($objectID, $key, @values);
11333    
11334  Delete the specified attribute key/value combination from the database.  Delete the specified attribute key/value combination from the database.
11335    
# Line 11379  Line 11379 
11379    
11380  =head3 parse_oid  =head3 parse_oid
11381    
11382  C<< my ($type, $id) = FIG::parse_oid($idValue); >>      my ($type, $id) = FIG::parse_oid($idValue);
11383    
11384  Convert an attribute object ID to an object type and an ID applicable to that type.  Convert an attribute object ID to an object type and an ID applicable to that type.
11385  This information can be used to convert an ID string obtained from the L</get_attributes>  This information can be used to convert an ID string obtained from the L</get_attributes>
# Line 11408  Line 11408 
11408    
11409  =head3 form_oid  =head3 form_oid
11410    
11411  C<< my $idValue = FIG::form_oid($type, $id); >>      my $idValue = FIG::form_oid($type, $id);
11412    
11413  Convert an object type and ID into an ID string for the attribute database.  Convert an object type and ID into an ID string for the attribute database.
11414    
# Line 11440  Line 11440 
11440    
11441  =head3 delete_matching_attributes  =head3 delete_matching_attributes
11442    
11443  C<< my @attributeList = $fig->delete_matching_attributes($objectID, $key, @values); >>      my @attributeList = $fig->delete_matching_attributes($objectID, $key, @values);
11444    
11445  This method works identically to L</get_attributes>, except that the attributes are  This method works identically to L</get_attributes>, except that the attributes are
11446  deleted as they are retrieved.  deleted as they are retrieved.
# Line 11464  Line 11464 
11464    
11465  =head3 change_attribute  =head3 change_attribute
11466    
11467  C<< $fig->change_attribute($objectID, $key, \@oldValues, \@newValues); >>      $fig->change_attribute($objectID, $key, \@oldValues, \@newValues);
11468    
11469  Change the value of an attribute key/value pair for an object. This is  Change the value of an attribute key/value pair for an object. This is
11470  implemented as a delete followed by an insert.  implemented as a delete followed by an insert.
# Line 11574  Line 11574 
11574    
11575  =head3 essential  =head3 essential
11576    
11577  C<< my $flag = $fig->essential($fid); >>      my $flag = $fig->essential($fid);
11578    
11579  Return TRUE if a feature is considered essential and FALSE otherwise. This method  Return TRUE if a feature is considered essential and FALSE otherwise. This method
11580  provides a uniform method for determining essentiality that will remain consistent  provides a uniform method for determining essentiality that will remain consistent
# Line 11617  Line 11617 
11617    
11618  =head3 virulent  =head3 virulent
11619    
11620  C<< my $flag = $fig->virulent($fid); >>      my $flag = $fig->virulent($fid);
11621    
11622  Return TRUE if a feature is considered virulent and FALSE otherwise. This method  Return TRUE if a feature is considered virulent and FALSE otherwise. This method
11623  provides a uniform method for determining virulence that will remain consistent  provides a uniform method for determining virulence that will remain consistent
# Line 11843  Line 11843 
11843    
11844  =head3 get_group_keys  =head3 get_group_keys
11845    
11846  C<< my @keys = $fig->get_group_keys($groupName); >>      my @keys = $fig->get_group_keys($groupName);
11847    
11848  Return all the attribute keys in the named group.  Return all the attribute keys in the named group.
11849    
# Line 11872  Line 11872 
11872    
11873  =head3 get_group_key_info  =head3 get_group_key_info
11874    
11875  C<< my %keys = $fig->get_group_key_info($groupName); >>      my %keys = $fig->get_group_key_info($groupName);
11876    
11877  Return the descriptive data for all the attribute keys in the named group.  Return the descriptive data for all the attribute keys in the named group.
11878    
# Line 12544  Line 12544 
12544    
12545  =head3 search_index  =head3 search_index
12546    
12547  C<< my ($pegs,$roles) = fig->search_index($pattern, $non_word_search, $user); >>      my ($pegs,$roles) = fig->search_index($pattern, $non_word_search, $user);
12548    
12549  Find all pegs and roles that match a search pattern. The syntax of I<$pattern>  Find all pegs and roles that match a search pattern. The syntax of I<$pattern>
12550  is deliberately left undefined so that we can change the underlying technology, but  is deliberately left undefined so that we can change the underlying technology, but
# Line 12678  Line 12678 
12678    
12679  =head3 choose_function  =head3 choose_function
12680    
12681  C<< my ($who, $function) = $fig->choose_function($user, @funcs); >>      my ($who, $function) = $fig->choose_function($user, @funcs);
12682    
12683  Choose the best functional role from a list of role/user tuples. If a user is  Choose the best functional role from a list of role/user tuples. If a user is
12684  specified, we look for one by that user. If that doesn't work, we look for one  specified, we look for one by that user. If that doesn't work, we look for one
# Line 12741  Line 12741 
12741  ################################# Loading Databases  ####################################  ################################# Loading Databases  ####################################
12742  =head3 load_all_list  =head3 load_all_list
12743    
12744  C<< my @packages = FIG::load_all_list(); >>      my @packages = FIG::load_all_list();
12745    
12746  Return a list of the commands to be executed in order to load the SEED database.  Return a list of the commands to be executed in order to load the SEED database.
12747    
# Line 12905  Line 12905 
12905    
12906  =head3 families_for_protein  =head3 families_for_protein
12907    
12908  C<< my @families = $fig->families_for_protein($peg); >>      my @families = $fig->families_for_protein($peg);
12909    
12910  Return a list of all the families containing the specified protein.  Return a list of all the families containing the specified protein.
12911    
# Line 12933  Line 12933 
12933    
12934  =head3 proteins_in_family  =head3 proteins_in_family
12935    
12936  C<< my @proteins = $fig->proteins_in_family($family); >>      my @proteins = $fig->proteins_in_family($family);
12937    
12938  Return a list of every protein in a family.  Return a list of every protein in a family.
12939    
# Line 12965  Line 12965 
12965    
12966  =head3 family_function  =head3 family_function
12967    
12968  C<< my $func = $fig->family_function($family); >>      my $func = $fig->family_function($family);
12969    
12970  Returns the putative function of all of the pegs in a protein family.  Remember, we  Returns the putative function of all of the pegs in a protein family.  Remember, we
12971  are defining "protein family" as a set of homologous proteins that have the  are defining "protein family" as a set of homologous proteins that have the
# Line 13003  Line 13003 
13003    
13004  =head3 sz_family  =head3 sz_family
13005    
13006  C<< my $n = $fig->sz_family($family); >>      my $n = $fig->sz_family($family);
13007    
13008  Returns the number of proteins in a family.  Returns the number of proteins in a family.
13009    
# Line 13492  Line 13492 
13492    
13493  =head3 all_compounds  =head3 all_compounds
13494    
13495  C<< my @compounds = $fig->all_compounds(); >>      my @compounds = $fig->all_compounds();
13496    
13497  Return a list containing all of the KEGG compounds.  Return a list containing all of the KEGG compounds.
13498    
# Line 13512  Line 13512 
13512    
13513  =head3 names_of_compound  =head3 names_of_compound
13514    
13515  C<< my @names = $fig->names_of_compound($cid); >>      my @names = $fig->names_of_compound($cid);
13516    
13517  Returns a list containing all of the names assigned to the specified KEGG compound. The list  Returns a list containing all of the names assigned to the specified KEGG compound. The list
13518  will be ordered as given by KEGG.  will be ordered as given by KEGG.
# Line 13591  Line 13591 
13591    
13592  =head3 comp2react  =head3 comp2react
13593    
13594  C<< my @rids = $fig->comp2react($cid); >>      my @rids = $fig->comp2react($cid);
13595    
13596  Returns a list containing all of the reaction IDs for reactions that take $cid  Returns a list containing all of the reaction IDs for reactions that take $cid
13597  as either a substrate or a product.  as either a substrate or a product.
# Line 13612  Line 13612 
13612    
13613  =head3 valid_reaction_id  =head3 valid_reaction_id
13614    
13615  C<< my $flag = $fig->valid_reaction_id($rid); >>      my $flag = $fig->valid_reaction_id($rid);
13616    
13617  Returns true iff the specified ID is a valid reaction ID.  Returns true iff the specified ID is a valid reaction ID.
13618    
# Line 13643  Line 13643 
13643    
13644  =head3 cas  =head3 cas
13645    
13646  C<< my $cas = $fig->cas($cid); >>      my $cas = $fig->cas($cid);
13647    
13648  Return the Chemical Abstract Service (CAS) ID for the compound, if known.  Return the Chemical Abstract Service (CAS) ID for the compound, if known.
13649    
# Line 13676  Line 13676 
13676    
13677  =head3 cas_to_cid  =head3 cas_to_cid
13678    
13679  C<< my $cid = $fig->cas_to_cid($cas); >>      my $cid = $fig->cas_to_cid($cas);
13680    
13681  Return the compound id (cid), given the Chemical Abstract Service (CAS) ID.  Return the compound id (cid), given the Chemical Abstract Service (CAS) ID.
13682    
# Line 13709  Line 13709 
13709    
13710  =head3 all_reactions  =head3 all_reactions
13711    
13712  C<< my @rids = $fig->all_reactions(); >>      my @rids = $fig->all_reactions();
13713    
13714  Return a list containing all of the KEGG reaction IDs.  Return a list containing all of the KEGG reaction IDs.
13715    
# Line 13729  Line 13729 
13729    
13730  =head3 reversible  =head3 reversible
13731    
13732  C<< my $flag = $fig->reversible($rid); >>      my $flag = $fig->reversible($rid);
13733    
13734  Return TRUE if the specified reaction is reversible. A reversible reaction has no main  Return TRUE if the specified reaction is reversible. A reversible reaction has no main
13735  direction. The connector is symbolized by C<< <=> >> instead of C<< => >>.  direction. The connector is symbolized by C<< <=> >> instead of C<< => >>.
# Line 13763  Line 13763 
13763    
13764  =head3 reaction_direction  =head3 reaction_direction
13765    
13766  C<< my $rev = $fig->reaction_direction($rid); >>      my $rev = $fig->reaction_direction($rid);
13767    
13768  Returns an array of triplets mapping from reactions in the context of maps to reversibility.  Returns an array of triplets mapping from reactions in the context of maps to reversibility.
13769    
# Line 13803  Line 13803 
13803    
13804  =head3 reaction2comp  =head3 reaction2comp
13805    
13806  C<< my @tuples = $fig->reaction2comp($rid, $which, $paths); >>      my @tuples = $fig->reaction2comp($rid, $which, $paths);
13807    
13808  Return the substrates or products for a reaction.  In any event (i.e.,  Return the substrates or products for a reaction.  In any event (i.e.,
13809  whether you ask for substrates or products), you get back a list of  whether you ask for substrates or products), you get back a list of
# Line 13876  Line 13876 
13876    
13877  =head3 catalyzed_by  =head3 catalyzed_by
13878    
13879  C<< my @ecs = $fig->catalyzed_by($rid); >>      my @ecs = $fig->catalyzed_by($rid);
13880    
13881  Return the ECs (roles) that are reputed to catalyze the reaction.  Note that we are currently  Return the ECs (roles) that are reputed to catalyze the reaction.  Note that we are currently
13882  just returning the ECs that KEGG gives.  We need to handle the incompletely specified forms  just returning the ECs that KEGG gives.  We need to handle the incompletely specified forms
# Line 13910  Line 13910 
13910    
13911  =head3 catalyzes  =head3 catalyzes
13912    
13913  C<< my @ecs = $fig->catalyzes($role); >>      my @ecs = $fig->catalyzes($role);
13914    
13915  Returns the reaction IDs of the reactions catalyzed by the specified role (normally an EC).  Returns the reaction IDs of the reactions catalyzed by the specified role (normally an EC).
13916    
# Line 13944  Line 13944 
13944    
13945  =head3 displayable_reaction  =head3 displayable_reaction
13946    
13947  C<< my $displayString = $fig->displayable_reaction($rid) >>      my $displayString = $fig->displayable_reaction($rid)
13948    
13949  Returns a string giving the displayable version of a reaction.  Returns a string giving the displayable version of a reaction.
13950    
# Line 13964  Line 13964 
13964    
13965  =head3 all_maps  =head3 all_maps
13966    
13967  C<< my @maps = $fig->all_maps(); >>      my @maps = $fig->all_maps();
13968    
13969  Return all of the KEGG maps in the data store.  Return all of the KEGG maps in the data store.
13970    
# Line 14012  Line 14012 
14012    
14013  =head3 ec_to_maps  =head3 ec_to_maps
14014    
14015  C<< my @maps = $fig->ec_to_maps($ec); >>      my @maps = $fig->ec_to_maps($ec);
14016    
14017  Return the set of maps that contain a specific functional role. The role can be  Return the set of maps that contain a specific functional role. The role can be
14018  specified by an EC number or a full-blown role ID.  specified by an EC number or a full-blown role ID.
# Line 14056  Line 14056 
14056    
14057  =head3 map_to_ecs  =head3 map_to_ecs
14058    
14059  C<< my @ecs = $fig->map_to_ecs($map); >>      my @ecs = $fig->map_to_ecs($map);
14060    
14061  Return the set of functional roles (usually ECs) that are contained in the functionality  Return the set of functional roles (usually ECs) that are contained in the functionality
14062  depicted by a map.  depicted by a map.
# Line 14089  Line 14089 
14089    
14090  =head3 map_name  =head3 map_name
14091    
14092  C<< my $name = $fig->map_name($map); >>      my $name = $fig->map_name($map);
14093    
14094  Return the descriptive name covering the functionality depicted by the specified map.  Return the descriptive name covering the functionality depicted by the specified map.
14095    
# Line 14153  Line 14153 
14153    
14154  =head3 roles_of_function  =head3 roles_of_function
14155    
14156  C<< my @roles = $fig->roles_of_function($func); >>      my @roles = $fig->roles_of_function($func);
14157    
14158  Returns a list of the functional roles implemented by the specified function. This method  Returns a list of the functional roles implemented by the specified function. This method
14159  parses the role data out of the function name, and does not require access to the database.  parses the role data out of the function name, and does not require access to the database.
# Line 14201  Line 14201 
14201    
14202  =head3 protein_subsystem_to_roles  =head3 protein_subsystem_to_roles
14203    
14204  C<< my $roles = $fig->protein_subsystem_to_roles($peg, $subsystem); >>      my $roles = $fig->protein_subsystem_to_roles($peg, $subsystem);
14205    
14206  Return the roles played by a particular PEG in a particular subsytem. If the protein is not part of the  Return the roles played by a particular PEG in a particular subsytem. If the protein is not part of the
14207  subsystem, an empty list will be returned.  subsystem, an empty list will be returned.
# Line 14275  Line 14275 
14275    
14276  =head3 seqs_with_role  =head3 seqs_with_role
14277    
14278  C<< my @pegs = $fig->seqs_with_role($role,$who); >>      my @pegs = $fig->seqs_with_role($role,$who);
14279    
14280  Return a list of the pegs that implement $role.  If $who is not given, it  Return a list of the pegs that implement $role.  If $who is not given, it
14281  defaults to "master".  The system returns all pegs with an assignment made by  defaults to "master".  The system returns all pegs with an assignment made by
# Line 14819  Line 14819 
14819    
14820  =head3 contigs_of  =head3 contigs_of
14821    
14822  C<< my @contig_ids = $fig->contigs_of($genome); >>      my @contig_ids = $fig->contigs_of($genome);
14823    
14824  Returns a list of all of the contigs occurring in the designated genome.  Returns a list of all of the contigs occurring in the designated genome.
14825    
# Line 14923  Line 14923 
14923    
14924  =head3 get_dna_seq  =head3 get_dna_seq
14925    
14926  C<< my $seq = $fig->get_dna_seq($fid); >>      my $seq = $fig->get_dna_seq($fid);
14927    
14928  Returns the DNA sequence for an FID  Returns the DNA sequence for an FID
14929    
# Line 15502  Line 15502 
15502    
15503  =head3 active_subsystems  =head3 active_subsystems
15504    
15505  C<< my $ssHash = $fig->active_subsystems($genome, $allFlag); >>      my $ssHash = $fig->active_subsystems($genome, $allFlag);
15506    
15507  Get all the subsystems in which a genome is present. The return value is a hash  Get all the subsystems in which a genome is present. The return value is a hash
15508  which maps each subsystem name to the code for the variant used by the specified  which maps each subsystem name to the code for the variant used by the specified
# Line 15882  Line 15882 
15882    
15883  =head3 all_subsystems  =head3 all_subsystems
15884    
15885  C<< my @names = $fig->all_subsystems(); >>      my @names = $fig->all_subsystems();
15886    
15887  Return a list of all of the subsystems in the data store.  Return a list of all of the subsystems in the data store.
15888    
# Line 15902  Line 15902 
15902    
15903  =head3 all_usable_subsystems  =head3 all_usable_subsystems
15904    
15905  C<< my @names = $fig->all_usable_subsystems(); >>      my @names = $fig->all_usable_subsystems();
15906    
15907  Return a list of all of the subsystems in the data store that are "usable", that is,  Return a list of all of the subsystems in the data store that are "usable", that is,
15908  not experimental or deleted.  not experimental or deleted.
# Line 16175  Line 16175 
16175   }   }
16176  }  }
16177    
16178  =head3 all_subsystem_classifications()  =head3 all_subsystem_classifications
16179    
16180  usage:      my @classifications = $fig->all_subsystem_classifications();
         $classifications=$fig->all_subsystems_classifications();  
         print map {join "\t", @$_} @$classifications;  
16181    
16182  Returns a array where each element is a reference to an array of the two classifications.  Return a list of all the subsystem classifications. Each element in the
16183    list will contain a main subsystem class and a basic subsystem class.
16184    The resulting list enables us to determine easily what the three-level
16185    subsystem tree would look like.
16186    
16187  =cut  =cut
16188    
# Line 16406  Line 16407 
16407    
16408  =head3 readSpreadsheetForGenomes  =head3 readSpreadsheetForGenomes
16409    
16410  C<< my $genomeList = $fig->readSpreadsheetForGenomes($fileName, $all); >>      my $genomeList = $fig->readSpreadsheetForGenomes($fileName, $all);
16411    
16412  Read the genomes from a specific subsystem file. This allows the client to get  Read the genomes from a specific subsystem file. This allows the client to get
16413  the genome data for a backup subsystem.  the genome data for a backup subsystem.
# Line 16491  Line 16492 
16492    
16493  =head3 get_subsystem  =head3 get_subsystem
16494    
16495  C<< my $subsysObject = $fig->get_subsystem($name, $force_load); >>      my $subsysObject = $fig->get_subsystem($name, $force_load);
16496    
16497  Return a subsystem object for manipulation of the named subsystem. If the  Return a subsystem object for manipulation of the named subsystem. If the
16498  subsystem does not exist, an undefined value will be returned.  subsystem does not exist, an undefined value will be returned.
# Line 16532  Line 16533 
16533    
16534  =head3 subsystem_to_roles  =head3 subsystem_to_roles
16535    
16536  C<< my @roles = $fig->subsystem_to_roles($subsysID); >>      my @roles = $fig->subsystem_to_roles($subsysID);
16537    
16538  Return a list of the roles for the specified subsystem.  Return a list of the roles for the specified subsystem.
16539    
# Line 17204  Line 17205 
17205    
17206  =head3 get_genome_subsystem_count  =head3 get_genome_subsystem_count
17207    
17208  C<< my $num_subsytems = $fig->get_genome_subsystem_count($genomeID); >>      my $num_subsytems = $fig->get_genome_subsystem_count($genomeID);
17209    
17210  Return the number of subsystems of the genome identified by $genomeID.  Return the number of subsystems of the genome identified by $genomeID.
17211    
# Line 17243  Line 17244 
17244    
17245  =head3 get_genome_subsystem_data  =head3 get_genome_subsystem_data
17246    
17247  C<< my $roleList = $fig->get_genome_subsystem_data($genomeID); >>      my $roleList = $fig->get_genome_subsystem_data($genomeID);
17248    
17249  Return the roles and pegs for a genome's participation in subsystems. The  Return the roles and pegs for a genome's participation in subsystems. The
17250  subsystem name, role ID, and feature ID will be returned for each of  subsystem name, role ID, and feature ID will be returned for each of
# Line 17304  Line 17305 
17305    
17306  =head3 get_genome_stats  =head3 get_genome_stats
17307    
17308  C<< my ($gname,$szdna,$pegs,$rnas,$taxonomy) = $fig->get_genome_stats($genomeID); >>      my ($gname,$szdna,$pegs,$rnas,$taxonomy) = $fig->get_genome_stats($genomeID);
17309    
17310  Return basic statistics about a genome.  Return basic statistics about a genome.
17311    
# Line 17347  Line 17348 
17348    
17349  =head3 get_genome_assignment_data  =head3 get_genome_assignment_data
17350    
17351  C<< my $roleList = $fig->get_genome_subsystem_data($genomeID); >>      my $roleList = $fig->get_genome_subsystem_data($genomeID);
17352    
17353  Return the functional assignments and pegs for a genome. The feature ID and assigned  Return the functional assignments and pegs for a genome. The feature ID and assigned
17354  function will be returned for each of the genome's PEGs.  function will be returned for each of the genome's PEGs.
# Line 17884  Line 17885 
17885    
17886  =head3 fid_links  =head3 fid_links
17887    
17888  C<< my @links = $fig->fid_links($fid); >>      my @links = $fig->fid_links($fid);
17889    
17890  Return a list of hyperlinks to web resources about a specified feature.  Return a list of hyperlinks to web resources about a specified feature.
17891    
# Line 17948  Line 17949 
17949    
17950  =head3 fids_with_link_to  =head3 fids_with_link_to
17951    
17952  C<< my @links = $fig->fids_with_link_to("text"); >>      my @links = $fig->fids_with_link_to("text");
17953    
17954  Return a list of tples of [fid, link] where text is a free-text string that will match to the URL. You can use this to get all the links that point to PIR, for example to identify all proteins that are members of PIR superfamilies.  Return a list of tples of [fid, link] where text is a free-text string that will match to the URL. You can use this to get all the links that point to PIR, for example to identify all proteins that are members of PIR superfamilies.
17955    
# Line 18283  Line 18284 
18284    
18285  =head3 is_ec  =head3 is_ec
18286    
18287  C<< my $flag = FIG::is_ec($role); >>      my $flag = FIG::is_ec($role);
18288    
18289  Return TRUE if the specified role is an EC number, else FALSE. This can be used to  Return TRUE if the specified role is an EC number, else FALSE. This can be used to
18290  determine whether a role is specified via a role ID or the role's EC number.  determine whether a role is specified via a role ID or the role's EC number.
# Line 18611  Line 18612 
18612    
18613  =head3 add_feature  =head3 add_feature
18614    
18615  C<< my $fid = $fig->add_feature($user,$genome,$type,$location,$aliases,$translation,$fid); >>      my $fid = $fig->add_feature($user,$genome,$type,$location,$aliases,$translation,$fid);
18616    
18617  Invoking this routine adds the feature, returning a new (generated) $fid. It is  Invoking this routine adds the feature, returning a new (generated) $fid. It is
18618  also possible to specify the feature ID, which is recommended if the feature is  also possible to specify the feature ID, which is recommended if the feature is
# Line 19511  Line 19512 
19512    
19513  =head3 ReadMarkups  =head3 ReadMarkups
19514    
19515  C<< my $marks = $fig->ReadMarkups($fid); >>      my $marks = $fig->ReadMarkups($fid);
19516    
19517  Read the markup data for the specified feature. The markings are returned as a  Read the markup data for the specified feature. The markings are returned as a
19518  list of triples. Each triple contains the start location of a markup, the  list of triples. Each triple contains the start location of a markup, the
# Line 19551  Line 19552 
19552    
19553  =head3 WriteMarkups  =head3 WriteMarkups
19554    
19555  C<< $fig->WriteMarkups($fid, \@marks); >>      $fig->WriteMarkups($fid, \@marks);
19556    
19557  Write out the markups for the specified feature. If the markup file for the  Write out the markups for the specified feature. If the markup file for the
19558  specified feature does not exist, it will be created. If it does exist, it  specified feature does not exist, it will be created. If it does exist, it
# Line 19591  Line 19592 
19592    
19593  =head3 _MarkupFileName  =head3 _MarkupFileName
19594    
19595  C<< my $name = FIG::_MarkupFileName($fid); >>      my $name = FIG::_MarkupFileName($fid);
19596    
19597  Return the name of the file containing the markup data for the specified feature.  Return the name of the file containing the markup data for the specified feature.
19598    
# Line 19666  Line 19667 
19667    
19668  =head3 GetDefault  =head3 GetDefault
19669    
19670  C<< my ($group, $level) = $fig->GetDefault($objectID, $objectType); >>      my ($group, $level) = $fig->GetDefault($objectID, $objectType);
19671    
19672  Return the group name and default access level for the specified object.  Return the group name and default access level for the specified object.
19673    
# Line 19715  Line 19716 
19716    
19717  =head3 GetPreferences  =head3 GetPreferences
19718    
19719  C<< my $preferences = $fig->GetPreferences($userID, $category); >>      my $preferences = $fig->GetPreferences($userID, $category);
19720    
19721  Return a map of preference keys to values for the specified user in the  Return a map of preference keys to values for the specified user in the
19722  specified category.  specified category.
# Line 19757  Line 19758 
19758    
19759  =head3 GetCapabilities  =head3 GetCapabilities
19760    
19761  C<< my $level = $fig->GetCapabilities($userID); >>      my $level = $fig->GetCapabilities($userID);
19762    
19763  Return a map of group names to access levels (C<RW>, C<RO>, or C<NO>) for the  Return a map of group names to access levels (C<RW>, C<RO>, or C<NO>) for the
19764  specified user.  specified user.
# Line 19788  Line 19789 
19789    
19790  =head3 AllowsUpdates  =head3 AllowsUpdates
19791    
19792  C<< my $flag = $fig->AllowsUpdates(); >>      my $flag = $fig->AllowsUpdates();
19793    
19794  Return TRUE if this access object supports updates, else FALSE. If the access object  Return TRUE if this access object supports updates, else FALSE. If the access object
19795  does not support updates, none of the B<SetXXXX> methods will be called.  does not support updates, none of the B<SetXXXX> methods will be called.
# Line 19801  Line 19802 
19802    
19803  =head3 SetDefault  =head3 SetDefault
19804    
19805  C<< $fig->SetDefault($objectID, $objectType, $group, $level); >>      $fig->SetDefault($objectID, $objectType, $group, $level);
19806    
19807  Set the group and default access level for the specified object.  Set the group and default access level for the specified object.
19808    
# Line 19847  Line 19848 
19848    
19849  =head3 SetCapabilities  =head3 SetCapabilities
19850    
19851  C<< $fig->SetCapabilities($userID, \%groupLevelMap); >>      $fig->SetCapabilities($userID, \%groupLevelMap);
19852    
19853  Set the access levels by the specified user for the specified groups.  Set the access levels by the specified user for the specified groups.
19854    
# Line 19887  Line 19888 
19888    
19889  =head3 SetPreferences  =head3 SetPreferences
19890    
19891  C<< $fig->SetPreferences($userID, \%preferenceMap); >>      $fig->SetPreferences($userID, \%preferenceMap);
19892    
19893  Set the preferences for the specified user.  Set the preferences for the specified user.
19894    
# Line 19927  Line 19928 
19928    
19929  =head3 CleanupUserData  =head3 CleanupUserData
19930    
19931  C<< $fig->CleanupUserData(); >>      $fig->CleanupUserData();
19932    
19933  Release any data being held in memory for use by the UserData object.  Release any data being held in memory for use by the UserData object.
19934    
# Line 19941  Line 19942 
19942    
19943  =head3 GetObjectCapabilityFile  =head3 GetObjectCapabilityFile
19944    
19945  C<< my $fileName = FIG::_GetObjectCapabilityFile($objectType, $objectID); >>      my $fileName = FIG::_GetObjectCapabilityFile($objectType, $objectID);
19946    
19947  This is an internal method that computes the name of the file containing the  This is an internal method that computes the name of the file containing the
19948  default group and access data for a specified object. It returns the file  default group and access data for a specified object. It returns the file
# Line 19966  Line 19967 
19967    
19968  =head3 GetUserDataDirectory  =head3 GetUserDataDirectory
19969    
19970  C<< my $directoryName = FIG::_GetUserDataDirectory($userName); >>      my $directoryName = FIG::_GetUserDataDirectory($userName);
19971    
19972  Return the name of the directory containing the user's preference and capability  Return the name of the directory containing the user's preference and capability
19973  data. If the user does not have a directory, return C<undef>.  data. If the user does not have a directory, return C<undef>.
# Line 19999  Line 20000 
20000    
20001  =head3 GetUserDataFile  =head3 GetUserDataFile
20002    
20003  C<< my %userData = FIG::_GetUserDataFile($userID, $type, $prefix); >>      my %userData = FIG::_GetUserDataFile($userID, $type, $prefix);
20004    
20005  Create a hash from the user data file of the specified type. The user data file  Create a hash from the user data file of the specified type. The user data file
20006  contains two tab-delimited fields. The first field will be read in as the key  contains two tab-delimited fields. The first field will be read in as the key
# Line 20070  Line 20071 
20071    
20072  =head3 ProcessUpdates  =head3 ProcessUpdates
20073    
20074  C<< FIG::_ProcessUpdates($fileName, \%map); >>      FIG::_ProcessUpdates($fileName, \%map);
20075    
20076  Apply the specified updates to a key-value file. The records in the key-value file must  Apply the specified updates to a key-value file. The records in the key-value file must
20077  be sorted. If a key in the map matches a key in the file, the file's key value is  be sorted. If a key in the map matches a key in the file, the file's key value is
# Line 20150  Line 20151 
20151    
20152  =head3 GetInputKVRecord  =head3 GetInputKVRecord
20153    
20154  C<< my ($key, $value) = FIG::_GetInputKVRecord($handle); >>      my ($key, $value) = FIG::_GetInputKVRecord($handle);
20155    
20156  Read a key/value pair from the specified input file. If we are at end-of-file  Read a key/value pair from the specified input file. If we are at end-of-file
20157  the key returned will be the C<Tracer::EOF> constant. The key and value are  the key returned will be the C<Tracer::EOF> constant. The key and value are
# Line 20200  Line 20201 
20201    
20202  =head3 PutOutputKVRecord  =head3 PutOutputKVRecord
20203    
20204  C<< FIG::_PutOutputKVRecord($handle, $key, $value); >>      FIG::_PutOutputKVRecord($handle, $key, $value);
20205    
20206  Write a key-value pair to the output file. The value will automatically be  Write a key-value pair to the output file. The value will automatically be
20207  escaped. A tab will be used to separate the fields.  escaped. A tab will be used to separate the fields.
# Line 20239  Line 20240 
20240    
20241  =head3 model_directory  =head3 model_directory
20242    
20243  C<< FIG->model_directory($organism); >>      FIG->model_directory($organism);
20244    
20245  Returns the model directory of an organism. If $FIG_Config::models  Returns the model directory of an organism. If $FIG_Config::models
20246  is set, use that, otherwise default to $FIG_Config::organisms.  is set, use that, otherwise default to $FIG_Config::organisms.

Legend:
Removed from v.1.644  
changed lines
  Added in v.1.645

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3