# Compare the read list names with the list of the previous iteration: Identical = ApytramNeeds.are_identical(ReadNamesFile,"%s/ReadNames.%d.txt" % (TmpDirName,i-1)) if Identical and not FinishAllIter: logger.info("Reads from the current iteration are identical to reads from the previous iteration") Stop = True IterationNotFinished = True i -= 1 else: ### Retrieve sequences if args.database_type in ["RF","FR"]: logger.info("Split read names depending on 1/ or 2/") ReadNamesFile_Right = "%s/ReadNames.%d.1.txt" % (TmpDirName,i) ReadNamesFile_Left = "%s/ReadNames.%d.2.txt" % (TmpDirName,i) ReadFasta_Right = "%s/Reads.%d.1.fasta" % (TmpDirName,i) ReadFasta_Left = "%s/Reads.%d.2.fasta" % (TmpDirName,i) out, err = ApytramNeeds.split_readnames_in_right_left(ReadNamesFile,ReadNamesFile_Right,ReadNamesFile_Left) if err: logger.error(err) StrandList = [".1",".2"] else: StrandList = [""] logger.info("Retrieve reads sequences") start_blastdbcmd_time = time.time() for strand in StrandList: ReadFasta = "%s/Reads.%d%s.fasta" % (TmpDirName,i,strand) ReadNamesFile = "%s/ReadNames.%d%s.txt" % (TmpDirName,i,strand) BlastdbcmdProcess = BlastPlus.Blastdbcmd(DatabaseName, ReadNamesFile, ReadFasta) if not os.path.isfile(ReadFasta): (out,err) = BlastdbcmdProcess.launch() else: