input: 
  def calculate_rRNA_percent(htseq_file: str, gtf_file: str) -> str:
      """
      Calculate the percent of transcripts mapping to rRNA and MT genes from an HTseq_counts file.
      
      This function takes two inputs: an HTseq_counts file and a GTF file containing reference transcriptome information.
      It parses these files to extract identifiers for rRNA and MT genes, counts the reads mapping to these identifiers,
      and calculates the percentage of reads that map to rRNA and MT genes.
      
      The output is a summary file named "htseq_file_rRNAmtRNACounts.txt" containing the counts and percentages.
      
      Example:
      >>> calculate_rRNA_percent("C17_3_S20_Aligned.out.srt.bam_htseq_combined_counts.txt", "Mus_musculus.GRCm38.84.gtf")
      'Summary output file:        C17_3_S20_Aligned.out.srt.bam_htseq_combined_counts_rRNAmtRNACounts.txt'
      """
  
output:     
      rRNA_ids = set()
      MT_ids = set()
      
      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]
                  if 'gene_biotype "rRNA"' in gene_info:
                      rRNA_ids.add(gene_info.split('gene_id "')[1].split('";')[0])
                  elif 'gene_biotype "Mt_rRNA"' in gene_info:
                      MT_ids.add(gene_info.split('gene_id "')[1].split('";')[0])
      
      rRNA_count = 0
      MT_count = 0
      total_count = 0
      
      with open(htseq_file, '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_ids:
                  rRNA_count += count
              elif gene_id in MT_ids:
                  MT_count += count
      
      rRNA_percent = (rRNA_count / total_count) * 100
      MT_percent = (MT_count / total_count) * 100
      
      output_file = f"{htseq_file.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"MT reads: {MT_count} ({MT_percent:.2f}%)\n")
      
      return f'Summary output file: {output_file}'
  