Skip to content

Instantly share code, notes, and snippets.

@suuuehgi
Last active October 9, 2024 15:17
Show Gist options
  • Save suuuehgi/5ead5f9788a38c87d9d693c7f1aa4d3b to your computer and use it in GitHub Desktop.
Save suuuehgi/5ead5f9788a38c87d9d693c7f1aa4d3b to your computer and use it in GitHub Desktop.
Vegan Protein Engineering: Alternatives to Whey Concentrates

Vegan Protein Engineering: Alternatives to Whey Concentrates

Problem

Common protein supplementation is done by using whey protein. I want a plant based supplement. How good are the commercial products? How to DIY?

Methods

What is good?

There is the Digestible Indispensable Amino Acid Score (DIAAS) (successor of the Protein Digestibility Corrected Amino Acid Score [PDCAAS], which is a successor of the Biological Value [BV]).

It essentially is the "largest deviation" in percent of an indispensable amino acid (IAA) at the end of the small intestine (intake multiplied by a digestibility coefficient) compared to an age-dependent reference amino acid profile. A DIAAS score of 133 means that the amount/level of each IAA is at least 33% higher at the end of the small intestine than in the reference profile. If, for example, a single IAA is missing, the score is 0.

The top scores are:

Product DIAAS Score
Milk Protein Concentrate (MPC) 141
Whey Protein Concentrate (WPC) 133

Unlike whey protein concentrate, I couldn't find any commercial milk protein concentrates on Amazon quickly. Therefore I use WPC as a reference.

WPC Profile

I took products from this article, the local product Eder WheyFit and the one from DM - taking the largest (cheapest per mass) quantity available each.

Product Price [EUR / kg] Price per 100 g Protein [EUR / kg]
Eder WheyFit (81.9 %) 39.99 48.83
DM Sportness Proteinpulver (87 %) 26.50 30.46
Weider Protein 80 Plus (80 %) 50.75 63.44
ESN Designer Whey Protein (73 %) 34.95 47.88
Bodylab Whey Protein (67 %) 29.93 44.67

The profile of the IAA among the selection is quite similar with some outliers. The average amount per IAA will be the reference profile.

whey

Profiles relative to the average profile: whey_rel

ESN would probably result in a low DIAAS score, as it contains significantly less histidine, methionine and phenylalanine (the highest deviation determines the score). DM and WheyFit would get the highest DIAAS scores.

Vegan Products

Same for some vegan products:

Product Price [EUR / kg] Price per 100 g Protein [EUR / kg]
Rocka No Whey (66 %) (PeTA's favorite) 44.97 68.14
ESN Designer Vegan Protein (69 %) (brand from above) 27.62 40.03
Bodylab Vegan Protein (78 %) (brand from above) 24.95 31.99
Nutri+ Vegan 3K (74.5 %) (GQ's favorite) 29.99 40.26
NATGYM Proteinshake vegan (48 %) (tasted delicious at a trade fair) 34.90 72.71

veg_rel

None performs well. Bodylab Vegan would have the lowest DIAAS score because it is severely deficient in methionin, although it performs best on all other IAA. NATGYM has the lowest total IAA content per 100 g dry substance.

Natural Protein

I looked around to see which protein powders are available in organic quality on the German market. In doing so, I came across Erdschwalbe, VEGJi and Piowald. Piowald offers local products, but does not list the IAA profile for each product, so I took the average of Erdschwalbe and VEGJi. I used the average IAA content of both products.

nat_rel

Pea protein is already quite good, but lacks methionin, tryptophan and threonin.

Mixing

The simplest way of mixing is to find the "best" solution for $A \cdot x = b$, where $b$ is the reference profile, $x$ the quantities and $A$ the IAA profiles of the ingredients (column by column), i.e. minimizing $\left\Vert Ax - b \right\Vert_2^2$.

As overshooting $b$ is not a concern, I want to minimize undershooting. That is: If $A \cdot x < b$, $A \cdot x - b < 0$.

Hence the target function shall be:

$$ \left(A \cdot x - b\right)_i = \begin{cases} \left(A \cdot x - b\right)_i & \text{if } \left(A \cdot x - b\right)_i \leq 0 \\ 0 & \text{if } \left(A \cdot x - b\right)_i > 0 \end{cases} $$

Or shorthand $\min{\left( Ax - b, 0 \right)}$ where the $\min$ is element-wise.

Hence the problem becomes $\min{\left\Vert \min{\left( Ax - b, 0 \right)} \right\Vert_2^2}$, (or

np.sum(np.clip(A @ x - b, a_min=None, a_max=0)**2)

in Python) with the constraint $\sum x_i = 1$.

I use the following code:

from scipy import optimize
import numpy as np

optimize.minimize(
        fun = lambda x, A, b: np.sum(np.clip(A @ x - b, a_min=None, a_max=0)**2),
        x0 = np.ones(A.shape[1]) / A.shape[1],
        args=(A, b),
        method='cobyla',
        bounds=[(0, 1) for _ in range(A.shape[1])],
        constraints=[
            {'type': 'ineq', 'fun': lambda x: x.sum() - 1},  # sum(x) >= 1
            {'type': 'ineq', 'fun': lambda x: 1 - x.sum()},  # sum(x) <= 1
        ],
        options = {'maxiter': 100000}
    )

Mixing With Natural Proteins

Considering all possible combinations with four ingredients of the natural proteins from above,

$\Vert\min{\left( Ax - b, 0 \right)}\Vert$ Combination
2065 5 % Rice, 95 % Pea
2076 100 % Pea
4078 100 % Rice
6792 100 % Pumpkin Seed
7583 100 % Hemp

the clear winners are (5 % Rice, 95 % Pea) and pure pea protein.

nat_mix_rel

Mixing rice into pea protein has a negligible effect. Interestingly, despite lacking the aforementioned IAAs, pure pea protein is the clear winner.

Adding IAAs

Taking the natural proteins from above and flavoring them with IAAs, I get the following, considering all possible combinations of five ingredients:

$\Vert\min{\left( Ax - b, 0 \right)}\Vert$ Combination
397 92.3 % Rice, 1.0 % Isoleucin, 3.8 % Lysin, 1.8 % Threonin, 1.0 % Valin
943 93.2 % Rice, 1.0 % Isoleucin, 3.8 % Lysin, 1.7 % Threonin, 0.4 % Tryptophan
979 80.1 % Rice, 14.0 % Pea, 0.9 % Isoleucin, 3.3 % Lysin, 1.7 % Threonin
999 93.5 % Rice, 1.0 % Isoleucin, 3.7 % Lysin, 1.7 % Threonin
1000 93.5 % Rice, 1.0 % Isoleucin, 3.8 % Lysin, 1.7 % Threonin
1028 93.3 % Rice, 3.8 % Lysin, 1.7 % Threonin, 0.3 % Tryptophan, 0.9 % Valin
1031 91.3 % Rice, 2.1 % Sunflower Seed, 1.0 % Isoleucin, 3.8 % Lysin, 1.8 % Threonin
1053 86.0 % Rice, 7.9 % Pea, 3.5 % Lysin, 1.7 % Threonin, 0.9 % Valin
1069 87.5 % Rice, 5.8 % Pumpkin Seed, 1.1 % Isoleucin, 3.8 % Lysin, 1.8 % Threonin
1079 93.6 % Rice, 0.0 % Histidin, 3.7 % Lysin, 1.7 % Threonin, 0.9 % Valin
1080 93.7 % Rice, 3.7 % Lysin, 1.7 % Threonin, 0.9 % Valin
1081 96.2 % Pea, 0.8 % Leucin, 0.8 % Methionin, 1.5 % Threonin, 0.7 % Valin
1133 96.3 % Pea, 0.8 % Leucin, 0.6 % Lysin, 0.8 % Methionin, 1.5 % Threonin
1137 96.4 % Pea, 0.6 % Isoleucin, 0.8 % Leucin, 0.7 % Methionin, 1.5 % Threonin
1183 96.3 % Pea, 0.8 % Leucin, 0.6 % Lysin, 1.6 % Threonin, 0.7 % Valin
1187 96.3 % Pea, 0.6 % Isoleucin, 0.8 % Leucin, 1.5 % Threonin, 0.7 % Valin
1197 96.5 % Pea, 0.6 % Lysin, 0.7 % Methionin, 1.5 % Threonin, 0.7 % Valin
1237 96.4 % Pea, 0.6 % Isoleucin, 0.8 % Leucin, 0.6 % Lysin, 1.6 % Threonin
1245 96.7 % Pea, 0.5 % Isoleucin, 0.5 % Lysin, 0.7 % Methionin, 1.5 % Threonin
1248 96.6 % Pea, 0.8 % Leucin, 1.5 % Threonin, 0.4 % Tryptophan, 0.7 % Valin
(...)

The mixtures most interesting to me are:

Mixture Number Mixture
1 92.3 % Rice, 1.0 % Isoleucin, 3.8 % Lysin, 1.8 % Threonin, 1.0 % Valin
2 93.2 % Rice, 1.0 % Isoleucin, 3.8 % Lysin, 1.7 % Threonin, 0.4 % Tryptophan
3 80.1 % Rice, 14.0 % Pea, 0.9 % Isoleucin, 3.3 % Lysin, 1.7 % Threonin
4 96.2 % Pea, 0.8 % Leucin, 0.8 % Methionin, 1.5 % Threonin, 0.7 % Valin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment