diff SMART/Java/Python/removeEmptySequences.py @ 31:0ab839023fe4

Uploaded
author m-zytnicki
date Tue, 30 Apr 2013 14:33:21 -0400
parents 94ab73e8a190
children
line wrap: on
line diff
--- a/SMART/Java/Python/removeEmptySequences.py	Mon Apr 29 03:45:52 2013 -0400
+++ b/SMART/Java/Python/removeEmptySequences.py	Tue Apr 30 14:33:21 2013 -0400
@@ -66,9 +66,9 @@
 
     def setOutputFileName(self, fileName):
         if options.format == "fasta":
-            self.writer = FastaWriter(fileName, self.verbosity)
+            self.writer = FastaWriter("%s.mfa" % (fileName), self.verbosity)
         elif options.format == "fastq":
-            self.writer = FastqWriter(fileName, self.verbosity)
+            self.writer = FastqWriter("%s.mfq" % (fileName), self.verbosity)
 
 
     def parse(self):
@@ -91,13 +91,13 @@
     description = "Remove Empty Sequences v1.0.2: Remove all the empty sequences in a list. [Category: Personal]"
 
     parser = OptionParser(description = description)
-    parser.add_option("-i", "--input",     dest="inputFileName",   action="store",                     type="string", help="input file [compulsory] [format: file in sequence format given by -f]")
-    parser.add_option("-f", "--format",    dest="format",          action="store",                     type="string", help="format of the input file [compulsory] [format: sequence file format]")
-    parser.add_option("-j", "--input2",    dest="inputFileName2",  action="store",                     type="string", help="input file 2 (in case of pair end reads) [format: file in sequence format given by -f] [default: None]")
-    parser.add_option("-o", "--output",    dest="outputFileName",  action="store",      default=None,  type="string", help="output file [compulsory] [format: output file in format given by -f]")
-    parser.add_option("-p", "--output2",   dest="outputFileName2", action="store",      default=None,  type="string", help="output file 2 (in case of pair end reads) [format: output file in sequence format given by -f] [default: None]")
-    parser.add_option("-v", "--verbosity", dest="verbosity",       action="store",      default=1,     type="int",    help="trace level [format: int] [default: 1]")
-    parser.add_option("-l", "--log",       dest="log",             action="store_true", default=False,                help="write a log file [format: bool] [default: false]")
+    parser.add_option("-i", "--input",         dest="inputFileName",     action="store",                                         type="string", help="input file [compulsory] [format: file in sequence format given by -f]")
+    parser.add_option("-f", "--format",        dest="format",                    action="store",                                         type="string", help="format of the input file [compulsory] [format: sequence file format]")
+    parser.add_option("-j", "--input2",        dest="inputFileName2",    action="store",                                         type="string", help="input file 2 (in case of pair end reads) [format: file in sequence format given by -f] [default: None]")
+    parser.add_option("-o", "--output",        dest="outputFileName",    action="store",            default=None,    type="string", help="output file [compulsory] [format: output file in format given by -f]")
+    parser.add_option("-p", "--output2",     dest="outputFileName2", action="store",            default=None,    type="string", help="output file 2 (in case of pair end reads) [format: output file in sequence format given by -f] [default: None]")
+    parser.add_option("-v", "--verbosity", dest="verbosity",             action="store",            default=1,         type="int",        help="trace level [format: int] [default: 1]")
+    parser.add_option("-l", "--log",             dest="log",                         action="store_true", default=False,                                help="write a log file [format: bool] [default: false]")
     (options, args) = parser.parse_args()
 
     if options.log: