def map_single_end(credentials, instance_config, instance_name,<EOL>script_dir, index_dir, fastq_file, output_dir,<EOL>num_threads=None, seed_start_lmax=None,<EOL>mismatch_nmax=None, multimap_nmax=None,<EOL>splice_min_overhang=None,<EOL>out_mult_nmax=None, sort_bam=True, keep_unmapped=False,<EOL>self_destruct=True, compressed=True,<EOL>**kwargs):
if sort_bam:<EOL><INDENT>out_sam_type = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>out_sam_type = '<STR_LIT>'<EOL><DEDENT>fastq_files = fastq_file<EOL>if isinstance(fastq_files, (str, _oldstr)):<EOL><INDENT>fastq_files = [fastq_file]<EOL><DEDENT>template = _TEMPLATE_ENV.get_template(<EOL>os.path.join('<STR_LIT>'))<EOL>startup_script = template.render(<EOL>script_dir=script_dir,<EOL>index_dir=index_dir,<EOL>fastq_files=fastq_files,<EOL>output_dir=output_dir,<EOL>num_threads=num_threads,<EOL>seed_start_lmax=seed_start_lmax,<EOL>self_destruct=self_destruct,<EOL>mismatch_nmax=mismatch_nmax,<EOL>multimap_nmax=multimap_nmax,<EOL>splice_min_overhang=splice_min_overhang,<EOL>out_mult_nmax=out_mult_nmax,<EOL>keep_unmapped=keep_unmapped,<EOL>compressed=compressed,<EOL>out_sam_type=out_sam_type)<EOL>if len(startup_script) > <NUM_LIT>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>op_name = instance_config.create_instance(<EOL>credentials, instance_name, startup_script=startup_script, **kwargs)<EOL>return op_name<EOL>
Maps single-end reads using STAR.

    Reads are expected in FASTQ format. By default, they are also expected to
    be compressed with gzip.

    - recommended machine type: "n1-standard-16" (60 GB of RAM, 16 vCPUs).
    - recommended disk size: depends on size of FASTQ files, at least 128 GB.

    TODO: docstring