[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.378, Thu Oct 13 20:13:48 2005 UTC revision 1.379, Thu Oct 20 10:22:04 2005 UTC
# Line 5876  Line 5876 
5876    
5877  =head3 function_of  =head3 function_of
5878    
5879  usage: @functions = $fig->function_of($peg)  OR  C<< my $function = $fig->function_of($id, $user); >>
        $function  = $fig->function_of($peg,$user)  
5880    
5881  In a list context, you get back a list of 2-tuples.  Each 2-tuple is of the  or
5882  form [MadeBy,Function].  
5883    C<< my @functions = $fig->function_of($id); >>
5884    
5885    In a scalar context, returns the most recently-determined functional
5886    assignment of a specified feature by a particular user. In a list
5887    context, returns a list of 2-tuples, each consisting of a user ID
5888    followed by a functional assighment by that user. In this case,
5889    the list contains all the functional assignments for the feature.
5890    
5891    =over 4
5892    
5893    =item id
5894    
5895    ID of the relevant feature.
5896    
5897    =item user
5898    
5899  In a scalar context,  ID of the user whose assignment is desired (scalar context only)
5900    
5901      1. user is "master" if not specified  =item RETURN
5902      2. function returned is the user's, if one exists; otherwise, master's, if one exists  
5903    Returns the most recent functional assignment by the given user in scalar
5904    context, and a list of functional assignments in list context. Each assignment
5905    in the list context is a 2-tuple of the form [$user, $assignment].
5906    
5907  In a scalar context, you get just the function.  =back
5908    
5909  =cut  =cut
5910    
# Line 7833  Line 7850 
7850    
7851      # build the SQL statement depending on what we have      # build the SQL statement depending on what we have
7852      my @col=('fid','tag','val','url');      my @col=('fid','tag','val','url');
7853      my $select = "SELECT fid,tag,val,url FROM attribute ";      my $select = "SELECT DISTINCT fid,tag,val,url FROM attribute ";
7854      my $first=1;      my $first=1;
7855      for (my $i=0; $i<=3; $i++)      for (my $i=0; $i<=3; $i++)
7856      {      {
# Line 9068  Line 9085 
9085    
9086  =head3 all_compounds  =head3 all_compounds
9087    
9088  usage: @compounds = $fig->all_compounds  C<< my @compounds = $fig->all_compounds(); >>
9089    
9090  Returns a list containing all of the KEGG compounds.  Return a list containing all of the KEGG compounds.
9091    
9092  =cut  =cut
9093    
# Line 9088  Line 9105 
9105    
9106  =head3 names_of_compound  =head3 names_of_compound
9107    
9108  usage: @names = $fig->names_of_compound($cid)  C<< my @names = $fig->names_of_compound($cid); >>
9109    
9110  Returns a list containing all of the names assigned to the KEGG compounds.  The list  Returns a list containing all of the names assigned to the specified KEGG compound. The list
9111  will be ordered as given by KEGG.  will be ordered as given by KEGG.
9112    
9113    =over 4
9114    
9115    =item cid
9116    
9117    ID of the desired compound.
9118    
9119    =item RETURN
9120    
9121    Returns a list of names for the specified compound.
9122    
9123    =back
9124    
9125  =cut  =cut
9126    
9127  sub names_of_compound {  sub names_of_compound {
# Line 9109  Line 9138 
9138    
9139  =head3 comp2react  =head3 comp2react
9140    
9141  usage: @rids = $fig->comp2react($cid)  C<< my @rids = $fig->comp2react($cid); >>
9142    
9143  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
9144  as either a substrate or a product.  as either a substrate or a product.
# Line 9130  Line 9159 
9159    
9160  =head3 valid_reaction_id  =head3 valid_reaction_id
9161    
9162  usage: if ($fig->valid_reaction_id($rid)  { ... }  C<< my $flag = $fig->valid_reaction_id($rid); >>
9163    
9164  Returns true iff $rid is a valid reaction ID.  Returns true iff the specified ID is a valid reaction ID.
9165    
9166  This will become important as we include non-KEGG reactions  This will become important as we include non-KEGG reactions
9167    
9168    =over 4
9169    
9170    =item rid
9171    
9172    Reaction ID to test.
9173    
9174    =item RETURN
9175    
9176    Returns TRUE if the reaction ID is in the data store, else FALSE.
9177    
9178    =back
9179    
9180  =cut  =cut
9181    
9182  sub valid_reaction_id  sub valid_reaction_id
# Line 9149  Line 9190 
9190    
9191  =head3 cas  =head3 cas
9192    
9193  usage: $cas = $fig->cas($cid)  C<< my $cas = $fig->cas($cid); >>
9194    
9195    Return the Chemical Abstract Service (CAS) ID for the compound, if known.
9196    
9197    =over 4
9198    
9199    =item cid
9200    
9201    ID of the compound whose CAS ID is desired.
9202    
9203    =item RETURN
9204    
9205    Returns the CAS ID of the specified compound, or an empty string if the CAS ID
9206    is not known or does not exist.
9207    
9208  Returns the CAS ID for the compound, if known.  =back
9209    
9210  =cut  =cut
9211    
# Line 9169  Line 9223 
9223    
9224  =head3 cas_to_cid  =head3 cas_to_cid
9225    
9226  usage: $cid = $fig->cas_to_cid($cas)  C<< my $cid = $fig->cas_to_cid($cas); >>
9227    
9228    Return the compound id (cid), given the Chemical Abstract Service (CAS) ID.
9229    
9230    =over 4
9231    
9232    =item cas
9233    
9234  Returns the compound id (cid), given the CAS ID.  CAS ID of the desired compound.
9235    
9236    =item RETURN
9237    
9238    Returns the ID of the compound corresponding to the specified CAS ID, or an empty
9239    string if the CAS ID is not in the data store.
9240    
9241    =back
9242    
9243  =cut  =cut
9244    
# Line 9189  Line 9256 
9256    
9257  =head3 all_reactions  =head3 all_reactions
9258    
9259  usage: @rids = $fig->all_reactions  << my @rids = $fig->all_reactions(); >>
9260    
9261  Returns a list containing all of the KEGG reaction IDs.  Return a list containing all of the KEGG reaction IDs.
9262    
9263  =cut  =cut
9264    
# Line 9209  Line 9276 
9276    
9277  =head3 reversible  =head3 reversible
9278    
9279  usage: $rev = $fig->reversible($rid)  C<< my $flag = $fig->reversible($rid); >>
9280    
9281  Returns true iff the reactions had a "main direction" designated as "<=>";  Return TRUE if the specified reaction is reversible. A reversible reaction has no main
9282    direction. The connector is symbolized by C<< <=> >> instead of C<< => >>.
9283    
9284    =over 4
9285    
9286    =item rid
9287    
9288    ID of the ralevant reaction.
9289    
9290    =item RETURN
9291    
9292    Returns TRUE if the specified reaction is reversible, else FALSE. If the reaction
9293    does not exist, returns TRUE.
9294    
9295    =back
9296    
9297  =cut  =cut
9298    
# Line 9229  Line 9310 
9310    
9311  =head3 reaction2comp  =head3 reaction2comp
9312    
9313  usage: @tuples = $fig->reaction2comp($rid,$which)  C<< my @tuples = $fig->reaction2comp($rid, $which); >>
9314    
9315  Returns the "substrates" iff $which == 0.  In any event (i.e., whether you ask for substrates  Return the substrates or products for a reaction.  In any event (i.e.,
9316  or products), you get back a list of 3-tuples.  Each 3-tuple will contain  whether you ask for substrates or products), you get back a list of
9317    3-tuples.  Each 3-tuple will contain
9318    
9319      [$cid,$stoich,$main]      [$cid,$stoich,$main]
9320    
9321  Stoichiometry is normally numeric, but can be things like "n" or "(n+1)".  Stoichiometry indicates how many copies of the compound participate in
9322    the reaction. It is normally numeric, but can be things like "n" or "(n+1)".
9323  $main is 1 iff the compound is considered "main" or "connectable".  $main is 1 iff the compound is considered "main" or "connectable".
9324    
9325    =over 4
9326    
9327    =item rid
9328    
9329    ID of the raction whose compounds are desired.
9330    
9331    =item which
9332    
9333    TRUE if the products (right side) should be returned, FALSE if the substrates
9334    (left side) should be returned.
9335    
9336    =item RETURN
9337    
9338    Returns a list of 3-tuples. Each tuple contains the ID of a compound, its
9339    stoichiometry, and a flag that is TRUE if the compound is one of the main
9340    participants in the reaction.
9341    
9342    =back
9343    
9344  =cut  =cut
9345    
9346  sub reaction2comp {  sub reaction2comp {
# Line 9255  Line 9357 
9357    
9358  =head3 catalyzed_by  =head3 catalyzed_by
9359    
9360  usage: @ecs = $fig->catalyzed_by($rid)  C<< my @ecs = $fig->catalyzed_by($rid); >>
9361    
9362  Returns the ECs 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
9363  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
9364  (e.g., 1.1.1.-), but we do not do it yet.  (e.g., 1.1.1.-), but we do not do it yet.
9365    
9366    =over 4
9367    
9368    =item rid
9369    
9370    ID of the reaction whose catalyzing roles are desired.
9371    
9372    =item RETURN
9373    
9374    Returns the IDs of the roles that catalyze the reaction.
9375    
9376    =back
9377    
9378  =cut  =cut
9379    
9380  sub catalyzed_by {  sub catalyzed_by {

Legend:
Removed from v.1.378  
changed lines
  Added in v.1.379

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3