I would like to make a function without installing any external package. In this function i would like to calculate a pI value of amino acids. Formula for calculating a pI value is
pI= 1/2(alpha carboxy+alpha amino)
regarding this, i have following data.
alpha_carboxy=c(I=2.36, L=2.36, K=2.18, M=2.28, F=1.83, T=2.63, W=2.38, V=2.32, R=2.17, H=1.82, A=2.34, N=2.02, D=2.09, C=1.71, E=2.19, Q=2.17, G=2.34, P=1.99, S=2.21, Y=2.2)
alpha_amino=c(I=9.68, L=9.60, K=8.95, M=9.21, F=9.13, T=9.10, W=9.39, V=9.62, R=9.04, H=9.17, A=9.69, N=8.84, D=9.82, C=10.78, E=9.67, Q=9.13, G=9.60, P=10.60, S=9.15, Y=9.11)
Input or argument should be continuous (without any gap or commas).
amino_acids =c(I, L, K, M, F, T, W, V, R, H, A, N, D, C, E, Q, G, P, S, Y)
Input should be like (ILKMFTWVRHANDCEQSY)
So, i want my function to read an argument in the format like i have just explained above and then calculate it with the help of a formula.
Thank you!