CloneSet23


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
62220.996file_input_element_list[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
16216
Bio/AlignAce/Parser.py
26216
Bio/Motif/Parsers/AlignAce.py
Clone Instance
1
Line Count
62
Source Line
16
Source File
Bio/AlignAce/Parser.py

class AlignAceConsumer: 
     """
    The general purpose consumer for the AlignAceScanner.

    Should be passed as the consumer to the feed method of the AlignAceScanner. After 'consuming' the file, it has the list of motifs in the motifs property.
    """ 

     def __init__(self): 
          self.motifs = [ ] 
          self.current_motif = None 
          self.param_dict = None 

     def parameters(self,line): 
          self.param_dict = { } 

     def parameter(self,line): 
          par_name = line.split("=")[0].strip( ) 
          par_value = line.split("=")[1].strip( ) 
          self.param_dict[par_name] = par_value 

     def sequences(self,line): 
          self.seq_dict = [ ] 

     def sequence(self,line): 
          seq_name = line.split("\t")[1] 
          self.seq_dict.append(seq_name) 

     def motif(self,line): 
          self.current_motif = Motif( ) 
          self.motifs.append(self.current_motif) 
          self.current_motif.alphabet = IUPAC.unambiguous_dna 

     def motif_hit(self,line): 
          seq = Seq(line.split("\t")[0],IUPAC.unambiguous_dna) 
          self.current_motif.add_instance(seq) 

     def motif_score(self,line): 
          self.current_motif.score = float(line.split( )[ -1]) 

     def motif_mask(self,line): 
          self.current_motif.set_mask(line.strip("""
\\c"""                                          )) 

     def noevent(self,line): 
          pass 

     def version(self,line): 
          self.ver = line 

     def command_line(self,line): 
          self.cmd_line = line 
     

class AlignAceParser(AbstractParser): 
     """Parses AlignAce data into a sequence of Motifs.
    """ 

     def __init__(self): 
          "__init__(self)" 
          self._scanner = AlignAceScanner( ) 
          self._consumer = AlignAceConsumer( ) 

     def parse(self,handle): 
         "parse(self, handle)" 
         self._scanner.feed(handle,self._consumer) 
         return self._consumer.motifs 
     


Clone Instance
2
Line Count
62
Source Line
16
Source File
Bio/Motif/Parsers/AlignAce.py

class AlignAceConsumer: 
     """
    The general purpose consumer for the AlignAceScanner.

    Should be passed as the consumer to the feed method of the AlignAceScanner. After 'consuming' the file, it has the list of motifs in the motifs property.
    """ 

     def __init__(self): 
          self.motifs = [ ] 
          self.current_motif = None 
          self.param_dict = None 

     def parameters(self,line): 
          self.param_dict = { } 

     def parameter(self,line): 
          par_name = line.split("=")[0].strip( ) 
          par_value = line.split("=")[1].strip( ) 
          self.param_dict[par_name] = par_value 

     def sequences(self,line): 
          self.seq_dict = [ ] 

     def sequence(self,line): 
          seq_name = line.split("\t")[1] 
          self.seq_dict.append(seq_name) 

     def motif(self,line): 
          self.current_motif = Motif( ) 
          self.motifs.append(self.current_motif) 
          self.current_motif.alphabet = IUPAC.unambiguous_dna 

     def motif_hit(self,line): 
          seq = Seq(line.split("\t")[0],IUPAC.unambiguous_dna) 
          self.current_motif.add_instance(seq) 

     def motif_score(self,line): 
          self.current_motif.score = float(line.split( )[ -1]) 

     def motif_mask(self,line): 
          self.current_motif.set_mask(line.strip("""
\\c"""                                          )) 

     def noevent(self,line): 
          pass 

     def version(self,line): 
          self.ver = line 

     def command_line(self,line): 
          self.cmd_line = line 
     

class AlignAceParser(AbstractParser): 
     """Parses AlignAce data into a sequence of Motifs.
    """ 

     def __init__(self): 
          "__init__(self)" 
          self._scanner = AlignAceScanner( ) 
          self._consumer = AlignAceConsumer( ) 

     def parse(self,handle): 
         "parse(self, handle)" 
         self._scanner.feed(handle,self._consumer) 
         return self._consumer 
     


Clone AbstractionParameter Count: 2Parameter Bindings

class AlignAceConsumer:
  """
    The general purpose consumer for the AlignAceScanner.

    Should be passed as the consumer to the feed method of the AlignAceScanner. After 'consuming' the file, it has the list of motifs in the motifs property.
    """ 

  def __init__(self):
  
    self.motifs = [ ] 
    self.current_motif = None 
    self.param_dict = None 

  def parameters(self,line):
  
    self.param_dict = { } 

  def parameter(self,line):
  
    par_name = line.split("=")[0].strip( ) 
    par_value = line.split("=")[1].strip( ) 
    self.param_dict[par_name] = par_value 

  def sequences(self,line):
  
    self.seq_dict = [ ] 

  def sequence(self,line):
  
    seq_name = line.split("\t")[1] 
    self.seq_dict.append(seq_name) 

  def motif(self,line):
  
    self.current_motif = Motif( ) 
    self.motifs.append(self.current_motif) 
    self.current_motif.alphabet = IUPAC.unambiguous_dna 

  def motif_hit(self,line):
  
    seq = Seq(line.split("\t")[0],IUPAC.unambiguous_dna) 
    self.current_motif.add_instance(seq) 

  def motif_score(self,line):
  
    self.current_motif.score = float(line.split( )[ -1]) 

  def motif_mask(self,line):
  
    self.current_motif.set_mask(line.strip("""
\\c"""                                    )) 

  def noevent(self,line):
  
    pass 

  def version(self,line):
  
    self.ver = line 

  def command_line(self,line):
  
    self.cmd_line = line 
  

class AlignAceParser(AbstractParser):
  """Parses AlignAce data into a sequence of Motifs.
    """ 

  def __init__(self):
  
    "__init__(self)" 
    self._scanner = AlignAceScanner( ) 
    self._consumer = AlignAceConsumer( ) 

  def parse(self,handle):
  
    "parse(self, handle)" 
    self._scanner.feed(handle,self._consumer) 
    return [[#variable60189c40]]. [[#variable60189b00]]
  
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#60189c40]]
self 
12[[#60189c40]]
self._consumer 
21[[#60189b00]]
_consumer 
22[[#60189b00]]
motifs