input: 
  def calculate_rrna_percent(htseq_counts_file: str, gtf_file: str) -> str:
      """ Calculate the percent of transcripts mapping to rRNA for given HTseq_counts file and GTF file.
      The script will produce a summary output file named "HTseq_counts_file_rRNAmtRNACounts.txt" containing the counts and percentages.
      
      >>> calculate_rrna_percent('C17_3_S20_Aligned.out.srt.bam_htseq_combined_counts.txt', 'Mus_musculus.GRCm38.84.gtf')
      'C17_3_S20_Aligned.out.srt.bam_htseq_combined_counts_rRNAmtRNACounts.txt'
      """
  
output:     
      rrna_counts = 0
      total_counts = 0
      
      with open(htseq_counts_file, 'r') as htseq_file:
          for line in htseq_file:
              if not line.startswith('__'):
                  total_counts += int(line.split()[1])
      
      with open(gtf_file, 'r') as gtf_file:
          for line in gtf_file:
              if 'rRNA' in line:
                  gene_id = line.split('\t')[8].split(';')[0].split(' ')[1].strip('"')
                  with open(htseq_counts_file, 'r') as htseq_file:
                      for htseq_line in htseq_file:
                          if gene_id in htseq_line:
                              rrna_counts += int(htseq_line.split()[1])
      
      rrna_percent = (rrna_counts / total_counts) * 100
      
      output_file_name = htseq_counts_file.replace('.txt', '_rRNAmtRNACounts.txt')
      with open(output_file_name, 'w') as output_file:
          output_file.write(f"Total counts: {total_counts}\n")
          output_file.write(f"rRNA counts: {rrna_counts}\n")
          output_file.write(f"rRNA percent: {rrna_percent:.2f}%\n")
      
      return output_file_name
  