code: def run_bwa(job, fastqs, sample_type, univ_options, bwa_options):
      job.fileStore.logToMaster('Running bwa on %s:%s' % (univ_options['patient'], sample_type))
      work_dir = job.fileStore.getLocalTempDir()
      fq_extn = '.gz' if fastqs['gzipped'] else ''
      input_files = {
          'dna_1.fastq' + fq_extn: fastqs[sample_type][0],
          'dna_2.fastq' + fq_extn: fastqs[sample_type][1],
          'bwa_index.tar.gz': bwa_options['index_tar']}
      input_files = get_files_from_filestore(job, input_files, work_dir, docker=True)
      parameters = ['mem',
                    '-t', str(bwa_options['n']),
                    '-v', '1',
                    '/'.join([input_files['bwa_index'], 'hg19.fa']),
                    input_files['dna_1.fastq'],
                    input_files['dna_2.fastq']]
      with open(''.join([work_dir, '/', sample_type, '_aligned.sam']), 'w') as samfile:
          docker_call(tool='bwa', tool_parameters=parameters, work_dir=work_dir,
                      dockerhub=univ_options['dockerhub'], outfile=samfile)
      output_file = job.fileStore.writeGlobalFile(samfile.name)
      samfile_processing = job.wrapJobFn(bam_conversion, output_file, sample_type, univ_options,
                                         disk='60G')
      job.addChild(samfile_processing)
      return samfile_processing.rv()