The distance-profile representation and its application to detection of distantly related protein families