From 66105fdfe1079c967f72f24c42765944d7c11463 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 15 Mar 2010 13:25:11 -0400 Subject: [PATCH] Completed cantilever data figure integration. --- tex/src/cantilever/methods.tex | 16 +- tex/src/figures/asy/wtk_graph.asy | 30 +- tex/src/figures/cantilever-data/Makefile | 22 +- tex/src/figures/cantilever-data/get_v_dep.sh | 6 - .../loading-rate.d/loading_rate_131.98 | 82 ------ .../loading-rate.d/loading_rate_24.33 | 274 ------------------ .../cantilever-data/make_v_dep_plots.sh | 61 ++++ tex/src/figures/cantilever-data/wtk_graph.asy | 1 + .../figures/cantilever-sim/loading-rate.asy | 4 +- 9 files changed, 115 insertions(+), 381 deletions(-) delete mode 100644 tex/src/figures/cantilever-data/loading-rate.d/loading_rate_131.98 delete mode 100644 tex/src/figures/cantilever-data/loading-rate.d/loading_rate_24.33 create mode 100755 tex/src/figures/cantilever-data/make_v_dep_plots.sh create mode 120000 tex/src/figures/cantilever-data/wtk_graph.asy diff --git a/tex/src/cantilever/methods.tex b/tex/src/cantilever/methods.tex index f2f811f..373f045 100644 --- a/tex/src/cantilever/methods.tex +++ b/tex/src/cantilever/methods.tex @@ -33,22 +33,28 @@ $20\U{pN/nm}$. Promising sawtooth curves were selected by eye and fit to WLCs\index{WLC} to identify I27 unfolding events. The results were sorted into two bins according to cantilever stiffness, and then averaged across each cantilever-stiffness/pulling-speed group to -produce \cref{fig:plot-splits}. +produce \cref{fig:cant:v-dep}. \begin{figure} - \includegraphics[width=4in]{figures/cantilever-data/plot_splits} - \caption{Plot splits.\label{fig:plot-splits}} + \asyfig{figures/cantilever-data/v-dep} + \caption{Pulling speed dependence of I27 for different cantilever + stiffnesses. The listed stiffnesses are averages across several + individual cantilevers and calibrations. Each box is the average + of some number of unfolding events, and the box area is + proportional to that number. There are $82$ unfolding events for + the stiff cantilevers and $274$ for the soft cantilevers.% + \label{fig:cant:v-dep}} \end{figure} Unfortunately, the data are not of high enough quality to extract the unfolding parameters $k$ or $\Delta x$. Note that the increase in mean unfolding force is not entirely due to the increased loading rate of the stiffer cantilever, because the difference is still present in -the loading rate dependence (\cref{fig:cantilever:loading-rate}). The +the loading rate dependence (\cref{fig:cant:load-dep}). The loading rates were extracted from the data by taking the slope of the fit WLC\index{WLC} at unfolding. \begin{figure} \asyfig{figures/cantilever-data/loading-rate} - \caption{Loading rate.\label{fig:cantilever:loading-rate}} + \caption{Loading rate.\label{fig:cant:load-dep}} \end{figure} diff --git a/tex/src/figures/asy/wtk_graph.asy b/tex/src/figures/asy/wtk_graph.asy index b77f905..80fccb7 100644 --- a/tex/src/figures/asy/wtk_graph.asy +++ b/tex/src/figures/asy/wtk_graph.asy @@ -13,9 +13,12 @@ Label sLabel(string s, align align=NoAlign, int extra_spaces=0) { void graphFile(picture pic=currentpicture, string file="datafile", real xscale=1, real yscale=1, pen p=red, - path mpath=scale(0.8mm)*unitcircle, string t="Title", + path mpath=scale(0.8mm)*unitcircle, + markroutine markroutine=marknodes, + string t="Title", bool dots=false) { pen pline=p; + marker mk = nomarker; file fin=input(file).line(); real[][] a=fin.dimension(0,0); a=transpose(a); @@ -23,11 +26,12 @@ void graphFile(picture pic=currentpicture, string file="datafile", real[] y=a[1]; if (dots == true) { pline = invisible; + mk = marker(mpath, markroutine, p); } if (t != "Title") { - draw(pic=pic, graph(pic,xscale*x,yscale*y), p=pline, legend=sLabel(t,extra_spaces=1), marker=marker(mpath, p)); + draw(pic=pic, graph(pic,xscale*x,yscale*y), p=pline, legend=sLabel(t,extra_spaces=1), marker=mk); } else { - draw(pic=pic, graph(pic,xscale*x,yscale*y), p=pline, marker=marker(mpath, p)); + draw(pic=pic, graph(pic,xscale*x,yscale*y), p=pline, marker=mk); } } @@ -44,3 +48,23 @@ m1 = scale(3mm)*shift(-.5,-.33)*m1; path m8=scale(2mm)*shift(-.5,-.5)*unitsquare; path m30=scale(1.5mm)*unitcircle; path mdot=scale(0.2pt)*unitcircle; + +markroutine marksize(string file="datafile", pen p=red, path mpath=scale(0.8mm)*unitcircle, real size=1) { + return new void(picture pic=currentpicture, frame f, path g) { + /* frame f is the marker we setup in graphFile(). We can't scale + that directly though, since the drawn line thickness would change. + Instead, we give marksize() the same p and mpath that graphFile() + got, so it can scale the path and stroke it with the unscaled pen. + */ + file fin=input(file).line(); + real[][] a=fin.dimension(0,0); + a=transpose(a); + real[] s=a[3]; + for (int i=0; i <= length(g); ++i) { + pair z = point(g, i); + frame f; + draw(f, scale(sqrt(s[i]/size))*mpath, p); + add(pic, f, z); + } + }; +} diff --git a/tex/src/figures/cantilever-data/Makefile b/tex/src/figures/cantilever-data/Makefile index 646a566..510347f 100644 --- a/tex/src/figures/cantilever-data/Makefile +++ b/tex/src/figures/cantilever-data/Makefile @@ -4,18 +4,19 @@ ASYPROCESS = ../asy/asyprocess \ -- FIGS = v-dep loading-rate -DATA = v-dep.d/v_dep_131.98.dat \ +V_DEP_DATA = v-dep.d/v_dep_131.98.dat \ v-dep.d/v_dep_131.98.fit \ v-dep.d/v_dep_24.33.dat \ - v-dep.d/v_dep_24.33.fit \ - loading-rate.d/loading_rate_131.98 \ + v-dep.d/v_dep_24.33.fit +LOADING_RATE_DATA = loading-rate.d/loading_rate_131.98 \ loading-rate.d/loading_rate_24.33 +DATA = $(V_DEP_DATA) $(LOADING_RATE_DATA) DATA_DIRS = data v-dep.d loading-rate.d all : $(FIGS:%=%_.tex) clean : - rm -f $(FIGS:%=%_*) $(FIGS:%=%-*) *.pyc + rm -f $(FIGS:%=%_*) $(FIGS:%=%-*) v-dep.asy v-dep.gp *.pyc #rm -rf $(DATA_DIRS) %_.tex : %.asy $(DATA) @@ -24,20 +25,23 @@ clean : $(DATA_DIRS) : mkdir $@ -data/raw : extract_f_v_k_data.sh $(DATA_DIRS) - ./$< > $@ +#data/raw : extract_f_v_k_data.sh $(DATA_DIRS) +# ./$< > $@ data/spring-constants data/averaged-data : avg_data.py data/raw python $< -v-dep.asy v-dep.gp v-dep.d/v_dep_%.dat : \ - make_plots.sh data/spring-constants data/averaged-data +v-dep.d/v_dep_%.dat : \ + get_v_dep.sh data/spring-constants data/averaged-data ./$< v-dep.d/v_dep_%.fit : fit_data.py v-dep.d/v_dep_%.dat python $^ > $@ -v-dep.pdf : v-dep.gp v-dep.d/v_dep_* +v-dep.asy v-dep.gp : make_v_dep_plots.sh $(V_DEP_DATA) + ./$< + +v-dep.pdf : v-dep.gp $(V_DEP_DATA) gnuplot $< v-dep.eps : v-dep.pdf diff --git a/tex/src/figures/cantilever-data/get_v_dep.sh b/tex/src/figures/cantilever-data/get_v_dep.sh index bf6385d..91e8924 100755 --- a/tex/src/figures/cantilever-data/get_v_dep.sh +++ b/tex/src/figures/cantilever-data/get_v_dep.sh @@ -2,10 +2,7 @@ KFILE='./data/spring-constants' AVGFILE='./data/averaged-data' -ASYSPLIT='./v-dep.asy' -GPSPLIT='./v-dep.gp' -PLOTS="" while read LINE do Kprecise=`echo "$LINE" | sed 's/.*= \([0-9.]*\) +.*/\1/'` @@ -14,10 +11,7 @@ do echo "clearing $FILE" > "$FILE.dat" rm -f "$FILE.fit" - PLOTS="$PLOTS, '$FILE.dat' using 1:2:(sqrt(\$4)) with points pt 6 pointsize variable t '$K (pN/nm)'" - PLOTS="$PLOTS, '$FILE.fit' using 1:2 with lines notitle" done < <(tac "$KFILE") -PLOTS="${PLOTS:2}" # remove leading ' ,' while read DATA do diff --git a/tex/src/figures/cantilever-data/loading-rate.d/loading_rate_131.98 b/tex/src/figures/cantilever-data/loading-rate.d/loading_rate_131.98 deleted file mode 100644 index 98c638b..0000000 --- a/tex/src/figures/cantilever-data/loading-rate.d/loading_rate_131.98 +++ /dev/null @@ -1,82 +0,0 @@ -1.338 107.3 -1.565 140.8 -332.1 329.2 -109.92 230.2 -165.6 323.9 -247.83 391.1 -36.518 179.3 -54.9883 269.9 -47.3663 273.9 -42.0267 264.3 -35.081 259.6 -56.6138 279.9 -39.7415 317 -15.1975 246.8 -15.4771 278.5 -15.3074 216.9 -8.24467 217 -9.5142 256.3 -367.575 348.6 -182.026 325.3 -109.61 295.8 -11.75 271.2 -7.565 273.2 -3.825 215.8 -178.461 321.9 -107.815 302.7 -248.651 319.5 -110.104 378.4 -82.5727 258 -55.7042 276.8 -69.1621 366.8 -46.1427 338.7 -217.6 316.9 -230.8 386 -94.88 284.8 -61.9461 326.7 -49.2637 347.7 -30.8974 247.4 -65.19 444 -32.897 247.8 -45.9736 388.7 -59.6136 505.5 -13.6803 355 -10.9925 342.6 -10.0444 336.5 -8.47166 190.9 -11.28 315.9 -14.0736 357.2 -20.5828 500.8 -101.741 377.5 -73.9691 396 -9.31544 259.9 -12.3903 357.7 -14.4225 410.8 -11.5782 410.4 -35.1063 252.7 -25.7327 282.3 -5.993 269.3 -57.1228 202.3 -70.0795 314.4 -52.5927 303.4 -55.515 339 -62.2298 397.2 -57.7281 402.9 -48.299 397.9 -36.2503 380.4 -35.6355 396.3 -29.8571 374.6 -36.5718 443.3 -146.59 343.5 -146.212 400.8 -294.6 387.4 -255.6 393.2 -227.6 304.9 -224.4 397.7 -45.9736 248.1 -39.167 313.3 -76.624 373.6 -117.934 449.6 -49.519 346.7 -40.4399 332.2 -43.8257 396.2 diff --git a/tex/src/figures/cantilever-data/loading-rate.d/loading_rate_24.33 b/tex/src/figures/cantilever-data/loading-rate.d/loading_rate_24.33 deleted file mode 100644 index 572c2b5..0000000 --- a/tex/src/figures/cantilever-data/loading-rate.d/loading_rate_24.33 +++ /dev/null @@ -1,274 +0,0 @@ -34.7853 231.2 -28.9221 232.8 -31.2565 249.9 -139.467 271 -109.651 264.6 -144.445 246.3 -180.185 256.2 -361.617 215.3 -222.571 246.7 -153.55 234.3 -168.992 250.6 -162.258 268.8 -153.291 279.3 -57.1724 186.1 -149.829 229.3 -51.8646 193 -121.807 243.6 -67.6845 193.9 -12.581 199 -17.8712 253.4 -10.4774 228.6 -12.4557 283.4 -318.404 208.1 -190.477 255.8 -6.0015 173 -6.74572 171.5 -241.836 267.4 -60.7929 174.6 -101.058 283.3 -225.126 221.9 -128.032 200.2 -6.09452 129.2 -4.63947 151.9 -1.87368 100.2 -541.616 221.2 -392.696 258.1 -123.863 209.4 -88.0571 181.6 -154.779 199.1 -67.8731 165.4 -123.484 214.2 -6.10522 187 -111.074 181.9 -65.4039 150.3 -44.6793 178.1 -29.0171 195.4 -25.6648 179 -9.425 221.8 -2566.5 315.1 -698.5 311.1 -266.35 248.1 -242.95 225.7 -254 249.4 -183.832 174.1 -84.789 186 -130.296 237.7 -130.82 272.1 -62.6328 223.3 -65.0224 240.8 -239.17 215.4 -8.40114 169.2 -426.146 224.5 -293.5 210.6 -235.2 242.9 -58.8245 219.9 -27.3032 208.4 -11.8766 219.2 -7.71178 202.1 -139.834 197.5 -155.911 217.1 -87.8494 199.4 -52.6342 227.8 -56.8893 264.2 -691.5 228.2 -10.8421 177.9 -7.97246 194.6 -4.96078 197.2 -5.58474 222.7 -3.5507 203.5 -6.584 184.4 -2.92828 205.3 -2.79546 228 -109.618 194.1 -128.589 216.4 -170.967 264.8 -296.55 178.9 -295.55 234.7 -79.4103 206.7 -86.4271 204.8 -12.7162 176.1 -3.90479 108.5 -8.95931 213.2 -4.618 162.1 -8.41784 233.3 -33.1431 206.1 -23.8574 220 -13.9742 181.6 -13.4052 206.2 -17.8148 206.6 -28.2662 219.7 -14.7366 208.7 -16.4421 267.4 -65.2442 177.6 -79.7593 236.3 -305.643 374.5 -119.529 256 -147.529 287.4 -130.292 221.7 -103.962 236.1 -97.8843 273 -85.2586 244.1 -55.411 283.7 -185.46 321 -71.6683 250 -12.5468 225.5 -5.98895 169.1 -7.68286 221 -8.2052 284.7 -14.2174 230.7 -19.4 226.3 -8.418 221.2 -6.458 213.7 -5.068 235.7 -3.153 220.8 -3.118 236.4 -280.602 289.4 -108.477 270.7 -82.9888 274 -205.003 414.4 -197.282 238 -150.657 295 -15.1 198.4 -9.036 207.7 -4.502 212.1 -2.738 181.8 -3.672 250.7 -178.93 224.4 -56.0359 217.4 -83.0476 210.9 -108.315 282.4 -47.0469 268.7 -33.0893 264.6 -153.439 310.6 -92.931 327.6 -83.5395 412.5 -119.048 228.9 -57.0645 233.7 -199.268 242.1 -74.4677 234.9 -90.8007 307.3 -42.7389 168 -24.4887 193.7 -18.6563 253.6 -58.5149 234.6 -29.7544 265.5 -116.894 203.9 -147.063 262.8 -58.2009 235.1 -60.6315 302.9 -40.8088 253.2 -32.2687 258.7 -111.881 204.2 -71.9899 259.5 -55.2881 268 -45.6699 255.2 -42.1422 291.1 -17.5799 239.1 -13.7585 252.7 -13.7924 303.5 -54.7112 212.5 -35.6734 230.8 -28.4006 200.4 -25.1756 217.7 -30.2637 263.9 -26.2443 244.5 -29.2045 277.2 -13.8646 203.9 -15.5764 233.2 -19.0189 275.6 -98.9684 194.3 -63.1913 247.7 -41.1392 258.5 -33.8809 260.7 -34.3192 331 -13.5026 231.5 -9.74262 231.6 -10.0387 255.3 -6.97865 243.3 -253.364 227 -110.652 259.4 -62.4379 255.2 -1154.4 257.3 -369 246.8 -332.4 298.4 -12.8306 193.7 -13.5327 243.1 -6.90051 180 -5.8898 177.6 -7.81729 222.7 -8.20637 241.5 -6.29677 222.7 -8.44339 261.9 -8.13482 288.3 -55.6781 262.8 -48.5227 271.9 -18.356 232 -9.235 195.4 -15.22 235.5 -27.1956 196 -12.5298 195.3 -9.04264 199.3 -6.31462 202.1 -129.692 187.7 -31.8506 164.7 -9.703 213.1 -6.617 217.2 -4.691 230.8 -3.34 212.5 -264.619 258 -146.117 273.1 -46.4186 212.5 -29.8602 267.5 -118.029 270.5 -103.37 277 -63.0904 263.6 -1.764 116.7 -4.17 223.7 -2.992 225.4 -2.322 204.6 -2.555 236.2 -149.012 272.5 -42.0068 293.8 -402.8 206.4 -257.4 266.6 -171.62 287.1 -101.3 238.2 -3.66463 118.5 -1.86042 93.12 -2.5531 129.7 -2.02587 123.5 -2.12404 141.1 -32.4106 146.3 -24.0218 167.6 -17.2125 157.2 -16.0114 173.1 -18.9527 150.1 -16.6167 166 -13.4201 159.6 -10.0249 143.4 -156.58 215.8 -58.26 184.2 -64.5847 150.6 -44.7525 174.1 -20.8252 161.7 -16.2478 159.5 -14.5346 274.7 -9.52903 264.2 -4.16181 153.6 -8.0762 263.3 -5.88321 255.7 -5.30377 246.6 -5.94243 292.4 -6.2829 289.4 -20.864 230.8 -19.0898 256 -10.3707 207.5 -7.34662 215.8 -6.23003 225.7 -7.82243 298.8 -8.23481 324.5 -248.163 201.5 -134.579 262.9 -627.121 237.2 -259.133 299.1 diff --git a/tex/src/figures/cantilever-data/make_v_dep_plots.sh b/tex/src/figures/cantilever-data/make_v_dep_plots.sh new file mode 100755 index 0000000..1fa8087 --- /dev/null +++ b/tex/src/figures/cantilever-data/make_v_dep_plots.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +KFILE='./data/spring-constants' +AVGFILE='./data/averaged-data' +ASYFILE='./v-dep.asy' +GPFILE='./v-dep.gp' + +ASYPLOTS="" +GPPLOTS="" +while read LINE +do + Kprecise=`echo "$LINE" | sed 's/.*= \([0-9.]*\) +.*/\1/'` + K=`python -c "print '%.2f' % $Kprecise"` + FILE="v-dep.d/v_dep_$K" + Kindex=`echo "$LINE" | sed 's/K(\([0-9.]*\)) =.*/\1/'` + case "$Kindex" in + 0) + PEN="psoft" + ;; + 1) + PEN="pmed" + ;; + 2) + PEN="phard" + ;; + esac + ASYPLOTS=$(echo -e "$ASYPLOTS\ngraphFile(\"$FILE.dat\", xscale, yscale, $PEN, m8, + markroutine=marksize(\"$FILE.dat\", $PEN, m8, 10), t=units(\"$K\",\"pN/nm\"), dots=true);") + ASYPLOTS=$(echo -e "$ASYPLOTS\ngraphFile(\"$FILE.fit\", xscale, yscale, $PEN, + t=units(\"$K\",\"pN/nm\"));") + GPPLOTS="$GPPLOTS, '$FILE.dat' using 1:2:(sqrt(\$4)) with points pt 6 pointsize variable t '$K (pN/nm)'" + GPPLOTS="$GPPLOTS, '$FILE.fit' using 1:2 with lines notitle" +done < <(tac "$KFILE") +GPPLOTS="${GPPLOTS:2}" # remove leading ' ,' + +cat > "$ASYFILE" < "$GPFILE" <