def concatIndexBgzipFile(self, taskPrefix, dependencies, inputList, output, label, fileType): """ Internal helper function @param inputList files to be concatenated (in order), already bgzipped @param output output filename @param label used for error task id @param fileType provided to tabix """ assert (len(inputList) > 0) if len(inputList) > 1: catCmd = [self.params.bgcatBin, "-o", output] catCmd.extend(inputList) else: catCmd = getMvCmd() + [inputList[0], output] indexCmd = [self.params.tabixBin, "-p", fileType, output] catTask = self.addTask(preJoin(taskPrefix, label + "_concat_" + fileType), catCmd, dependencies=dependencies, isForceLocal=True) return self.addTask(preJoin(taskPrefix, label + "_index_" + fileType), indexCmd, dependencies=catTask, isForceLocal=True)
def getHeaderFixCmd(fileName) : tmpName=fileName+".reheader.tmp" cmd = "\"%s\" \"%s\"" % (sys.executable, self.params.vcfCmdlineSwapper) cmd += ' "' + " ".join(self.params.configCommandLine) + '"' cmd += " < \"%s\" > \"%s\"" % (fileName,tmpName) cmd += " && " + " ".join(getMvCmd()) + " \"%s\" \"%s\"" % (tmpName, fileName) return cmd
def getHeaderFixCmd(fileName): tmpName = fileName + ".reheader.tmp" cmd = "\"%s\" \"%s\"" % (sys.executable, self.params.vcfCmdlineSwapper) cmd += ' "' + " ".join(self.params.configCommandLine) + '"' cmd += " < \"%s\" > \"%s\"" % (fileName, tmpName) cmd += " && " + " ".join( getMvCmd()) + " \"%s\" \"%s\"" % (tmpName, fileName) return cmd