Parse the number of core genes present in the strain from the BLAST outputs
        :param report: the name and path of the BLAST outputs
        :param sample: the sample object
        :param fieldnames: type LIST: List of fields used to in BLAST analyses

def blastparser(self, report, sample, fieldnames):
        """
        Parse the number of core genes present in the strain from the BLAST outputs
        :param report: the name and path of the BLAST outputs
        :param sample: the sample object
        :param fieldnames: type LIST: List of fields used to in BLAST analyses
        """
        try:
            # Open the sequence profile file as a dictionary
            blastdict = DictReader(open(report), fieldnames=self.fieldnames, dialect='excel-tab')
            # Go through each BLAST result
            for row in blastdict:
                # Ignore the headers
                if row['query_id'].startswith(fieldnames[0]):
                    pass
                else:
                    # Calculate the percent identity and extract the bitscore from the row
                    # Percent identity is the (length of the alignment - number of mismatches) / total subject length
                    percentidentity = float('{:0.2f}'.format((float(row['positives']) - float(row['gaps'])) /
                                                             float(row['subject_length']) * 100))
                    # Split off any | and - from the sample name
                    target = row['subject_id'].split('|')[0].split('-')[0]
                    # If the hit passes the cutoff threshold, add it to the set of core genes present
                    if percentidentity >= self.cutoff:
                        sample[self.analysistype].coreset.add(target)
        except FileNotFoundError:
            pass