-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathranges.tex
More file actions
83 lines (74 loc) · 2.18 KB
/
ranges.tex
File metadata and controls
83 lines (74 loc) · 2.18 KB
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
% !TEX TS-program = arara
% arara: xelatex: { shell: yes }
% arara: indent: { overwrite: yes }
% arara: clean: {extensions: [aux, bak, bbl, bcf, blg, idx, ilg, ind, ist, log, nlo, nls, out, run.xml, synctex.gz,]}
\documentclass[
convert,
outext=.png,
border=2bp,
tikz,
]{standalone}
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\setmainfont[BoldFont={Fira Sans}]{Fira Sans Light}
\setmonofont{Fira Mono}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\usetikzlibrary{shapes.misc}
\usetikzlibrary{graphs}
\usepackage{color}
\begin{document}
\tikzset{
>=stealth', black!50, text=black, thick,
every new ->/.style = {thick, shorten <=0pt, shorten >=1pt, color=black!70},
every new --/.style = {thick, color=black!70},
graphs/every graph/.style = {edges=rounded corners},
skip loop/.style = {to path={-- ++(0,#1) -| (\tikztotarget)}},
hv path/.style = {to path={-| (\tikztotarget)}},
vh path/.style = {to path={|- (\tikztotarget)}},
nonterminal/.style={
rectangle, minimum size=6mm, very thick, draw=red!50!black!50,
top color=white, bottom color=red!50!black!20,
font=\itshape, text height=1.5ex,text depth=.25ex},
terminal/.style={
rounded rectangle, minimum size=6mm, very thick, draw=black!50,
top color=white, bottom color=black!20,
font=\ttfamily, text height=1.5ex, text depth=.25ex},
shape = coordinate
}
%species.chromosome(strand):start-end
%--------^^^^^^^^^^--------^^^^^^----
\begin{tikzpicture}
\graph[
grow right sep,
branch down=7mm,
simple,
]{
/ --
p1 ->
species [nonterminal] ->
"." [terminal] --
p2 ->
chromosome [nonterminal] --
p4 ->
"(" [terminal] --
q1 -> [vh path]
{[nodes={yshift=3.5mm}]
strand_positive[as={+}, terminal], strand_negative[as={-}, terminal]
} -- [hv path]
q3 ->
")" [terminal] --
p5 ->
":" [terminal] ->
start [nonterminal] --
p6 ->
"-" [terminal] ->
end [nonterminal] --
p7 --
/ [coordinate];
p1 -- [skip loop=5mm] p2;
p4 -- [skip loop=9mm] p5;
p6 -- [skip loop=5mm] p7;
};
\end{tikzpicture}
\end{document}