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
def sniff(self, filename): """Determine if the file is in this format""" return check_image_type(filename, self.image_formats)
def sniff(self, filename): """Determine if the file is in this format""" return check_image_type(filename, self.image_formats)