Models of microbial dynamics : from genetic exchange to ecological interactions