コード例 #1
0
ファイル: apytram.py プロジェクト: msemon/apytram
    BlastnProcess.Threads = Threads
    BlastnProcess.OutFormat = "6 sacc"
    # Write read names in ReadNamesFile
    ExitCode = BlastnProcess.launch(ReadNamesFile)
    StatsDict[(i)]["BlastTime"] = time.time() - start_blast_time
    logger.debug("blast --- %s seconds ---" % (StatsDict[(i)]["BlastTime"]))
    if PairedData:
        # Get paired reads names and remove duplicated names
        ExitCode = ApytramNeeds.add_paired_read_names(ReadNamesFile)
    else:
        # Remove duplicated names
        ExitCode = ApytramNeeds.remove_duplicated_read_names(ReadNamesFile)
        
    # 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 than the previous")
        Stop = True
        IterationNotFinished = True
        i -= 1
    else:
        
        ### Retrieve sequences
        
        logger.info("Retrieve sequences")
        ReadFasta = TmpDirName + "/Reads.%d.fasta" % (i)
        BlastdbcmdProcess = BlastPlus.Blastdbcmd(DatabaseName, ReadNamesFile, ReadFasta)
        BlastdbcmdProcess.launch()
        
        ### Launch Trinity