code: def dictToFile(dictionary,replicateKey,outFileName):
      '''
      Function to write dictionary data, from subsampleReplicates, to file an hdf5 file. 
      :param dictionary: nested dictionary returned by subsampleReplicates
      :param replicateKey: string designating the replicate written to file
      :param outFileName: string defining the hdf5 filename
      '''
      replicateToFile=h5py.File(outFileName,"w")
      for i in range(len(dictionary[replicateKey])):
          replicateToFile.create_dataset("{}".format(dictionary[replicateKey].keys()[i])\
                                      ,data=dictionary[replicateKey].values()[i]\
                                      ,compression="gzip")
      replicateToFile.close(f dictToFile(dictionary,replicateKey,outFileName):
      '''
      Function to write dictionary data, from subsampleReplicates, to file an hdf5 file. 
      :param dictionary: nested dictionary returned by subsampleReplicates
      :param replicateKey: string designating the replicate written to file
      :param outFileName: string defining the hdf5 filename
      '''
      replicateToFile=h5py.File(outFileName,"w")
      for i in range(len(dictionary[replicateKey])):
          replicateToFile.create_dataset("{}".format(dictionary[replicateKey].keys()[i])\
                                      ,data=dictionary[replicateKey].values()[i]\
                                      ,compression="gzip")
      replicateToFile.close()
docs: Function to write dictionary data, from subsampleReplicates, to file an hdf5 file. 
      :param dictionary: nested dictionary returned by subsampleReplicates
      :param replicateKey: string designating the replicate written to file
      :param outFileName: string defining the hdf5 filename