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

Diff of /FigKernelPackages/CO.pm

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

revision 1.3, Tue Oct 20 20:37:30 2009 UTC revision 1.4, Mon Oct 26 15:13:49 2009 UTC
# Line 241  Line 241 
241    
242      my $document = $coObject->related_clusters($args);      my $document = $coObject->related_clusters($args);
243    
244  This method returns the functional-coupling clusters for features related  This method returns the functional-coupling clusters related to the specified
245  to the specified input features.  input features. Each cluster contains features on a single genome that are
246    related by functional coupling.
247    
248  =over 4  =over 4
249    
# Line 297  Line 298 
298      return $retVal;      return $retVal;
299  }  }
300    
301    =head3 co_occurrence_evidence
302    
303        my $document = $coObject->co_occurrence_evidence($args);
304    
305    For each specified pair of genes, this method returns the evidence that
306    the genes are functionally coupled (if any); that is, it returns a list
307    of the physically close homologs for the pair.
308    
309    =over 4
310    
311    =item args
312    
313    Reference to a hash containing the parameters.
314    
315    =item RETURN
316    
317    Returns a hash mapping each incoming gene pair to a list of 2-tuples. Each 2-tuple
318    contains a pair of physically close genes, the first of which is similar to the first
319    gene in the input pair, and the second of which is similar to the second gene in the
320    input pair. The hash keys will consist of the two gene IDs separated by a colon (e.g.
321    C<fig|273035.4.peg.1016:fig|273035.4.peg.1018>).
322    
323    =back
324    
325    =head4 Parameter Hash Fields
326    
327    =over 4
328    
329    =item -pairs
330    
331    Reference to a list of functionally-coupled pairs. Each pair is represented by two
332    FIG gene IDs, either in the form of a 2-tuple or as a string with the two gene IDs
333    separated by a colon.
334    
335    =back
336    
337    =cut
338    
339    sub co_occurrence_evidence {
340        # Get the parameters.
341        my ($self, $args) = @_;
342        # Declare the return variable.
343        my $retVal = {};
344        # Get the Sapling database.
345        my $sap = $self->{db};
346        # Get the list of pairs.
347        my $pairs = ServerThing::GetIdList(-pairs => $args);
348        # Loop through the pairs.
349        for my $pair (@$pairs) {
350            # Determine the IDs in this pair.
351            my ($peg1, $peg2);
352            if (ref $pair) {
353                ($peg1, $peg2) = @$pair;
354            } else {
355                ($peg1, $peg2) = split /:/, $pair;
356            }
357            # Get the evidence and store it in the return hash.
358            $retVal->{"$peg1:$peg2"} = FC::co_occurrence_evidence($sap, $peg1, $peg2);
359        }
360        # Return the result.
361        return $retVal;
362    }
363    
364    
365    
366  =head3 related_figfams  =head3 related_figfams
367    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3