Path-Based Sampling And Community Detection Methods For Biological And Other Applications