def main(): option_parser, opts, args = parse_command_line_parameters(**script_info) qiime_config = load_qiime_config() rdp_jarpath = get_rdp_jarpath() if rdp_jarpath == None: rdp_version = "Not installed." else: rdp_version = split(rdp_jarpath)[1] java_version = get_java_version() if java_version is None: java_version = "Not installed." system_info = [ ("Platform", platform), ("Python version",python_version.replace('\n', ' ')), ("Python executable",executable)] max_len = max([len(e[0]) for e in system_info]) print "\nSystem information" print "==================" for v in system_info: print "%*s:\t%s" % (max_len,v[0],v[1]) version_info = [ ("PyCogent version", pycogent_lib_version), ("NumPy version", numpy_lib_version), ("matplotlib version", matplotlib_lib_version), ("biom-format version", biom_lib_version), ("qcli version", qcli_lib_version), ("QIIME library version", get_qiime_library_version()), ("QIIME script version", __version__), ("PyNAST version (if installed)", pynast_lib_version), ("RDP Classifier version (if installed)", rdp_version), ("Java version (if installed)", java_version), ("Emperor version", emperor_lib_version)] max_len = max([len(e[0]) for e in version_info]) print "\nDependency versions" print "===================" for v in version_info: print "%*s:\t%s" % (max_len,v[0],v[1]) print "\nQIIME config values" print "===================" max_len = max([len(key) for key in qiime_config]) for key,value in qiime_config.items(): print "%*s:\t%s"%(max_len,key,value) #run the Testcase.main function to do the tests # need to mess with the arg string, otherwise TestCase complains if (opts.test): print "\n\nrunning checks:\n" test_main(argv=["","-v"])
print "\nSystem information" print "==================" for v in system_info: print "%*s:\t%s" % (max_len,v[0],v[1]) version_info = [ ("PyCogent version", pycogent_lib_version), ("NumPy version", numpy_lib_version), ("matplotlib version", matplotlib_lib_version), ("QIIME library version", get_qiime_library_version()), ("QIIME script version", __version__), ("PyNAST version (if installed)", pynast_lib_version), ("RDP Classifier version (if installed)", rdp_version)] max_len = max([len(e[0]) for e in version_info]) print "\nDependency versions" print "===================" for v in version_info: print "%*s:\t%s" % (max_len,v[0],v[1]) print "\nQIIME config values" print "===================" max_len = max([len(key) for key in qiime_config]) for key,value in qiime_config.items(): print "%*s:\t%s"%(max_len,key,value) #run the Testcase.main function to do the tests # need to mess with the arg string, otherwise TestCase complains if (opts.test): print "\n\nrunning checks:\n" test_main(argv=["","-v"])