Back to index

python-biopython  1.60
Public Member Functions | Public Attributes | Private Member Functions
Bio.Motif.Parsers.MEME.MEMEMotif Class Reference
Inheritance diagram for Bio.Motif.Parsers.MEME.MEMEMotif:
Inheritance graph
[legend]
Collaboration diagram for Bio.Motif.Parsers.MEME.MEMEMotif:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def get_instance_by_name
def add_instance_from_values

Public Attributes

 evalue
 num_occurrences

Private Member Functions

def _numoccurrences
def _evalue

Detailed Description

A subclass of Motif used in parsing MEME (and MAST) output.

This sublcass defines functions and data specific to MEME motifs. 
This includes the evalue for a motif and the PSSM of the motif.

Methods:
add_instance_from_values (name = 'default', pvalue = 1, sequence = 'ATA', start = 0, strand = +): create a new instance of the motif with the specified values.
add_to_pssm (position): add a new position to the pssm. The position should be a list of nucleotide/amino acid frequencies
add_to_logodds (position): add a new position to the log odds matrix. The position should be a tuple of log odds values for the nucleotide/amino acid at that position.
compare_motifs (other_motif): returns the maximum correlation between this motif and other_motif

Definition at line 58 of file MEME.py.


Constructor & Destructor Documentation

Definition at line 70 of file MEME.py.

00070 
00071     def __init__ (self):
00072         Motif.__init__(self)
00073         self.evalue = 0.0
    

Here is the caller graph for this function:


Member Function Documentation

def Bio.Motif.Parsers.MEME.MEMEMotif._evalue (   self,
  evalue 
) [private]

Definition at line 101 of file MEME.py.

00101 
00102     def _evalue (self, evalue):
00103         if type(evalue) == float:
00104             self.evalue = evalue
00105         else:
00106             evalue = float(evalue)
00107             self.evalue = evalue
00108     

def Bio.Motif.Parsers.MEME.MEMEMotif._numoccurrences (   self,
  number 
) [private]

Definition at line 74 of file MEME.py.

00074 
00075     def _numoccurrences (self, number):
00076         if type(number) == int:
00077             self.num_occurrences = number
00078         else:
00079             number = int(number)
00080             self.num_occurrences = number

def Bio.Motif.Parsers.MEME.MEMEMotif.add_instance_from_values (   self,
  name = 'default',
  pvalue = 1,
  sequence = 'ATA',
  start = 0,
  strand = '+' 
)

Definition at line 87 of file MEME.py.

00087 
00088     def add_instance_from_values (self, name = 'default', pvalue = 1, sequence = 'ATA', start = 0, strand = '+'):
00089         inst = MEMEInstance(sequence,self.alphabet)
00090         inst._pvalue(pvalue)
00091         inst._seqname(name)
00092         inst._start(start)
00093         inst._strand(strand)
00094         if self.length:
00095             inst._length(self.length)
00096         else:
00097             inst._length(len(sequence))
00098         if self.name:
00099             inst._motifname(self.name)
00100         self.add_instance(inst)
    

Here is the call graph for this function:

Definition at line 81 of file MEME.py.

00081 
00082     def get_instance_by_name (self,name):
00083         for i in self.instances:
00084             if i.sequence_name == name:
00085                 return i
00086         return None


Member Data Documentation

Definition at line 72 of file MEME.py.

Definition at line 76 of file MEME.py.


The documentation for this class was generated from the following file: