예제 #1
0
    def execute(self, run_id, run):
        
        with process_pool.ProcessPool(self) as pool:
            with pool.Pipeline(pool) as pipeline:
                
                ## Append the input files, which are all input file linked to the output file
                item_A_path = run.get_private_info('features_segemehl_path')
                item_B_path = run.get_private_info('features_tophat_path')

                ## Obtain the output files
                gtf_out_path = run.get_single_output_file_for_annotation('features')

                ## Call Rscript
                rscript = [self.get_tool('Rscript'), self.get_option('path_rscript')]

                ## Append input files
                rscript.extend (['--inputA', item_A_path])
                rscript.extend (['--inputB', item_B_path])

                ## Append the output files
                rscript.extend (['--output', gtf_out_path])

                ## Append prefixes
                rscript.extend (['--prefixA', 'segemehl'])
                rscript.extend (['--prefixB', 'tophat'])

                ## Append mode of combining the GTF files
                rscript.extend (['--mode', 'no_transcript_overlap'])

                log_stderr = run.get_single_output_file_for_annotation('log_stderr')
                log_stdout = run.get_single_output_file_for_annotation('log_stdout')
                    
                pipeline.append (rscript, stderr_path = log_stderr, stdout_path = log_stdout)
예제 #2
0
파일: io_step.py 프로젝트: specht/uap
 def execute(self, run_id, run):
     # process one file at a time
     for tag, output_file_info in run.get_output_files_abspath().items():
         for output_path, input_paths in output_file_info.items():
             with process_pool.ProcessPool(self) as pool:
                 with pool.Pipeline(pool) as pipeline:
                     cat = [self.get_tool('cat'), input_paths[0]]
                     pigz1 = [self.get_tool('pigz'), '--decompress', '--processes', '1', '--stdout']
                     tool_command = [self.get_tool(self._tool)]
                     tool_command.extend(self.tool_command_line())
                     pigz2 = [self.get_tool('pigz'), '--processes', '2', '--blocksize', '4096', '--stdout']
             
                     if output_path[-3:] == '.gz':
                         pipeline.append(cat)
                         pipeline.append(pigz1)
                         pipeline.append(tool_command)
                         pipeline.append(pigz2, stdout_path = output_path)
                     else:
                         pipeline.append(cat)
                         pipeline.append(tool_command, stdout_path = output_path)