Distance-based methods for detecting associations in structured data with applications in bioinformatics