comparison rgFastQC.py @ 4:ca0eb9b89b32 draft

Uploaded
author devteam
date Mon, 09 Feb 2015 10:02:47 -0500
parents 36980a78cc83
children e8c90ad3cbf9
comparison
equal deleted inserted replaced
3:36980a78cc83 4:ca0eb9b89b32
77 raise Exception("Input file corruption, could not identify the filetype") 77 raise Exception("Input file corruption, could not identify the filetype")
78 infname = os.path.splitext(infname)[0] 78 infname = os.path.splitext(infname)[0]
79 79
80 # Replace unwanted or problematic charaters in the input file name 80 # Replace unwanted or problematic charaters in the input file name
81 self.fastqinfilename = re.sub(ur'[^a-zA-Z0-9_\-\.]', '_', os.path.basename(infname)) 81 self.fastqinfilename = re.sub(ur'[^a-zA-Z0-9_\-\.]', '_', os.path.basename(infname))
82 82 # check that the symbolic link gets a proper ending, fastqc seems to ignore the given format otherwise
83 if 'fastq' in opts.informat:
84 # with fastq the .ext is ignored, but when a format is actually passed it must comply with fastqc's
85 # accepted formats..
86 opts.informat = 'fastq'
87 elif not self.fastqinfilename.endswith(opts.informat):
88 self.fastqinfilename += '.%s' % opts.informat
89
83 # Build the Commandline from the given parameters 90 # Build the Commandline from the given parameters
84 command_line = [opts.executable, '--outdir %s' % opts.outputdir] 91 command_line = [opts.executable, '--outdir %s' % opts.outputdir]
85 if opts.contaminants != None: 92 if opts.contaminants != None:
86 command_line.append('--contaminants %s' % opts.contaminants) 93 command_line.append('--contaminants %s' % opts.contaminants)
87 if opts.limits != None: 94 if opts.limits != None:
88 command_line.append('--limits %s' % opts.limits) 95 command_line.append('--limits %s' % opts.limits)
89 command_line.append('--quiet') 96 command_line.append('--quiet')
90 command_line.append('--extract') # to access the output text file 97 command_line.append('--extract') # to access the output text file
91 command_line.append(self.fastqinfilename) 98 command_line.append(self.fastqinfilename)
99 command_line.append('-f %s' % opts.informat)
92 self.command_line = ' '.join(command_line) 100 self.command_line = ' '.join(command_line)
93 101
94 def copy_output_file_to_dataset(self): 102 def copy_output_file_to_dataset(self):
95 ''' 103 '''
96 Retrieves the output html and text files from the output directory and copies them to the Galaxy output files 104 Retrieves the output html and text files from the output directory and copies them to the Galaxy output files