Remove the record_dict attribute from the object, as SeqRecords are not JSON-serializable. Also remove
        the contig_lengths and longest_contig attributes, as they are large lists that make the .json file ugly

def clear_attributes(self):
        """
        Remove the record_dict attribute from the object, as SeqRecords are not JSON-serializable. Also remove
        the contig_lengths and longest_contig attributes, as they are large lists that make the .json file ugly
        """
        for sample in self.metadata:
            try:
                delattr(sample[self.analysistype], 'record_dict')
                delattr(sample[self.analysistype], 'contig_lengths')
                delattr(sample[self.analysistype], 'longest_contig')
            except AttributeError:
                pass