end(1) # Database building logger.info(DatabaseName + " database building") MakeblastdbProcess = BlastPlus.Makeblastdb(InputFasta,DatabaseName) out,err = MakeblastdbProcess.launch() CheckDatabase_BlastdbcmdProcess = BlastPlus.Blastdbcmd(DatabaseName, "", "") if not CheckDatabase_BlastdbcmdProcess.is_database(): logger.error("Problem in the database building.\nAre you sure of your input format?\nAre all read names unique?") logger.info("Database %s does not exist" % DatabaseName) end(1) else: logger.info("Database %s exists" % DatabaseName) # Remove temporary fasta file ApytramNeeds.tmp_dir_clean_up(TmpDirName,1) ### If there is a query continue, else stop if not args.query: logger.info("There is no query (-q), apytram has finished.") end(0) elif not os.path.isfile(args.query): logger.error(args.query+" (-q) is not a file.") end(1) else: logger.info("DB: \"%s\"\tQuery: \"%s\"" %(DatabaseName,QueryFile)) ### Make iterations # Initialisation i = 0 Stop = False