input: 
  def calculate_rrna_percentage(htseq_counts_path: str, gtf_path: str) -> str:
      """
      Calculates the percentage of transcripts mapping to rRNA from the given HTseq_counts file and GTF file.
      The script extracts all the identifiers of genes/transcripts mapping to the rRNA and MT genes and counts
      the reads matching these identifiers. It writes the output to a file named "htseq_counts_file_rRNAmtRNACounts.txt".
      
      >>> calculate_rrna_percentage('/path/to/HTseq_counts/file', '/path/to/GTF/file')
      'Summary output file: /path/to/HTseq_counts_file_rRNAmtRNACounts.txt'
      """
  
output:     import re
      from collections import defaultdict
  
      def read_gtf(gtf_path):
          rrna_ids = set()
          with open(gtf_path, 'r') as gtf_file:
              for line in gtf_file:
                  if line.startswith('#'):
                      continue
                  fields = line.strip().split('\t')
                  if fields[2] == 'gene':
                      gene_info = fields[8]
                      if 'gene_biotype "rRNA"' in gene_info:
                          gene_id = re.search(r'gene_id "([^"]+)"', gene_info).group(1)
                          rrna_ids.add(gene_id)
          return rrna_ids
  
      def read_htseq_counts(htseq_counts_path, rrna_ids):
          rrna_counts = defaultdict(int)
          total_counts = 0
          with open(htseq_counts_path, 'r') as htseq_file:
              for line in htseq_file:
                  if line.startswith('__'):
                      continue
                  gene_id, count = line.strip().split('\t')
                  count = int(count)
                  total_counts += count
                  if gene_id in rrna_ids:
                      rrna_counts[gene_id] += count
          return rrna_counts, total_counts
  
      def write_output(rrna_counts, total_counts, output_file):
          with open(output_file, 'w') as out_file:
              out_file.write(f"Total counts: {total_counts}\n")
              out_file.write(f"rRNA counts: {sum(rrna_counts.values())}\n")
              out_file.write(f"rRNA percentage: {sum(rrna_counts.values()) / total_counts * 100:.2f}%\n")
  
      rrna_ids = read_gtf(gtf_path)
      rrna_counts, total_counts = read_htseq_counts(htseq_counts_path, rrna_ids)
      output_file = f"{htseq_counts_path}_rRNAmtRNACounts.txt"
      write_output(rrna_counts, total_counts, output_file)
      return f'Summary output file: {output_file}'