input: 
  from typing import List
  
  def calculate_percent_rRNA(htseq_counts: str, gtf_file: str) -> str:
      """ Calculates the percentage of transcripts mapping to rRNA and writes the output to a file named after the input HTseq_counts file with '_rRNAmtRNACounts.txt' appended.
      >>> calculate_percent_rRNA("test_counts.txt", "test.gtf")
      "Summary output file: test_counts_rRNAmtRNACounts.txt"
      """
      pass
  
output:     
      import re
  
      # Read the GTF file to identify rRNA and tRNA features
      rRNA_features = set()
      tRNA_features = set()
      with open(gtf_file, 'r') as gtf:
          for line in gtf:
              if line.startswith('#'):
                  continue
              fields = line.strip().split('\t')
              if fields[2] == 'rRNA':
                  rRNA_features.add(fields[8].split(';')[0].split()[1].strip('"'))
              elif fields[2] == 'tRNA':
                  tRNA_features.add(fields[8].split(';')[0].split()[1].strip('"'))
  
      # 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 rRNA_features:
                  rRNA_count += count
              elif gene_id in tRNA_features:
                  tRNA_count += count
  
      # Calculate the percentage of rRNA and tRNA
      rRNA_percent = (rRNA_count / total_count) * 100 if total_count > 0 else 0
      tRNA_percent = (tRNA_count / total_count) * 100 if total_count > 0 else 0
  
      # Write the output to a file
      output_file = htseq_counts.rsplit('.', 1)[0] + '_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}"
  