def detectOrfs(infile, outfile): statementlist = [] #set job memory and threads job_memory = str(PARAMS["Prodigal_memory"]) + "G" job_threads = int(PARAMS["Prodigal_threads"]) #command to generate index files seqdat = PipelineAssembly.SequencingData(infile) #generate outfile without gz outfile = outfile.replace(".gz", "") #ensure input is FASTA if seqdat.paired == True: print("Cannot detect ORFs from paired-end reads.") else: if seqdat.fileformat == "fastq": statementlist.append("reformat.sh in={} out={}".format( infile, "orfs.dir/" + seqdat.cleanname + ".fa")) infile = "orfs.dir/" + seqdat.cleanname + ".fa" #generate the call to prodigal statementlist.append( PipelineAnnotate.runProdigal(infile, outfile, PARAMS)) #remove the temp FASTA if created if seqdat.fileformat == "fastq": statementlist.append("rm {}".format("orfs.dir/" + seqdat.cleanname + ".fa")) #compress the outputs statementlist.append("gzip {}".format(outfile)) statementlist.append("gzip {}".format( outfile.replace("peptides", "positions"))) statement = " && ".join(statementlist) P.run(statement)
def detectOrfs(infile, outfile): statementlist = [] #set job memory and threads job_memory = str(PARAMS["Prodigal_memory"]) + "G" job_threads = int(PARAMS["Prodigal_threads"]) #command to generate index files seqdat = PipelineAssembly.SequencingData(infile) #ensure input is FASTA if seqdat.paired == True: print( "Prodigal requires single/merged (i.e. not paired-end) reads for ORF detection." ) else: if seqdat.fileformat == "fastq": statementlist.append("reformat.sh in={} out={}".format( infile, "orfs.dir/" + seqdat.cleanname + ".fa")) infile = "orfs.dir/" + seqdat.cleanname + ".fa" #generate the call to prodigal statementlist.append( PipelineAnnotate.runProdigal(infile, outfile, PARAMS)) #remove the temp FASTA if created if seqdat.fileformat == "fastq": statementlist.append("rm {}".format("orfs.dir/" + seqdat.cleanname + ".fa")) statement = " && ".join(statementlist) P.run(statement)