@classmethod
def as_dict_static(cls, state_obj):
    """Method to return a dict representation of the object. Necessary for storing.
        This method returns a dictionary *without any attribute that requires joined data*.
        As a static method, it is useful to be used outside of the class.
        :param state_obj: an instance of the HSP class or a
        collections.namedtuple object from a direct query

        :rtype : dict
        """
    keys = ['query_hsp_start', 'query_hsp_end', 'target_hsp_start',
        'target_hsp_end', 'hsp_evalue', 'hsp_bits', 'match', 'query_frame',
        'target_frame']
    state = dict().fromkeys(keys)
    for key in keys:
        state[key] = getattr(state_obj, key)
    return state
