Ejemplo n.º 1
0
 def sniff(self, filename):
     """Determine if the file is in RNA dot plot format."""
     if check_image_type(filename, ['EPS']):
         seq = False
         coor = False
         pairs = False
         with open(filename) as handle:
             for line in handle:
                 line = line.strip()
                 if line:
                     if line.startswith('/sequence'):
                         seq = True
                     elif line.startswith('/coor'):
                         coor = True
                     elif line.startswith('/pairs'):
                         pairs = True
                 if seq and coor and pairs:
                     return True
     return False
Ejemplo n.º 2
0
 def sniff(self, filename):
     """Determine if the file is in this format"""
     return check_image_type(filename, self.image_formats)
Ejemplo n.º 3
0
 def sniff(self, filename):
     """Determine if the file is in this format"""
     return check_image_type(filename, self.image_formats)