def operate(cathcode, workingDirectory, host, user, passwd, db, verbose,tar,justTar): if verbose: print ("getting domains for %s superfamily"% (cathcode,)) cATHfamilyLoader = CATHfamilyLoader(cathcode, host, user, passwd, db, workingDirectory) if verbose: print "getting information from DB" cATHfamilyLoader.getFamilyPDBS() if verbose: print "downloading pdb files" cATHfamilyLoader.downloadPDBfiles(verbose=verbose) if verbose: print "uncompressing pdb files" cATHfamilyLoader.uncompressPDBFiles(verbose=verbose) if verbose: print "extracting domains" cATHfamilyLoader.extractDomains(verbose=verbose) if verbose: print "generating domain list for mmult" cATHfamilyLoader.generateDomainList(verbose=verbose) # compressedFileName = path.join(workingDirectory,cathcode) # if tar: cATHfamilyLoader.compressResults(compressedFileName) logFileName = path.join(workingDirectory,cathcode+".log") if justTar: cATHfamilyLoader.deleteAll(logFileName, verbose=True) if verbose: print ("finished. You can find the resulting tgz at %s" % (path.join(workingDirectory,cathcode+".tgz"),)) else: cATHfamilyLoader.deleteCompressedPDBS(verbose) if verbose and not tar: print ("finished. You can find the log file at %s" % (path.join(workingDirectory,cathcode+".log"),))