Mercurial > repos > urgi-team > teiso
diff TEiso/ClosestToStartSite_Wrapper.py @ 1:15d6811e6bf5 draft
Uploaded
author | urgi-team |
---|---|
date | Tue, 24 May 2016 08:59:28 -0400 |
parents | 3d22562b4489 |
children |
line wrap: on
line diff
--- a/TEiso/ClosestToStartSite_Wrapper.py Fri Apr 29 09:11:18 2016 -0400 +++ b/TEiso/ClosestToStartSite_Wrapper.py Tue May 24 08:59:28 2016 -0400 @@ -3,7 +3,6 @@ import subprocess, tempfile, sys, os, glob, shutil, time from optparse import OptionParser -from commons.core.utils.RepetOptionParser import RepetOptionParser class ClosestToStartSiteWrapper(object): @@ -18,14 +17,16 @@ def setAttributesFromCmdLine(self): - self._toolVersion = "1.0" - description = "ClosestToStartSite version %s" % self._toolVersion - epilog = "\n parses a bed file and create a bed file to create a report about positions of features A to features B. \n" - epilog += "example: ClosestToStartSite.py -i <inputFile> -o <outputFile>\n" - parser = RepetOptionParser(description = description, epilog = epilog, version = self._toolVersion) - parser.add_option("-i", "--inputFile", dest = "inputFile", action = "store", type = "string", help = "Input GTF File name(transcript.gtf of Cufflinks).", default = "") + description = "ClosestToStartSite" + epilog = "\nParser a bed file and create a bed file to create a report about positions of features A to features B. \n" + epilog +="it can also add the class code of features A. \n" + epilog += "example: ClosestToStartSite.py -i <inputFile> -c <cuff_in.tmap> -o <outputFile>\n" + parser = OptionParser(description = description, version = "1.0") + parser.add_option("-i", "--inputFile", dest = "inputFile", action = "store", type = "string", help = "input bed file", default = "") + parser.add_option("-c", "--cuffcom_tmap", dest = "cuffcom_tmap", action = "store", type = "string", help = "input gtf file", default = "") parser.add_option("-o", "--outputFile", dest = "outputFile", action = "store", type = "string", help = "output Bed File name", default = "") - parser.add_option("-v", "--verbosity", dest = "verbosity", action = "store", type = "int", help = "Verbosity [optional] [default: 3]",default = 3) + #parser.add_option("-t", "--outputFileclasscode", dest = "outputFile_classcode", action = "store", type = "string", help = "output Bed File name with class code.", default = "") + parser.add_option("-v", "--verbosity", dest = "verbosity", action = "store", type = "int", help = "verbosity [optional] [default: 3]",default = 3) options = parser.parse_args()[0] self._setAttributesFromOptions(options) @@ -36,6 +37,11 @@ prg = "ClosestToStartSite.py" args = "" args += "-i %s" % self._options.inputFile + args += " " + args += "-o %s" % self._options.outputFile + if self._options.cuffcom_tmap != "": + args += " " + args += "-c %s" % self._options.cuffcom_tmap cmd = "%s %s" %(prg, args) print cmd