code: def assemble(self):
          
          threadlock = threading.Lock()
          while True:
              (sample, command) = self.assemblequeue.get()
              if command and not os.path.isfile(os.path.join(sample.general.spadesoutput, 'contigs.fasta')):
                  # execute(command)
                  out, err = run_subprocess(command)
                  threadlock.acquire()
                  write_to_logfile(command, command, self.logfile, sample.general.logout, sample.general.logerr,
                                   None, None)
                  write_to_logfile(out, err, self.logfile, sample.general.logout, sample.general.logerr, None, None)
                  threadlock.release()
                  #
                  call(command, shell=True, stdout=open(os.devnull, 'wb'), stderr=open(os.devnull, 'wb'))
              dotter()
              # Signal to the queue that the job is done
              self.assemblequeue.task_done()
docs: Run the assembly command in a multi-threaded fashion