for input_f in inputFiles: if zipfile.is_zipfile(input_f): extract_zip_file(input_f, self.path_runs.get_path_execution()) else: try: inF = gzip.GzipFile(input_f, 'rb') f = inF.read() inF.close() if f: extract_gz_file(input_f, self.path_runs.get_path_execution()) except Exception, e: raise Exception("The input file could not be read.\n%s" % e) else: copy_pdbs_from_input( self.path_runs.get_path_execution(), self.opts.htmlfiledir, self.opts.inputnames, self.opts.inputPDBs) if(self.opts.renameAtoms == 'true'): if not rename_atoms( self.path_runs.get_path_execution(), self.opts.galaxyroot): raise Exception("The script to rename the atoms finished wrong.") if(self.opts.checkStructures == 'true'): if not check_pdb( self.path_runs.get_path_execution(), self.opts.galaxyroot): raise Exception("The script to check the structure finished wrong.")