def run(self, fileStore): blastResultsFile = fileStore.getLocalTempFile() seqFile = fileStore.readGlobalFile(self.seqFileID) runSelfLastz(seqFile, blastResultsFile, lastzArguments=self.blastOptions.lastzArguments, gpuLastz=self.blastOptions.gpuLastz) if self.blastOptions.realign: realignResultsFile = fileStore.getLocalTempFile() runCactusSelfRealign( seqFile, inputAlignmentsFile=blastResultsFile, outputAlignmentsFile=realignResultsFile, realignArguments=self.blastOptions.realignArguments) blastResultsFile = realignResultsFile resultsFile = fileStore.getLocalTempFile() cactus_call(parameters=[ "cactus_blast_convertCoordinates", blastResultsFile, resultsFile, str(self.blastOptions.roundsOfCoordinateConversion) ]) if self.blastOptions.compressFiles: #TODO: This throws away the compressed file seqFile = compressFastaFile(seqFile) logger.info("Ran the self blast okay") return fileStore.writeGlobalFile(resultsFile)
def alignAndRunPipeline(self, concatenatedSequenceFile): # Run lastz startTime = time.time() runSelfLastz(concatenatedSequenceFile, self.simpleInputCigarPath, "") print "It took %s seconds to run lastz" % (time.time() - startTime) with open(self.simpleInputCigarPath, 'r') as fh: inputCigars = [ cigar[:-1] for cigar in fh.readlines() ] # Remove new lines print "There are %s cigars from lastz" % len(inputCigars) # Run toil pipeline startTime = time.time() outputCigars = self.runToilPipeline(self.simpleInputCigarPath) print "It took %s seconds to run unique mapping pipeline" % (time.time() - startTime) # Check output print "Total input cigars:", len(inputCigars), "total output cigars", len(outputCigars)
def alignAndRunPipeline(self, concatenatedSequenceFile): # Run lastz startTime = time.time() runSelfLastz(concatenatedSequenceFile, self.simpleInputCigarPath, "") print "It took %s seconds to run lastz" % (time.time() - startTime) with open(self.simpleInputCigarPath, 'r') as fh: inputCigars = [cigar[:-1] for cigar in fh.readlines()] # Remove new lines print "There are %s cigars from lastz" % len(inputCigars) # Run toil pipeline startTime = time.time() outputCigars = self.runToilPipeline(self.simpleInputCigarPath) print "It took %s seconds to run unique mapping pipeline" % ( time.time() - startTime) # Check output print "Total input cigars:", len( inputCigars), "total output cigars", len(outputCigars)
def run(self, fileStore): blastResultsFile = fileStore.getLocalTempFile() seqFile = fileStore.readGlobalFile(self.seqFileID) runSelfLastz(seqFile, blastResultsFile, lastzArguments=self.blastOptions.lastzArguments) if self.blastOptions.realign: realignResultsFile = fileStore.getLocalTempFile() runCactusSelfRealign(seqFile, inputAlignmentsFile=blastResultsFile, outputAlignmentsFile=realignResultsFile, realignArguments=self.blastOptions.realignArguments) blastResultsFile = realignResultsFile resultsFile = fileStore.getLocalTempFile() cactus_call(parameters=["cactus_blast_convertCoordinates", blastResultsFile, resultsFile, str(self.blastOptions.roundsOfCoordinateConversion)]) if self.blastOptions.compressFiles: #TODO: This throws away the compressed file seqFile = compressFastaFile(seqFile) logger.info("Ran the self blast okay") return fileStore.writeGlobalFile(resultsFile)