Fitting TOCSY (2D 1H NMR) Data with Mathematica
So this isn't so much "fitting" as it is programming in known data points and then making a function that easily allows one to switch between different inputs until one that is close enough is identified visually. It could be substantially improved by adding peak detection and error calculations.
For one of my classes, Ch 007, my lab partner and I used solid phase synthesis techniques to make a pentapeptide incorporating four known peptides (one of which is non canonical) and an unknown mystery peptide in a known order. Solid phase techniques are generally known for their extremely high yields. Given that it was my first go at the technique I think I might have played a key role in obtaining a much lower than expected yield. Nevertheless, the product was purified by prep HPLC and the result was rather pure in the 1H NMR spectrum. We obtained a TOCSY 2D spectrum and are now tasked with interpreting the TOCSY spectrum as well as ESI-MS and MALDI-MS to verify the structure of the product.
To do this one has to use the correlation of peaks in 1D by looking at the off-diagonal peaks in the 2D spectrum which are indicative of through bond coupling. By doing so one can extrapolate the connectivity of the molecule. This is especially challenging because the long distance correlations are most indicative of successful amide bond formation but are challenging to clearly observe in the conventional NMR interpretation software MestReNova.
I found the expected COSY/TOCSY crosspeaks from http://www.bp.uni-bayreuth.de/NMR/nmr_alltocsy.html
and wrote them into mathematica as their three letter label. Note that these are for the unbound amino acid and so slight changes in the chemical shift and couplings are to be expected. Then by writing a simple function that extrapolates the other crosspeaks and the diagonal I can enter a list of amino acids into the tocsyPlot function and with some image processing rescale the spectrum to fit the plot to see if my amino acid guess was right. below is the image followed by the code. Obviously to reuse the code one would have to obtain their own tocsy spectrum and do the rescaling of the image to the plot on their own.
(Image updated on 06.22.2019)
ala = {{1.39, 8.25}, {1.39, 4.35}, {4.35, 8.25}};
arg = {{1.70, 4.38}, {1.70, 7.17}, {1.70, 8.27}, {1.79, 3.32}, {1.79,
7.17}, {1.79, 8.27}, {1.89, 3.32}, {1.89, 7.17}, {1.89,
8.27}, {3.32, 4.38}, {3.32, 8.27}, {4.38, 7.17}, {7.17,
8.27}, {1.70, 1.79}, {1.70, 1.89}, {1.70, 3.32}, {1.79,
1.89}, {1.79, 4.38}, {1.89, 4.38}, {3.32, 7.17}, {4.38, 8.27}};
asp = {{2.75, 8.41}, {2.84, 8.41}, {2.75, 2.83}, {2.75, 4.75}, {2.83,
4.75}, {4.75, 8.41}};
cys = {{2.96, 8.31}, {3.28, 8.31}, {2.96, 3.28}, {2.96, 4.69}, {3.28,
4.69}, {4.69, 8.31}};
gln = {{2.01, 8.41}, {2.13, 8.41}, {2.38, 4.37}, {2.38, 8.41}, {2.01,
2.13}, {2.01, 2.38}, {2.01, 4.37}, {2.13, 2.38}, {2.13,
4.37}, {4.37, 8.41}, {6.87, 7.59}};
glu = {{1.97, 8.37}, {2.09, 8.37}, {2.28, 4.29}, {2.28, 8.37}, {2.31,
4.29}, {2.31, 8.37}, {1.97, 2.09}, {1.97, 2.28}, {1.97,
2.31}, {1.97, 4.29}, {2.09, 2.28}, {2.09, 2.31}, {2.09,
4.29}, {2.28, 2.31}, {4.29, 8.37}};
gly = {{3.97, 8.39}};
his = {{3.2, 8.41}, {3.26, 8.41}, {7.14, 8.12}, {3.2, 3.26}, {3.2,
4.63}, {3.26, 4.63}, {4.63, 8.41}};
ile = {{0.89, 0.95}, {0.89, 1.90}, {0.89, 4.23}, {0.89, 8.19}, {0.95,
1.19}, {0.95, 1.48}, {0.95, 4.23}, {0.95, 8.19}, {1.19,
4.23}, {1.19, 8.19}, {1.48, 4.23}, {1.48, 8.19}, {1.90,
8.19}, {0.89, 1.19}, {0.89, 1.48}, {0.95, 1.90}, {1.19,
1.48}, {1.19, 1.90}, {1.48, 1.90}, {1.90, 4.23}, {4.23, 8.19}};
leu = {{0.9, 0.94}, {0.90, 1.65}, {0.90, 4.38}, {0.90, 8.42}, {0.94,
1.65}, {0.94, 4.38}, {0.94, 8.42}, {1.64, 4.38}, {1.64,
8.42}, {1.65, 8.42}, {0.90, 1.64}, {0.94, 1.64}, {1.64,
1.65}, {1.65, 4.38}, {4.38, 8.42}};
lys = {{1.45, 1.70}, {1.45, 1.76}, {1.45, 1.85}, {1.45, 3.20}, {1.45,
4.36}, {1.45, 8.41}, {11.70, 1.76}, {1.70, 1.85}, {1.70,
3.20}, {1.70, 4.36}, {1.70, 8.41}, {1.76, 1.85}, {1.76,
3.2}, {1.76, 4.36}, {1.76, 8.41}, {1.85, 3.2}, {1.85,
4.36}, {1.85, 8.41}, {3.2, 4.36}, {3.20, 7.52}, {3.20,
8.41}, {4.36, 8.41}};
met = {{2.01, 8.42}, {2.15, 8.42}, {2.64, 4.25}, {2.64, 8.42}, {2.01,
2.15}, {2.01, 2.64}, {2.01, 4.25}, {4.25, 8.42}, {2.13, 2.13}};
phe = {{2.99, 8.23}, {3.22, 8.23}, {7.30, 7.34}, {2.99, 3.22}, {2.99,
4.66}, {3.22, 4.66}, {4.66, 8.23}, {7.3, 7.39}, {7.34, 7.39}};
pro = {{2.03, 4.44}, {2.02, 3.65}, {2.02, 3.68}, {2.28, 3.65}, {2.28,
3.68}, {3.65, 4.44}, {3.68, 4.44}, {2.03, 2.02}, {2.03,
2.28}, {2.03, 3.65}, {2.03, 3.68}, {2.02, 2.28}, {3.65,
3.68}, {2.02, 4.44}, {2.28, 4.44}};
ser = {{3.88, 8.38}, {3.88, 4.5}, {4.5, 8.38}};
thr = {{1.23, 4.22}, {1.23, 8.24}, {4.22, 8.24}};
trp = {{2.99, 8.09}, {3.22, 8.09}, {7.17, 7.50}, {7.24, 7.65}, {7.50,
7.65}, {2.99, 3.22}, {2.99, 4.66}, {3.22, 4.66}, {4.66,
8.09}, {7.17, 7.24}, {7.17, 7.65}, {7.24, 7.50}, {7.24, 10.22}};
tyr = {{2.29, 8.18}, {3.13, 8.18}, {2.92, 3.13}, {2.92, 4.60}, {3.13,
4.6}, {4.6, 8.18}, {6.86, 7.15}};
val = {{0.94, 0.97}, {0.94, 4.18}, {0.94, 8.44}, {0.97, 4.18}, {0.97,
8.44}, {2.13, 8.44}, {0.94, 2.13}, {0.97, 2.13}, {2.13,
4.18}, {4.18, 8.44}};
cal = {{0, 9.5}, {4.73, 0}, {4.73, 9.5}};
tocsyPlot[aaList_] :=
ListPlot[Flatten[{{#[[1]], #[[1]]}, #} & /@
Flatten[{#, Reverse[#]} & /@ Flatten[aaList, 1], 1], 1],
ScalingFunctions -> {"Reverse", "Reverse"}, AspectRatio -> 1,
GridLines -> Automatic, PlotRange -> {{0, 9.5}, {0, 9.5}},
ImageSize -> {800, 800}, PlotStyle -> PointSize[0.0075]]
tocsyImg =
SetAlphaChannel[
ImageResize[
Import["/home/akrotz/Documents/Ch007/akdg_tocsy.png"], {960,
1015}], 0.7];
ImageCompose[tocsyImg, tocsyPlot[{tyr, pro, gly, ala}], {525, 449}]
For one of my classes, Ch 007, my lab partner and I used solid phase synthesis techniques to make a pentapeptide incorporating four known peptides (one of which is non canonical) and an unknown mystery peptide in a known order. Solid phase techniques are generally known for their extremely high yields. Given that it was my first go at the technique I think I might have played a key role in obtaining a much lower than expected yield. Nevertheless, the product was purified by prep HPLC and the result was rather pure in the 1H NMR spectrum. We obtained a TOCSY 2D spectrum and are now tasked with interpreting the TOCSY spectrum as well as ESI-MS and MALDI-MS to verify the structure of the product.
To do this one has to use the correlation of peaks in 1D by looking at the off-diagonal peaks in the 2D spectrum which are indicative of through bond coupling. By doing so one can extrapolate the connectivity of the molecule. This is especially challenging because the long distance correlations are most indicative of successful amide bond formation but are challenging to clearly observe in the conventional NMR interpretation software MestReNova.
I found the expected COSY/TOCSY crosspeaks from http://www.bp.uni-bayreuth.de/NMR/nmr_alltocsy.html
and wrote them into mathematica as their three letter label. Note that these are for the unbound amino acid and so slight changes in the chemical shift and couplings are to be expected. Then by writing a simple function that extrapolates the other crosspeaks and the diagonal I can enter a list of amino acids into the tocsyPlot function and with some image processing rescale the spectrum to fit the plot to see if my amino acid guess was right. below is the image followed by the code. Obviously to reuse the code one would have to obtain their own tocsy spectrum and do the rescaling of the image to the plot on their own.
(Image updated on 06.22.2019)
Here the amino acid crosspeaks have been color coded, I had a legend but didnt end up including it in this image. It shouldnt be too hard to figure out what the oligopeptide is though. |
ala = {{1.39, 8.25}, {1.39, 4.35}, {4.35, 8.25}};
arg = {{1.70, 4.38}, {1.70, 7.17}, {1.70, 8.27}, {1.79, 3.32}, {1.79,
7.17}, {1.79, 8.27}, {1.89, 3.32}, {1.89, 7.17}, {1.89,
8.27}, {3.32, 4.38}, {3.32, 8.27}, {4.38, 7.17}, {7.17,
8.27}, {1.70, 1.79}, {1.70, 1.89}, {1.70, 3.32}, {1.79,
1.89}, {1.79, 4.38}, {1.89, 4.38}, {3.32, 7.17}, {4.38, 8.27}};
asp = {{2.75, 8.41}, {2.84, 8.41}, {2.75, 2.83}, {2.75, 4.75}, {2.83,
4.75}, {4.75, 8.41}};
cys = {{2.96, 8.31}, {3.28, 8.31}, {2.96, 3.28}, {2.96, 4.69}, {3.28,
4.69}, {4.69, 8.31}};
gln = {{2.01, 8.41}, {2.13, 8.41}, {2.38, 4.37}, {2.38, 8.41}, {2.01,
2.13}, {2.01, 2.38}, {2.01, 4.37}, {2.13, 2.38}, {2.13,
4.37}, {4.37, 8.41}, {6.87, 7.59}};
glu = {{1.97, 8.37}, {2.09, 8.37}, {2.28, 4.29}, {2.28, 8.37}, {2.31,
4.29}, {2.31, 8.37}, {1.97, 2.09}, {1.97, 2.28}, {1.97,
2.31}, {1.97, 4.29}, {2.09, 2.28}, {2.09, 2.31}, {2.09,
4.29}, {2.28, 2.31}, {4.29, 8.37}};
gly = {{3.97, 8.39}};
his = {{3.2, 8.41}, {3.26, 8.41}, {7.14, 8.12}, {3.2, 3.26}, {3.2,
4.63}, {3.26, 4.63}, {4.63, 8.41}};
ile = {{0.89, 0.95}, {0.89, 1.90}, {0.89, 4.23}, {0.89, 8.19}, {0.95,
1.19}, {0.95, 1.48}, {0.95, 4.23}, {0.95, 8.19}, {1.19,
4.23}, {1.19, 8.19}, {1.48, 4.23}, {1.48, 8.19}, {1.90,
8.19}, {0.89, 1.19}, {0.89, 1.48}, {0.95, 1.90}, {1.19,
1.48}, {1.19, 1.90}, {1.48, 1.90}, {1.90, 4.23}, {4.23, 8.19}};
leu = {{0.9, 0.94}, {0.90, 1.65}, {0.90, 4.38}, {0.90, 8.42}, {0.94,
1.65}, {0.94, 4.38}, {0.94, 8.42}, {1.64, 4.38}, {1.64,
8.42}, {1.65, 8.42}, {0.90, 1.64}, {0.94, 1.64}, {1.64,
1.65}, {1.65, 4.38}, {4.38, 8.42}};
lys = {{1.45, 1.70}, {1.45, 1.76}, {1.45, 1.85}, {1.45, 3.20}, {1.45,
4.36}, {1.45, 8.41}, {11.70, 1.76}, {1.70, 1.85}, {1.70,
3.20}, {1.70, 4.36}, {1.70, 8.41}, {1.76, 1.85}, {1.76,
3.2}, {1.76, 4.36}, {1.76, 8.41}, {1.85, 3.2}, {1.85,
4.36}, {1.85, 8.41}, {3.2, 4.36}, {3.20, 7.52}, {3.20,
8.41}, {4.36, 8.41}};
met = {{2.01, 8.42}, {2.15, 8.42}, {2.64, 4.25}, {2.64, 8.42}, {2.01,
2.15}, {2.01, 2.64}, {2.01, 4.25}, {4.25, 8.42}, {2.13, 2.13}};
phe = {{2.99, 8.23}, {3.22, 8.23}, {7.30, 7.34}, {2.99, 3.22}, {2.99,
4.66}, {3.22, 4.66}, {4.66, 8.23}, {7.3, 7.39}, {7.34, 7.39}};
pro = {{2.03, 4.44}, {2.02, 3.65}, {2.02, 3.68}, {2.28, 3.65}, {2.28,
3.68}, {3.65, 4.44}, {3.68, 4.44}, {2.03, 2.02}, {2.03,
2.28}, {2.03, 3.65}, {2.03, 3.68}, {2.02, 2.28}, {3.65,
3.68}, {2.02, 4.44}, {2.28, 4.44}};
ser = {{3.88, 8.38}, {3.88, 4.5}, {4.5, 8.38}};
thr = {{1.23, 4.22}, {1.23, 8.24}, {4.22, 8.24}};
trp = {{2.99, 8.09}, {3.22, 8.09}, {7.17, 7.50}, {7.24, 7.65}, {7.50,
7.65}, {2.99, 3.22}, {2.99, 4.66}, {3.22, 4.66}, {4.66,
8.09}, {7.17, 7.24}, {7.17, 7.65}, {7.24, 7.50}, {7.24, 10.22}};
tyr = {{2.29, 8.18}, {3.13, 8.18}, {2.92, 3.13}, {2.92, 4.60}, {3.13,
4.6}, {4.6, 8.18}, {6.86, 7.15}};
val = {{0.94, 0.97}, {0.94, 4.18}, {0.94, 8.44}, {0.97, 4.18}, {0.97,
8.44}, {2.13, 8.44}, {0.94, 2.13}, {0.97, 2.13}, {2.13,
4.18}, {4.18, 8.44}};
cal = {{0, 9.5}, {4.73, 0}, {4.73, 9.5}};
tocsyPlot[aaList_] :=
ListPlot[Flatten[{{#[[1]], #[[1]]}, #} & /@
Flatten[{#, Reverse[#]} & /@ Flatten[aaList, 1], 1], 1],
ScalingFunctions -> {"Reverse", "Reverse"}, AspectRatio -> 1,
GridLines -> Automatic, PlotRange -> {{0, 9.5}, {0, 9.5}},
ImageSize -> {800, 800}, PlotStyle -> PointSize[0.0075]]
tocsyImg =
SetAlphaChannel[
ImageResize[
Import["/home/akrotz/Documents/Ch007/akdg_tocsy.png"], {960,
1015}], 0.7];
ImageCompose[tocsyImg, tocsyPlot[{tyr, pro, gly, ala}], {525, 449}]
Comments
Post a Comment