Competing pathways determine fibril morphology in the self-assembly of beta2-microglobulin into amyloid.