The advantages and disadvantages of horizontal gene transfer and the emergence of the first species