code: def _align_mem(fastq_file, pair_file, ref_file, out_file, names, rg_info, data):
      
      with postalign.tobam_cl(data, out_file, pair_file != "") as (tobam_cl, tx_out_file):
          cmd = ("unset JAVA_HOME && "
                 "%s | %s" % (_get_bwa_mem_cmd(data, out_file, ref_file, fastq_file, pair_file), tobam_cl))
          do.run(cmd, "bwa mem alignment from fastq: %s" % names["sample"], None,
                  [do.file_nonempty(tx_out_file), do.file_reasonable_size(tx_out_file, fastq_file)])
      return out_file
docs: Perform bwa-mem alignment on supported read lengths.