Logo Search packages:      
Sourcecode: python-biopython version File versions  Download package

def Bio::PopGen::FDist::Async::SplitFDist::run_fdist (   self,
  npops,
  nsamples,
  fst,
  sample_size,
  mut = 0,
  num_sims = 20000,
  data_dir = '.',
  is_dominant = False,
  theta = 0.06,
  beta = (0.25, 0.25,
  max_freq = 0.99 
)
Runs FDist.

   Parameters can be seen on FDistController.run_fdist.

   It will split a single execution in several parts and
   create separated data directories.

Definition at line 147 of file Async.py.

                        :
        """Runs FDist.

           Parameters can be seen on FDistController.run_fdist.

           It will split a single execution in several parts and
           create separated data directories.
        """
        num_parts = num_sims/self.split_size
        self.parts = {}
        self.data_dir = data_dir
        for directory in range(num_parts):
           full_path = data_dir + os.sep + str(directory)
           try:
               os.mkdir(full_path)
           except OSError:
               pass #Its ok, if it is already there
           if "ss_file" in os.listdir(data_dir):
               shutil.copy(data_dir + os.sep + "ss_file", full_path)
           id = self.async.run_program('fdist', {
               'npops'       : npops,
               'nsamples'    : nsamples,
               'fst'         : fst,
               'sample_size' : sample_size,
               'mut'         : mut,
               'num_sims'    : self.split_size,
               'data_dir'    : full_path,
               'is_dominant' : is_dominant,
               'theta'       : theta,
               'beta'        : beta,
               'max_freq'    : max_freq 
           }, {})
           self.parts[id] = full_path
        thread.start_new_thread(self.monitor, ())

Generated by  Doxygen 1.6.0   Back to index