-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.tex
158 lines (147 loc) · 8.31 KB
/
example.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
\documentclass{article}
\usepackage{helvet}
% \renewcommand*\familydefault{\sfdefault}
\usepackage{mathastext}
\usepackage{isomath}
\usepackage{sansmath}
% \renewcommand*\familydefault{\rmdefault} %
\newcommand{\mycap}{\raisebox{0pt}{\tikz[remember picture]{\node[inner sep=0, outer sep=0] (n1) {hollow};}}}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17}
\usepackage{tikz}
\usetikzlibrary{decorations.markings,shapes.arrows,shapes.geometric,arrows.meta,shapes.dna,dna}
\definecolor{color A}{rgb}{1.00, 0.75, 0.17}
\definecolor{color B}{rgb}{0.38, 0.82, 0.32}
\definecolor{color C}{rgb}{0.38, 0.65, 0.87}
\definecolor{color D}{rgb}{0.95, 0.30, 0.25}
\begin{document}
\sansmath
% pic
\tikzset{
g label/.style={label={[white]center:\footnotesize\it {#1}}},
p label/.style={label={[anchor=base, yshift=-8pt]below:\scriptsize {#1}}},
circuit/.pic={
\draw [
postaction={decorate},
decoration={
markings,
mark=at position 2mm with {\node [promoter, black!\pgfkeysvalueof{/tikz/p11 tint}, p label=\pgfkeysvalueof{/tikz/p1 label}] (-p11) {};},
mark=at position 5mm with {\node [promoter, black!\pgfkeysvalueof{/tikz/p12 tint}, p label=\pgfkeysvalueof{/tikz/p2 label}] (-p12) {};},
mark=at position 7mm with {\node [ribosome binding site] (-r1) {};},
mark=at position 9mm with {\node [coding sequence, color A, fill=\pgfkeysvalueof{/tikz/A fill}, g label=\pgfkeysvalueof{/tikz/A label}] (-gA) {};},
mark=at position 16mm with {\node [terminator] (-t1) {};},
mark=at position 18mm with {\node [promoter, black!\pgfkeysvalueof{/tikz/p21 tint}, p label=\pgfkeysvalueof{/tikz/p2 label}] (-p21) {};},
mark=at position 21mm with {\node [promoter, color A!\pgfkeysvalueof{/tikz/p22 tint}] (-p22) {};},
mark=at position 23mm with {\node [ribosome binding site] (-r2) {};},
mark=at position 25mm with {\node [coding sequence, color B, fill=\pgfkeysvalueof{/tikz/B fill}, g label=\pgfkeysvalueof{/tikz/B label}] (-gB) {};},
mark=at position 32mm with {\node [terminator] (-t2) {};},
mark=at position 34mm with {\node [promoter, black!\pgfkeysvalueof{/tikz/p31 tint}, p label=\pgfkeysvalueof{/tikz/p1 label}] (-p31) {};},
mark=at position 37mm with {\node [promoter, color A!\pgfkeysvalueof{/tikz/p32 tint}] (-p32) {};},
mark=at position 39mm with {\node [ribosome binding site] (-r3) {};},
mark=at position 41mm with {\node [coding sequence, color C, fill=\pgfkeysvalueof{/tikz/C fill}, g label=\pgfkeysvalueof{/tikz/C label}] (-gC) {};},
mark=at position 48mm with {\node [terminator] (-t3) {};},
mark=at position 50mm with {\node [promoter, color B!\pgfkeysvalueof{/tikz/p41 tint}] (-p41) {};},
mark=at position 53mm with {\node [promoter, color C!\pgfkeysvalueof{/tikz/p42 tint}] (-p42) {};},
mark=at position 55mm with {\node [ribosome binding site] (-r4) {};},
mark=at position 57mm with {\node [coding sequence, color D, fill=\pgfkeysvalueof{/tikz/D fill}, g label=\pgfkeysvalueof{/tikz/D label}] (-gD) {};},
mark=at position 64mm with {\node [terminator] (-t4) {};},
mark=at position 66mm with {\node [promoter, color D!\pgfkeysvalueof{/tikz/p5 tint}] (-p5) {};},
mark=at position 68mm with {\node [ribosome binding site] (-r5) {};},
mark=at position 70mm with {\node [coding sequence, black, fill=\pgfkeysvalueof{/tikz/O fill}, g label=\pgfkeysvalueof{/tikz/O label}] (-gO) {};},
mark=at position 77mm with {\node [terminator] (-t5) {};},
}
] (0,0) -- ++(79mm,0);
},
A fill/.initial={color A},
A label/.initial={A},
B fill/.initial={color B},
B label/.initial={B},
C fill/.initial={color C},
C label/.initial={C},
D fill/.initial={color D},
D label/.initial={D},
O fill/.initial={black},
O label/.initial={Out},
p11 tint/.initial=100,
p12 tint/.initial=100,
p21 tint/.initial=100,
p22 tint/.initial=100,
p31 tint/.initial=100,
p32 tint/.initial=100,
p41 tint/.initial=100,
p42 tint/.initial=100,
p5 tint/.initial=100,
p1 label/.initial=,
p2 label/.initial=,
}
\def\ot{40}
\begin{figure}[h]
\centering
\begin{tikzpicture}[
font=\sf,
remember picture,
line width=1pt,
repression/.style={->, >=Bar, shorten <=2pt},
plot/.style={draw=black, line width=1pt},
]
\renewcommand*\familydefault{\sfdefault}
\begin{semilogxaxis}[
font=\sf,
axis lines*=left,
axis line style={line width=1pt},
font={\small},
log origin=infty,
width=4cm,
height=7.5cm,
xmin=0.001,
xmax=2.5,
xtick={0.001,0.01,0.1,1},
xticklabels={\empty, $10^{-2}$, $10^{-1}$, $10^{0}$},
xlabel style={font=\sf},
ylabel style={font=\sf},
ytick={4,...,1},
yticklabels={-/-,+/-,-/+,+/+},
yticklabel style={font=\tt},
enlarge y limits=0.2,
xlabel={Output (RPU)},
ylabel={Input}
]
\addplot [xbar, plot, fill=black] coordinates {(0.6, 1) (0.6, 4)};
\addplot [xbar, plot] coordinates {(0.0025, 2) (0.004, 3)};
\coordinate (A) at (axis cs:1,4);
\coordinate (B) at (axis cs:1,3);
\coordinate (C) at (axis cs:1,2);
\coordinate (D) at (axis cs:1,1);
\end{semilogxaxis}
\pic [at={([yshift=-1mm]A)}, A fill=white, A label=, p11 tint=\ot, p12 tint=\ot, p21 tint=\ot, p31 tint=\ot, p41 tint=\ot, p42 tint=\ot] (A) {circuit};
\pic [at={([yshift=-1mm]B)}, B fill=white, B label=, O fill=white, O label=, p12 tint=\ot, p21 tint=\ot, p22 tint=\ot, p32 tint=\ot, p42 tint=\ot, p5 tint=\ot, p1 label={p1}] (B) {circuit};
\pic [at={([yshift=-1mm]C)}, C fill=white, C label=, O fill=white, O label=, p11 tint=\ot, p22 tint=\ot, p31 tint=\ot, p32 tint=\ot, p41 tint=\ot, p5 tint=\ot, p2 label={p2}] (C) {circuit};
\pic [at={([yshift=-1mm]D)}, D fill=white, D label=, p22 tint=\ot, p32 tint=\ot, p41 tint=\ot, p42 tint=\ot, p1 label={p1}, p2 label={p2}] (D) {circuit};
% A
\draw [repression, color B] (A-gB.north) -- ++(0,12pt) -| (A-p41.crown);
\draw [repression, color C] (A-gC.north) -- ++(0,9pt) -| (A-p42.crown);
% B
\draw [repression, color A] (B-gA.north) -- ++(0,9pt) coordinate (B-gA r1) -| (B-p32.crown);
\draw [repression, color A, shorten <=0pt] (B-gA r1 -| B-p22.crown) -- (B-p22.crown);
\draw [repression, color C] (B-gC.north) -- ++(0,9pt) -| (B-p42.crown);
\draw [repression, color D] (B-gD.north) -- ++(0,9pt) -| (B-p5.crown);
% C
\draw [repression, color A] (C-gA.north) -- ++(0,9pt) coordinate (C-gA r1) -| (C-p32.crown);
\draw [repression, color A, shorten <=0pt] (C-gA r1 -| C-p22.crown) -- (C-p22.crown);
\draw [repression, color B] (C-gB.north) -- ++(0,12pt) -| (C-p41.crown);
\draw [repression, color D] (C-gD.north) -- ++(0,9pt) -| (C-p5.crown);
% D
\draw [repression, color A] (D-gA.north) -- ++(0,9pt) coordinate (D-gA r1) -| (D-p32.crown);
\draw [repression, color A, shorten <=0pt] (D-gA r1 -| D-p22.crown) -- (D-p22.crown);
\draw [repression, color B] (D-gB.north) -- ++(0,12pt) -| (D-p41.crown);
\draw [repression, color C] (D-gC.north) -- ++(0,9pt) -| (D-p42.crown);
\begin{tikzdna}
\addfeature [foo] {};
\end{tikzdna}
\end{tikzpicture}
\caption{This is an example plot of an \textsf{XNOR} genetic circuit. The {\protect\mycap} genes are repressed.}
\label{fig:fig}
\tikz[remember picture, overlay] \draw[->, very thick, shorten >=2pt, shorten <=2pt] (n1) to[out=90, in=-90] (D-gD);
\end{figure}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Erat pellentesque adipiscing commodo elit. Amet nisl suscipit adipiscing bibendum est ultricies integer quis auctor. Sed blandit libero volutpat sed cras. Risus feugiat in ante metus dictum. Tellus in hac habitasse platea dictumst vestibulum. Nullam non nisi est sit amet facilisis. Sagittis purus sit amet volutpat. Vestibulum morbi blandit cursus risus. Ac orci phasellus egestas tellus rutrum tellus. A iaculis at erat pellentesque adipiscing commodo elit at imperdiet. Odio ut sem nulla pharetra diam sit. Diam quis enim lobortis scelerisque. Sit amet consectetur adipiscing elit pellentesque habitant morbi tristique. Elementum tempus egestas sed sed. Etiam dignissim diam quis enim lobortis scelerisque. Pellentesque diam volutpat commodo sed egestas. At lectus urna duis convallis convallis tellus id. Pretium vulputate sapien nec sagittis aliquam malesuada bibendum arcu.
\end{document}