diff scripts/rgFastQC.py @ 3:0cbed1c0a762 draft default tip

planemo upload commit 15239f1674081ab51ab8dd75a9a40cf1bfaa93e8
author cstrittmatter
date Tue, 28 Jan 2020 10:42:31 -0500
parents 965517909457
children
line wrap: on
line diff
--- a/scripts/rgFastQC.py	Wed Jan 22 09:10:12 2020 -0500
+++ b/scripts/rgFastQC.py	Tue Jan 28 10:42:31 2020 -0500
@@ -70,15 +70,15 @@
             if not zipfile.is_zipfile(self.opts.input):
                 trimext = True
         if trimext:
-	   f = open(self.opts.input)
-	   try:
-	       f.readline()
-	   except:
-	       raise Exception("Input file corruption, could not identify the filetype")
-           infname = os.path.splitext(infname)[0]
+            f = open(self.opts.input)
+            try:
+                f.readline()
+            except:
+                raise Exception("Input file corruption, could not identify the filetype")
+                infname = os.path.splitext(infname)[0]
         
         # Replace unwanted or problematic charaters in the input file name
-        self.fastqinfilename = re.sub(ur'[^a-zA-Z0-9_\-\.]', '_', os.path.basename(infname))
+        self.fastqinfilename = re.sub(r'[^a-zA-Z0-9_\-\.]', '_', os.path.basename(infname))
         # check that the symbolic link gets a proper ending, fastqc seems to ignore the given format otherwise
         if 'fastq' in opts.informat:
             # with fastq the .ext is ignored, but when a format is actually passed it must comply with fastqc's 
@@ -92,7 +92,7 @@
         if opts.contaminants != None:
             command_line.append('--contaminants %s' % opts.contaminants)
         if opts.limits != None:
-	    command_line.append('--limits %s' % opts.limits)
+            command_line.append('--limits %s' % opts.limits)
         command_line.append('--quiet')
         command_line.append('--extract') # to access the output text file
         command_line.append(self.fastqinfilename)