code: def bam_to_fastq(self, bam_file, out_fastq_pre, paired_end):
          
          self.make_sure_path_exists(os.path.dirname(out_fastq_pre))
          cmd = self.tools.java + " -Xmx" + self.pm.javamem
          cmd += " -jar " + self.tools.picard + " SamToFastq"
          cmd += " I=" + bam_file
          cmd += " F=" + out_fastq_pre + "_R1.fastq"
          if paired_end:
              cmd += " F2=" + out_fastq_pre + "_R2.fastq"
          cmd += " INCLUDE_NON_PF_READS=true"
          cmd += " QUIET=true"
          cmd += " VERBOSITY=ERROR"
          cmd += " VALIDATION_STRINGENCY=SILENT"
          return cmd
docs: Build command to convert BAM file to FASTQ file(s) (R1/R2).
  
          :param str bam_file: path to BAM file with sequencing reads
          :param str out_fastq_pre: path prefix for output FASTQ file(s)
          :param bool paired_end: whether the given file contains paired-end
              or single-end sequencing reads
          :return str: file conversion command, ready to run