@staticmethod
def clean_object(metadata, analysistype):
    """
        Remove certain attributes from the object; they take up too much room on the .json report
        :param metadata: Metadata object
        :param analysistype: Current analysis type
        """
    for sample in metadata:
        try:
            delattr(sample[analysistype], 'targetnames')
        except AttributeError:
            pass
        try:
            delattr(sample[analysistype], 'targets')
        except AttributeError:
            pass
        try:
            delattr(sample[analysistype], 'dnaseq')
        except AttributeError:
            pass
        try:
            delattr(sample[analysistype], 'protseq')
        except AttributeError:
            pass
