code: def delete_bams(job, bams, patient_id):
      
      bams = {b: v for b, v in bams.items()
              if (b.endswith('.bam') or b.endswith('.bai')) and v is not None}
      if bams:
          for key, val in bams.items():
              job.fileStore.logToMaster('Deleting "%s" for patient "%s".' % (key, patient_id))
              job.fileStore.deleteGlobalFile(val)
      elif 'rna_genome' in bams:
          delete_bams(job, bams['rna_genome'], patient_id)
          job.fileStore.logToMaster('Deleting "rna_transcriptome.bam" for patient "%s".' % patient_id)
          job.fileStore.deleteGlobalFile(bams['rna_transcriptome.bam'])
      elif 'rnaChimeric.out.junction' in bams:
          job.fileStore.logToMaster('Deleting "rnaChimeric.out.junction" for patient "%s".' %
                                    patient_id)
          job.fileStore.deleteGlobalFile(bams['rnaChimeric.out.junction'])
      else:
          pass
docs: Delete the bams from the job Store once their purpose has been achieved (i.e. after all
      mutation calling steps). Will also delete the chimeric junction file from Star.
  
      :param dict bams: Dict of bam and bai files
      :param str patient_id: The ID of the patient for logging purposes.