San Diego-based Ligand Pharmaceuticals is acquiring San Diego-based Pfenex for a total deal transaction of up to $516 million.