Learning Sparse Representations Of Hierarchically Structured Data With Applications To Comparative Metagenomics