code: def sort_and_index_star(job, star_bams, univ_options, star_options):
      
      star_options['samtools']['n'] = star_options['n']
      sort = job.wrapJobFn(sort_bamfile, star_bams['rnaAligned.out.bam'], 'rna', univ_options,
                           samtools_options=star_options['samtools'],
                           disk=PromisedRequirement(sort_disk, star_bams['rnaAligned.out.bam']))
      index = job.wrapJobFn(index_bamfile, sort.rv(), 'rna', univ_options,
                            samtools_options=star_options['samtools'], sample_info='genome_sorted',
                            disk=PromisedRequirement(index_disk, sort.rv()))
      job.addChild(sort)
      sort.addChild(index)
      return {'rna_genome': index.rv(),
              'rna_transcriptome.bam': star_bams['rnaAligned.toTranscriptome.out.bam'],
              'rnaChimeric.out.junction': star_bams['rnaChimeric.out.junction']}
docs: A wrapper for sorting and indexing the genomic star bam generated by run_star. It is required
      since run_star returns a dict of 2 bams
  
      :param dict star_bams: The bams from run_star
      :param dict univ_options: Dict of universal options used by almost all tools
      :param dict star_options: Options specific to star
      :return: Dict containing input bam and the generated index (.bam.bai)
                       output_files:
                          |- 'rna_transcriptome.bam': fsID
                          +- 'rna_genome':
                                   |- 'rna_sorted.bam': fsID
                                   +- 'rna_sorted.bam.bai': fsID
                          +- 'rnaChimeric.out.junction': fsID
      :rtype: dict