Debian Codegraph @

sublime/gtf.sublime-syntax

raw
1 %YAML 1.2
2 ---
3 # Flagstat syntax highlighting file
4 # Maintainer: bioSyntax.org
5 # Version: v0.1
6 name: gtf
7 file_extensions: [gtf]
8 scope: source.gtf
9 # Specification: http://mblab.wustl.edu/GTF22.html
10
11 contexts:
12 main:
13 - match: '^[\S]*\t'
14 scope: chr.gtf
15 push: source
16
17 source:
18 - match: '[\S]*'
19 scope: variable.parameter.gtf
20 - match: \t
21 push: feature
22 - match: $
23 pop: true
24
25 feature:
26 - match: 'exon'
27 scope: exonLevel.gtf
28 - match: 'transcript'
29 scope: transcriptLevel.gtf
30 - match: 'CDS'
31 scope: cds.gtf
32 - match: 'start_codon'
33 scope: start_codon.gtf
34 - match: 'stop_codon'
35 scope: stop_codon.gtf
36 - match: \t
37 push: start
38 - match: $
39 pop: true
40
41 start:
42 - match: ([0-9|\.](?=\d{2}\t))
43 scope: chrStart2.bed
44 - match: ([0-9|\.](?=\d{5}\t))
45 scope: chrStart2.bed
46 - match: ([0-9|\.](?=\d{8}\t))
47 scope: chrStart2.bed
48 - match: ([0-9|\.])
49 scope: chrStart.bed
50 - match: \t
51 push: end
52 - match: $
53 pop: true
54
55 end:
56 - match: ([0-9|\.](?=\d{2}\t))
57 scope: chrStart2.bed
58 - match: ([0-9|\.](?=\d{5}\t))
59 scope: chrStart2.bed
60 - match: ([0-9|\.](?=\d{8}\t))
61 scope: chrStart2.bed
62 - match: ([0-9|\.])
63 scope: chrEnd.bed
64 - match: \t
65 push: score
66 - match: $
67 pop: true
68
69 score:
70 - match: \.\b
71 scope: comment.gtf
72 - match: ([1-9])\b
73 scope: grad1.gtf
74 - match: ([1-9][0-9])\b
75 scope: grad1.gtf
76 - match: 1[0-9][0-9]\b
77 scope: grad2.gtf
78 - match: 2[0-9][0-9]\b
79 scope: grad3.gtf
80 - match: 3[0-9][0-9]\b
81 scope: grad4.gtf
82 - match: 4[0-9][0-9]\b
83 scope: grad5.gtf
84 - match: 5[0-9][0-9]\b
85 scope: grad6.gtf
86 - match: 6[0-9][0-9]\b
87 scope: grad7.gtf
88 - match: 7[0-9][0-9]\b
89 scope: grad8.gtf
90 - match: 8[0-9][0-9]\b
91 scope: grad9.gtf
92 - match: 9[0-9][0-9]\b
93 scope: grad10.gtf
94 - match: ([0-9][0-9][0-9][0-9])\b
95 scope: grad10.gtf
96 - match: \t
97 push: strand
98 - match: $
99 pop: true
100
101 strand:
102 - match: \+
103 scope: strandPlus.gtf
104 - match: \-
105 scope: strandMinus.gtf
106 - match: \.
107 scope: strandNone.gtf
108 - match: \t
109 push: frame
110 - match: $
111 pop: true
112
113 frame:
114 - match: ([0-2])\b
115 scope: numeric.gtf
116 - match: \.
117 scope: comment.gtf
118 - match: \t
119 push: attribute
120 - match: $
121 pop: true
122
123 attribute:
124 - match: \b[^\s;]+(?=\s"[\w|\W|\_|\.]*")
125 scope: gradbw5.attributeName.gtf
126 - match: (?="[\w|\d|\.]+";)"[\d|\.]+"
127 scope: numeric.attributeNumbers.gtf
128 - match: (?="[\w|\d|\.|\-|\_|\:]+";)"[\w|\d|\.|\-|\_|\:]+"
129 scope: grad4.attributeString.gtf
130 - match: \b[^\s;]+(?=\s[\w|\W|\_|\.])
131 scope: gradbw5.attributeName.gtf
132 - match: (?=\d+;)\d+
133 scope: numeric.attributeNumbers.gtf
134 - match: \t
135 push: attribute
136 - match: $
137 pop: true
138