changeset 11:db2dc6bc8f05 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/fastqc commit 168f7aeb0f9f38de6dec873f3cbf0c30014fdd72
author iuc
date Thu, 20 Apr 2017 11:06:17 -0400
parents a00a6402d09a
children 484e86282f4b
files rgFastQC.py rgFastQC.xml
diffstat 2 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/rgFastQC.py	Wed Feb 08 12:43:43 2017 -0500
+++ b/rgFastQC.py	Thu Apr 20 11:06:17 2017 -0400
@@ -48,20 +48,23 @@
         # This prevents uncompression of already uncompressed files
         infname = self.opts.inputfilename
         linf = infname.lower()
+        informat = self.opts.informat
         trimext = False
         # decompression at upload currently does NOT remove this now bogus ending - fastqc will barf
         # patched may 29 2013 until this is fixed properly
-        type = mimetypes.guess_type(self.opts.input)
-        if linf.endswith('.gz') or linf.endswith('.gzip') or type[-1] == "gzip":
+        ftype = mimetypes.guess_type(self.opts.input)
+        if linf.endswith('.gz') or linf.endswith('.gzip') or ftype[-1] == "gzip" or informat.endswith('.gz'):
             f = gzip.open(self.opts.input)
             try:
                 f.readline()
+                ftype = ['gzip']
             except:
                 trimext = True
             f.close()
-        elif linf.endswith('bz2'):
+        elif linf.endswith('bz2') or informat.endswith('.bz2'):
             f = bz2.BZ2File(self.opts.input, 'r')
             try:
+                ftype = ['bzip2']
                 f.readline()
             except:
                 trimext = True
@@ -95,10 +98,12 @@
             command_line.append('--limits %s' % self.opts.limits)
         command_line.append('--quiet')
         command_line.append('--extract')  # to access the output text file
-        if type[-1] != "gzip":
+        if ftype[-1] == 'gzip':
+            self.fastqinfilename += '.gz'
+        elif ftype[-1] == 'bzip2':
+            self.fastqinfilename += '.bz2'
+        else:
             command_line.append('-f %s' % self.opts.informat)
-        else:
-            self.fastqinfilename += ".gz"
         command_line.append(self.fastqinfilename)
         self.command_line = ' '.join(command_line)
 
--- a/rgFastQC.xml	Wed Feb 08 12:43:43 2017 -0500
+++ b/rgFastQC.xml	Thu Apr 20 11:06:17 2017 -0400
@@ -1,4 +1,4 @@
-<tool id="fastqc" name="FastQC" version="0.67">
+<tool id="fastqc" name="FastQC" version="0.68">
     <description>Read Quality reports</description>
     <requirements>
         <requirement type="package" version="0.11.5">fastqc</requirement>
@@ -124,7 +124,7 @@
 - Kmer Content
 
 All except Basic Statistics and Overrepresented sequences are plots.
- .. _FastQC: http://www.bioinformatics.bbsrc.ac.uk/projects/fastqc/
+ .. _FastQC: http://www.bioinformatics.babraham.ac.uk/projects/fastqc/
  .. _Picard-tools: http://picard.sourceforge.net/index.shtml
     </help>
     <citations>