code: def assemble_amplicon_spades(self):
          
          for _ in self.metadata:
              # Send the threads to the merge method. :args is empty as I'm using
              threads = Thread(target=self.assemble, args=())
              # Set the daemon to true - something to do with thread management
              threads.setDaemon(True)
              # Start the threading
              threads.start()
          for sample in self.metadata:
              if sample.general.bestassemblyfile != 'NA':
                  if sample[self.analysistype].filetype == 'fastq':
                      sample[self.analysistype].spadesoutput = os.path.join(
                          sample[self.analysistype].outputdir, self.analysistype)
                      # Removed --careful, as there was an issue with the .fastq reads following baiting - something to
                      # do with the names, or the interleaving. Subsequent testing showed no real changes to assemblies
                      if len(sample.general.fastqfiles) == 2:
                          sample[self.analysistype].spadescommand = \
                              'spades.py -k {klength} --only-assembler --12 {fastq} -o {outfile} -t {threads}'\
                              .format(klength=self.kmers,
                                      fastq=sample[self.analysistype].doublebaitedfastq,
                                      outfile=sample[self.analysistype].spadesoutput,
                                      threads=self.threads)
                      else:
                          sample[self.analysistype].spadescommand = \
                              'spades.py -k {klength} --only-assembler -s {fastq} -o {outfile} -t {threads}' \
                              .format(klength=self.kmers,
                                      fastq=sample[self.analysistype].doublebaitedfastq,
                                      outfile=sample[self.analysistype].spadesoutput,
                                      threads=self.threads)
                      sample[self.analysistype].assemblyfile = os.path.join(sample[self.analysistype].spadesoutput,
                                                                            'contigs.fasta')
                      self.queue.put(sample)
          self.queue.join()
docs: Use SPAdes to assemble the amplicons using the double-baited .fastq files