-
Notifications
You must be signed in to change notification settings - Fork 2
/
gtf.sublime-syntax
138 lines (128 loc) · 2.92 KB
/
gtf.sublime-syntax
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
%YAML 1.2
---
# Flagstat syntax highlighting file
# Maintainer: bioSyntax.org
# Version: v0.1
name: gtf
file_extensions: [gtf]
scope: source.gtf
# Specification: http://mblab.wustl.edu/GTF22.html
contexts:
main:
- match: '^[\S]*\t'
scope: chr.gtf
push: source
source:
- match: '[\S]*'
scope: variable.parameter.gtf
- match: \t
push: feature
- match: $
pop: true
feature:
- match: 'exon'
scope: exonLevel.gtf
- match: 'transcript'
scope: transcriptLevel.gtf
- match: 'CDS'
scope: cds.gtf
- match: 'start_codon'
scope: start_codon.gtf
- match: 'stop_codon'
scope: stop_codon.gtf
- match: \t
push: start
- match: $
pop: true
start:
- match: ([0-9|\.](?=\d{2}\t))
scope: chrStart2.bed
- match: ([0-9|\.](?=\d{5}\t))
scope: chrStart2.bed
- match: ([0-9|\.](?=\d{8}\t))
scope: chrStart2.bed
- match: ([0-9|\.])
scope: chrStart.bed
- match: \t
push: end
- match: $
pop: true
end:
- match: ([0-9|\.](?=\d{2}\t))
scope: chrStart2.bed
- match: ([0-9|\.](?=\d{5}\t))
scope: chrStart2.bed
- match: ([0-9|\.](?=\d{8}\t))
scope: chrStart2.bed
- match: ([0-9|\.])
scope: chrEnd.bed
- match: \t
push: score
- match: $
pop: true
score:
- match: \.\b
scope: comment.gtf
- match: ([1-9])\b
scope: grad1.gtf
- match: ([1-9][0-9])\b
scope: grad1.gtf
- match: 1[0-9][0-9]\b
scope: grad2.gtf
- match: 2[0-9][0-9]\b
scope: grad3.gtf
- match: 3[0-9][0-9]\b
scope: grad4.gtf
- match: 4[0-9][0-9]\b
scope: grad5.gtf
- match: 5[0-9][0-9]\b
scope: grad6.gtf
- match: 6[0-9][0-9]\b
scope: grad7.gtf
- match: 7[0-9][0-9]\b
scope: grad8.gtf
- match: 8[0-9][0-9]\b
scope: grad9.gtf
- match: 9[0-9][0-9]\b
scope: grad10.gtf
- match: ([0-9][0-9][0-9][0-9])\b
scope: grad10.gtf
- match: \t
push: strand
- match: $
pop: true
strand:
- match: \+
scope: strandPlus.gtf
- match: \-
scope: strandMinus.gtf
- match: \.
scope: strandNone.gtf
- match: \t
push: frame
- match: $
pop: true
frame:
- match: ([0-2])\b
scope: numeric.gtf
- match: \.
scope: comment.gtf
- match: \t
push: attribute
- match: $
pop: true
attribute:
- match: \b[^\s;]+(?=\s"[\w|\W|\_|\.]*")
scope: gradbw5.attributeName.gtf
- match: (?="[\w|\d|\.]+";)"[\d|\.]+"
scope: numeric.attributeNumbers.gtf
- match: (?="[\w|\d|\.|\-|\_|\:]+";)"[\w|\d|\.|\-|\_|\:]+"
scope: grad4.attributeString.gtf
- match: \b[^\s;]+(?=\s[\w|\W|\_|\.])
scope: gradbw5.attributeName.gtf
- match: (?=\d+;)\d+
scope: numeric.attributeNumbers.gtf
- match: \t
push: attribute
- match: $
pop: true