code: def _importSequence(chromosome, fastaFile, targetDir) :
      "Serializes fastas into .dat files"
  
      f = gzip.open(fastaFile)
      header = f.readline()
      strRes = f.read().upper().replace('\n', '').replace('\r', '')
      f.close()
  
      fn = '%s/chromosome%s.dat' % (targetDir, chromosome.number)
      f = open(fn, 'w')
      f.write(strRes)
      f.close()
      chromosome.dataFile = fn
      chromosome.header = header
      return len(strResf _importSequence(chromosome, fastaFile, targetDir) :
      "Serializes fastas into .dat files"
  
      f = gzip.open(fastaFile)
      header = f.readline()
      strRes = f.read().upper().replace('\n', '').replace('\r', '')
      f.close()
  
      fn = '%s/chromosome%s.dat' % (targetDir, chromosome.number)
      f = open(fn, 'w')
      f.write(strRes)
      f.close()
      chromosome.dataFile = fn
      chromosome.header = header
      return len(strRes)
docs: Serializes fastas into .dat files