input: Write a function to calculate the percent of transcripts mapping to rRNA and MT genes from given HTseq_counts and GTF files. The function should return a dictionary containing the total number of rRNA and MT transcripts and the percentage of mapped reads for each. If either file does not exist, the function should return an error message. If both files are valid, the function should output a summary file named "HTseq_counts_file_rRNAmtRNACounts.txt".
  
  assert calculate_rRNA_MT_percent("/path/to/GTF/file", "/path/to/HTseq_counts/file") == {"Total rRNA transcripts": 500, "Total MT transcripts": 100, "Percent rRNA mapped reads": 50.0, "Percent MT mapped reads": 10.0}
  assert calculate_rRNA_MT_percent("/invalid/path/to/GTF/file", "/path/to/HTseq_counts/file") == "Error->\tGTF File: /invalid/path/to/GTF/file does not exist"
  assert calculate_rRNA_MT_percent("/path/to/GTF/file", "/invalid/path/to/HTseq_counts/file") == "Error->\tFile: /invalid/path/to/HTseq_counts/file does not exist"
  assert calculate_rRNA_MT_percent("/path/to/GTF/file", "/path/to/HTseq_counts/file") is not None
output: import os
  
  def calculate_rRNA_MT_percent(gtf_file, htseq_counts_file):
      if not os.path.exists(gtf_file):
          return f"Error->\tGTF File: {gtf_file} does not exist"
      if not os.path.exists(htseq_counts_file):
          return f"Error->\tFile: {htseq_counts_file} does not exist"
      
      rRNA_count = 0
      MT_count = 0
      total_reads = 0
      
      with open(gtf_file, 'r') as gtf:
          for line in gtf:
              if 'rRNA' in line:
                  rRNA_count += 1
              elif 'MT' in line:
                  MT_count += 1
      
      with open(htseq_counts_file, 'r') as htseq:
          for line in htseq:
              if not line.startswith("__"):
                  total_reads += int(line.split()[1])
      
      percent_rRNA = (rRNA_count / total_reads) * 100 if total_reads > 0 else 0
      percent_MT = (MT_count / total_reads) * 100 if total_reads > 0 else 0
      
      result = {
          "Total rRNA transcripts": rRNA_count,
          "Total MT transcripts": MT_count,
          "Percent rRNA mapped reads": percent_rRNA,
          "Percent MT mapped reads": percent_MT
      }
      
      summary_file_name = f"{htseq_counts_file}_rRNAmtRNACounts.txt"
      with open(summary_file_name, 'w') as summary_file:
          summary_file.write(f"Total rRNA transcripts: {rRNA_count}\n")
          summary_file.write(f"Total MT transcripts: {MT_count}\n")
          summary_file.write(f"Percent rRNA mapped reads: {percent_rRNA}\n")
          summary_file.write(f"Percent MT mapped reads: {percent_MT}\n")
      
      return result