def create_commands_eb(all_files, ispaired, base_output_dir, optional_params='', leading_text='', trailing_text='', include_input_dir_path=False, remove_filepath_in_name=False):
 commands = []
 extensions = ['.fastq.gz', '.fastq', '.fq.gz', '.fq']
 for curr_fp in all_files:
  if include_input_dir_path:
   added_output_str = curr_fp.split('/')[(-2)]
  else:
   added_output_str = ''
  if (not remove_filepath_in_name):
   for extension in extensions:
    if (extension in curr_fp):
     curr_ext = extension
   added_output_str += basename(curr_fp).split(curr_ext)[0]
  curr_outputdir = join(base_output_dir, added_output_str)
  if ispaired:
   command = ('%sextract_barcodes.py %s -f %s -r %s -o %s %s' % (_clean_leading_text(leading_text), optional_params, curr_fp, all_files[curr_fp], curr_outputdir, trailing_text))
  else:
   command = ('%sextract_barcodes.py %s -f %s -o %s %s' % (_clean_leading_text(leading_text), optional_params, curr_fp, curr_outputdir, trailing_text))
  commands.append([(('extract_barcodes.py: %s' % curr_fp), command)])
 return commands

def create_commands_eb ( all_files , ispaired , base_output_dir , optional_params = '' , leading_text = '' , trailing_text = '' , include_input_dir_path = False , remove_filepath_in_name = False ) : commands = [ ] extensions = [ '.fastq.gz' , '.fastq' , '.fq.gz' , '.fq' ] for curr_fp in all_files : if include_input_dir_path : added_output_str = curr_fp . split ( '/' ) [ ( - 2 ) ] else : added_output_str = '' if ( not remove_filepath_in_name ) : for extension in extensions : if ( extension in curr_fp ) : curr_ext = extension added_output_str += basename ( curr_fp ) . split ( curr_ext ) [ 0 ] curr_outputdir = join ( base_output_dir , added_output_str ) if ispaired : command = ( '%sextract_barcodes.py %s -f %s -r %s -o %s %s' % ( _clean_leading_text ( leading_text ) , optional_params , curr_fp , all_files [ curr_fp ] , curr_outputdir , trailing_text ) ) else : command = ( '%sextract_barcodes.py %s -f %s -o %s %s' % ( _clean_leading_text ( leading_text ) , optional_params , curr_fp , curr_outputdir , trailing_text ) ) commands . append ( [ ( ( 'extract_barcodes.py: %s' % curr_fp ) , command ) ] ) return commands
creates commands for extract_barcodes .