input: Write a function to calculate the percentage of transcripts mapping to rRNA and MT genes from an HTseq_counts file and a GTF file. The function should return the percentage of rRNA and MT mapped reads, and the total counts of rRNA and MT transcripts. If the files do not exist, the function should return an error message.
  
  assert calculate_rRNA_MT_percentages("/path/to/GTF/file", "/path/to/HTseq_counts/file") == {'rRNA_count': 12345, 'MT_count': 6789, 'rRNA_percent': 12.345, 'MT_percent': 6.789}
  assert calculate_rRNA_MT_percentages("/path/to/nonexistent/GTF/file", "/path/to/HTseq_counts/file") == "Error: GTF File does not exist"
  assert calculate_rRNA_MT_percentages("/path/to/GTF/file", "/path/to/nonexistent/HTseq_counts/file") == "Error: HTseq_counts File does not exist"
output: 
  def calculate_rRNA_MT_percentages(gtf_file, htseq_counts_file):
      import os
      if not os.path.exists(gtf_file):
          return "Error: GTF File does not exist"
      if not os.path.exists(htseq_counts_file):
          return "Error: HTseq_counts File does not exist"
      
      rRNA_count = 0
      MT_count = 0
      total_counts = 0
      
      with open(gtf_file, 'r') as gtf:
          rRNA_genes = set()
          MT_genes = set()
          for line in gtf:
              if line.startswith('#'):
                  continue
              fields = line.strip().split('\t')
              if fields[2] == 'gene':
                  gene_info = fields[8].split(';')
                  gene_id = [x.strip().split()[1].strip('"') for x in gene_info if 'gene_id' in x][0]
                  gene_type = [x.strip().split()[1].strip('"') for x in gene_info if 'gene_type' in x][0]
                  if gene_type == 'rRNA':
                      rRNA_genes.add(gene_id)
                  elif gene_type == 'Mt_tRNA' or gene_type == 'Mt_rRNA':
                      MT_genes.add(gene_id)
      
      with open(htseq_counts_file, 'r') as htseq:
          for line in htseq:
              if line.startswith('__'):
                  continue
              gene_id, count = line.strip().split('\t')
              count = int(count)
              total_counts += count
              if gene_id in rRNA_genes:
                  rRNA_count += count
              elif gene_id in MT_genes:
                  MT_count += count
      
      rRNA_percent = (rRNA_count / total_counts) * 100 if total_counts > 0 else 0
      MT_percent = (MT_count / total_counts) * 100 if total_counts > 0 else 0
      
      return {
          'rRNA_count': rRNA_count,
          'MT_count': MT_count,
          'rRNA_percent': rRNA_percent,
          'MT_percent': MT_percent
      }
  