Setup and create  threads for ePCR

def vtyper(self):
        """Setup and create  threads for ePCR"""
        logging.info('Running ePCR')
        # Create the threads for the BLAST analysis
        for sample in self.metadata:
            if sample.general.bestassemblyfile != 'NA':
                threads = Thread(target=self.epcr, args=())
                threads.setDaemon(True)
                threads.start()
        # Create the system calls for famap, fahash, and ePCR
        with progressbar(self.metadata) as bar:
            for sample in bar:
                if sample.general.bestassemblyfile != 'NA':
                    if 'stx' in sample.general.datastore:
                        setattr(sample, self.analysistype, GenObject())
                        # Get the primers ready
                        if self.reffilepath:
                            sample[self.analysistype].primers = os.path.join(self.reffilepath,
                                                                             self.analysistype,
                                                                             'vtx_subtyping_primers.txt')
                        else:
                            sample[self.analysistype].primers = self.primerfile
                        # Make the output path
                        sample[self.analysistype].reportdir = os.path.join(sample.general.outputdirectory,
                                                                           self.analysistype)
                        make_path(sample[self.analysistype].reportdir)
                        outfile = sample[self.analysistype].reportdir + sample.name
                        # Set the hashing and mapping commands
                        sample.commands.famap = 'famap -b {}.famap {}.fasta'.format(outfile, sample.general.filenoext)
                        sample.commands.fahash = 'fahash -b {}.hash {}.famap'.format(outfile, outfile)
                        # re-PCR uses the subtyping primers list to search the file with the following parameters
                        # -S {hash file} (Perform STS lookup using hash-file),
                        # -r + (Enable/disable reverse STS lookup)
                        # -m 10000 (Set variability for STS size for lookup),
                        # -n 1 (Set max allowed mismatches per primer for lookup)
                        # -g 0 (Set max allowed indels per primer for lookup),
                        # -G (Print alignments in comments),
                        # -q quiet
                        # -o {output file},
                        sample.commands.epcr = 're-PCR -S {}.hash -r + -m 10000 -n 1 -g 0 -G -q -o {}.txt {}'\
                            .format(outfile, outfile, sample[self.analysistype].primers)
                        sample[self.analysistype].resultsfile = '{}.txt'.format(outfile)
                        self.epcrqueue.put((sample, outfile))
        self.epcrqueue.join()
        self.epcrparse()