code: def _parse_ctd_file(self, limit, file):
          
          row_count = 0
          version_pattern = re.compile(r'^# Report created: (.+)$')
          is_versioned = False
          file_path = '/'.join((self.rawdir, file))
          with gzip.open(file_path, 'rt') as tsvfile:
              reader = csv.reader(tsvfile, delimiter="\t")
              for row in reader:
                  # Scan the header lines until we get the version
                  # There is no official version sp we are using
                  # the upload timestamp instead
                  if is_versioned is False:
                      match = re.match(version_pattern, ' '.join(row))
                      if match:
                          version = re.sub(r'\s|:', '-', match.group(1))
                          # TODO convert this timestamp to a proper timestamp
                          self.dataset.setVersion(version)
                          is_versioned = True
                  elif re.match(r'^#', ' '.join(row)):
                      pass
                  else:
                      row_count += 1
                      if file == self.files[
                              'chemical_disease_interactions']['file']:
                          self._process_interactions(row)
                      elif file == self.files['gene_pathway']['file']:
                          self._process_pathway(row)
                      elif file == self.files['gene_disease']['file']:
                          self._process_disease2gene(row)
  
                  if not self.test_mode and limit is not None and row_count >= limit:
                      break
  
          return
docs: Parses files in CTD.files dictionary
          Args:
              :param limit (int): limit the number of rows processed
              :param file (str): file name (must be defined in CTD.file)
          Returns:
              :return None