Populates objects with the necessary attributes
        :param sample: sample object

def populator(self, sample):
        """
        Populates objects with the necessary attributes
        :param sample: sample object
        """
        from accessoryFunctions.accessoryFunctions import GenObject
        if sample.general.bestassemblyfile != 'NA':
            profile = ''
            setattr(sample, self.analysistype, GenObject())
            sample[self.analysistype].analyse = True
            if self.analysistype.lower() == 'rmlst':
                # Run the allele updater method
                updatecall, allelefolder = getrmlsthelper(self.referencefilepath, self.updatedatabases, self.start)
                # Alleles have a .tfa extension
                self.alleles = glob('{}/*.tfa'.format(allelefolder))
                # Get the profile file into a list
                profile = glob('{}/*.txt'.format(allelefolder))
                self.supplementalprofile = '{}rMLST/OLC_rMLST_profiles.txt'.format(self.referencefilepath)
                self.supplementalalleles = '{}rMLST/OLC_rMLST_alleles.fa'.format(self.referencefilepath)
                self.combinedalleles = glob('{}/*.fasta'.format(allelefolder))
                # Set the metadata file appropriately
                sample[self.analysistype].alleledir = allelefolder
                sample[self.analysistype].updatecall = updatecall
            else:
                # Use the getmlsthelper module to download databases as required
                schemefolder = getmlsthelper(self.referencefilepath, self.start, sample.general.referencegenus,
                                             self.updatedatabases)
                # If there is no database folder, do not perform the MLST analyses on this sample
                if not schemefolder:
                    sample[self.analysistype].analyse = False
                    # Set the metadata file appropriately
                    sample[self.analysistype].alleles = 'NA'
                    sample[self.analysistype].allelenames = 'NA'
                    sample[self.analysistype].profile = 'NA'
                    sample[self.analysistype].analysistype = 'NA'
                    sample[self.analysistype].reportdir = 'NA'
                    sample[self.analysistype].combinedalleles = 'NA'
                    sample[self.analysistype].supplementalprofile = 'NA'
                    sample[self.analysistype].supplementalalleles = 'NA'
                    sample[self.analysistype].alleledir = 'NA'
                else:
                    self.alleles = glob('{}/*.tfa'.format(schemefolder))
                    profile = glob('{}/*.txt'.format(schemefolder))
                    self.combinedalleles = glob('{}/*.fasta'.format(schemefolder))
                    sample[self.analysistype].alleledir = schemefolder
            # Only perform analyses on samples with target databases
            if sample[self.analysistype].analyse:
                sample[self.analysistype].alleles = self.alleles
                sample[self.analysistype].allelenames = [os.path.split(x)[1].split('.')[0] for x in self.alleles]
                sample[self.analysistype].profile = profile if profile else 'NA'
                sample[self.analysistype].analysistype = self.analysistype
                sample[self.analysistype].reportdir = '{}/{}/'.format(sample.general.outputdirectory,
                                                                      self.analysistype)
                sample[self.analysistype].combinedalleles = self.combinedalleles
                sample[self.analysistype].supplementalprofile = self.supplementalprofile \
                    if self.supplementalprofile else 'NA'
                sample[self.analysistype].supplementalalleles = self.supplementalalleles \
                    if self.supplementalalleles else 'NA'
                print(sample[self.analysistype].datastore)

        else:
            setattr(sample, self.analysistype, GenObject())
            # Set the metadata file appropriately
            sample[self.analysistype].alleledir = 'NA'
            sample[self.analysistype].alleles = 'NA'
            sample[self.analysistype].allelenames = 'NA'
            sample[self.analysistype].profile = 'NA'
            sample[self.analysistype].analysistype = 'NA'
            sample[self.analysistype].reportdir = 'NA'
            sample[self.analysistype].combinedalleles = 'NA'
            sample[self.analysistype].supplementalprofile = 'NA'
            sample[self.analysistype].supplementalalleles = 'NA'