| 1 |
%YAML 1.2 |
| 2 |
--- |
| 3 |
# Bed syntax highlighting file |
| 4 |
# Maintainer: bioSyntax.org |
| 5 |
# Version: v0.1 |
| 6 |
name: bed |
| 7 |
file_extensions: [bed] |
| 8 |
scope: source.bed |
| 9 |
|
| 10 |
|
| 11 |
contexts: |
| 12 |
main: |
| 13 |
#Handle UCSC track line |
| 14 |
- match: '^track.*' |
| 15 |
scope: comment.bed |
| 16 |
|
| 17 |
# Column 1: Reference Sequence Name |
| 18 |
- match: '^[\S]*\t' |
| 19 |
scope: chr.bed |
| 20 |
push: start |
| 21 |
|
| 22 |
# Column 2: Start coordinate |
| 23 |
start: |
| 24 |
- match: ([0-9|\.](?=\d{2}\t)) |
| 25 |
scope: chrStart2.bed |
| 26 |
- match: ([0-9|\.](?=\d{5}\t)) |
| 27 |
scope: chrStart2.bed |
| 28 |
- match: ([0-9|\.](?=\d{8}\t)) |
| 29 |
scope: chrStart2.bed |
| 30 |
- match: ([0-9|\.]) |
| 31 |
scope: chrStart.bed |
| 32 |
- match: \t |
| 33 |
push: end |
| 34 |
- match: $ |
| 35 |
pop: true |
| 36 |
|
| 37 |
# Column 3: End Coordinate |
| 38 |
end: |
| 39 |
- match: ([0-9|\.](?=\d{2}\t)) |
| 40 |
scope: chrStart2.bed |
| 41 |
- match: ([0-9|\.](?=\d{5}\t)) |
| 42 |
scope: chrStart2.bed |
| 43 |
- match: ([0-9|\.](?=\d{8}\t)) |
| 44 |
scope: chrStart2.bed |
| 45 |
- match: ([0-9|\.]) |
| 46 |
scope: chrStart.bed |
| 47 |
- match: \t |
| 48 |
push: name |
| 49 |
- match: $ |
| 50 |
pop: true |
| 51 |
|
| 52 |
# Column 4: Description / Name |
| 53 |
name: |
| 54 |
- match: '[\S]*' |
| 55 |
scope: string.bed |
| 56 |
- match: \t |
| 57 |
push: score |
| 58 |
- match: $ |
| 59 |
pop: true |
| 60 |
|
| 61 |
# Column 5: Score (0-1000 scale) |
| 62 |
score: |
| 63 |
- match: \.\b |
| 64 |
scope: comment.bed |
| 65 |
- match: ([0-9])\b |
| 66 |
scope: grad1.bed |
| 67 |
- match: ([1-9][0-9])\b |
| 68 |
scope: grad1.bed |
| 69 |
- match: 1[0-9][0-9]\b |
| 70 |
scope: grad2.bed |
| 71 |
- match: 2[0-9][0-9]\b |
| 72 |
scope: grad3.bed |
| 73 |
- match: 3[0-9][0-9]\b |
| 74 |
scope: grad4.bed |
| 75 |
- match: 4[0-9][0-9]\b |
| 76 |
scope: grad5.bed |
| 77 |
- match: 5[0-9][0-9]\b |
| 78 |
scope: grad6.bed |
| 79 |
- match: 6[0-9][0-9]\b |
| 80 |
scope: grad7.bed |
| 81 |
- match: 7[0-9][0-9]\b |
| 82 |
scope: grad8.bed |
| 83 |
- match: 8[0-9][0-9]\b |
| 84 |
scope: grad9.bed |
| 85 |
- match: 9[0-9][0-9]\b |
| 86 |
scope: grad10.bed |
| 87 |
- match: ([0-9][0-9][0-9][0-9])\b |
| 88 |
scope: grad10.bed |
| 89 |
- match: \t |
| 90 |
push: strand |
| 91 |
- match: $ |
| 92 |
pop: true |
| 93 |
|
| 94 |
# Column 6: Feature Strand |
| 95 |
strand: |
| 96 |
- match: \+ |
| 97 |
scope: strandPlus.bed |
| 98 |
- match: \- |
| 99 |
scope: strandMinus.bed |
| 100 |
- match: \. |
| 101 |
scope: strandNone.bed |
| 102 |
- match: $ |
| 103 |
pop: true |