input: 
  from typing import List
  
  def calculate_rRNA_percent(htseq_counts: str, gtf_file: str) -> str:
      """Calculate the percent of transcripts mapping to rRNA and write the output to a file.
      >>> calculate_rRNA_percent('/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
  
      # Read the GTF file and extract rRNA and tRNA gene information
      gene_types = defaultdict(int)
      with open(gtf_file, 'r') as gtf:
          for line in gtf:
              if line.startswith('#'):
                  continue
              fields = line.strip().split('\t')
              if fields[2] == 'gene':
                  gene_info = fields[8]
                  gene_type = re.search(r'gene_biotype "([^"]+)"', gene_info)
                  if gene_type:
                      gene_types[gene_type.group(1)] += 1
  
      # Read the HTseq counts file and count rRNA and tRNA reads
      rRNA_count = 0
      tRNA_count = 0
      total_count = 0
      with open(htseq_counts, 'r') as htseq:
          for line in htseq:
              if line.startswith('__'):
                  continue
              gene_id, count = line.strip().split('\t')
              count = int(count)
              total_count += count
              if gene_id in gene_types:
                  if gene_types[gene_id] == 'rRNA':
                      rRNA_count += count
                  elif gene_types[gene_id] == 'tRNA':
                      tRNA_count += count
  
      # Calculate the percent of rRNA and tRNA reads
      rRNA_percent = (rRNA_count / total_count) * 100
      tRNA_percent = (tRNA_count / total_count) * 100
  
      # Write the output to a file
      output_file = f"{htseq_counts}_rRNAmtRNACounts.txt"
      with open(output_file, 'w') as out:
          out.write(f"Total reads: {total_count}\n")
          out.write(f"rRNA reads: {rRNA_count} ({rRNA_percent:.2f}%)\n")
          out.write(f"tRNA reads: {tRNA_count} ({tRNA_percent:.2f}%)\n")
  
      return f'Summary output file: {output_file}'