input: 
  def calculate_rRNA_percent(gtf_file: str, htseq_counts_file: str) -> str:
      """
      Calculate the percent of transcripts mapping to rRNA and MT genes from an HTseq_counts file and a GTF file.
      The script will extract all the identifiers of genes/transcripts mapping to the rRNA and MT genes and store them in two arrays.
      Then, it will count reads matching the rRNA and MT identifiers and write the output files.
      The summary output file will be named "HTseq_counts_file_rRNAmtRNACounts.txt".
      
      >>> calculate_rRNA_percent('/path/to/GTF/file', '/path/to/HTseq/counts/file')
      'Summary output file: HTseq_counts_file_rRNAmtRNACounts.txt'
      """
  
output:     rRNA_ids = []
      MT_ids = []
  
      with open(gtf_file, 'r') as gtf:
          for line in gtf:
              if line.startswith('#'):
                  continue
              fields = line.strip().split('\t')
              if fields[2] == 'gene':
                  attributes = fields[8].split(';')
                  gene_id = None
                  gene_type = None
                  for attr in attributes:
                      if 'gene_id' in attr:
                          gene_id = attr.split()[1].strip('"')
                      elif 'gene_type' in attr:
                          gene_type = attr.split()[1].strip('"')
                  if gene_type == 'rRNA':
                      rRNA_ids.append(gene_id)
                  elif gene_type == 'Mt_rRNA':
                      MT_ids.append(gene_id)
  
      rRNA_count = 0
      MT_count = 0
      total_count = 0
  
      with open(htseq_counts_file, 'r') as htseq:
          for line in htseq:
              if line.startswith('__'):
                  continue
              fields = line.strip().split('\t')
              gene_id = fields[0]
              count = int(fields[1])
              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_counts_file}_rRNAmtRNACounts.txt"
      with open(output_file, 'w') as out:
          out.write(f"rRNA_percent: {rRNA_percent:.2f}%\n")
          out.write(f"MT_percent: {MT_percent:.2f}%\n")
  
      return f'Summary output file: {output_file}'