Skip to content

Commit 305f22f

Browse files
committed
add gene IDs to 4th column
1 parent 8a689b1 commit 305f22f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ gencode.v19.annotation.genes.bed
33
gencode.v27.annotation.genes.bed
44
Homo_sapiens.GRCh37.82.chr.bed
55
Homo_sapiens.GRCh38.91.chr.bed
6+
gencode.v19.annotation.genes.id4.bed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# make reference annotations for hg19 genes and gene symbols
22
# requires BEDOPS http://bedops.readthedocs.io/en/latest/content/reference/file-management/conversion/gtf2bed.html
3+
SHELL:=/bin/bash
34

45
# no default action to take
56
none:
67

78
# make all sets of annotations
89
all: gencode-hg19 ensembl-hg19 gencode-hg38 ensembl-hg38 ensembl-mm10
910

10-
gencode-hg19: gencode.v19.annotation.genes.bed
11+
gencode-hg19: gencode.v19.annotation.genes.id4.bed
1112

1213
gencode-hg38: gencode.v27.annotation.genes.bed
1314

@@ -28,8 +29,8 @@ gencode.v19.annotation.gtf.gz:
2829
gencode.v19.annotation.genes.bed: gencode.v19.annotation.gtf.gz
2930
zcat gencode.v19.annotation.gtf.gz | grep -w gene | convert2bed --input=gtf - > gencode.v19.annotation.genes.bed
3031

31-
32-
32+
gencode.v19.annotation.genes.id4.bed: gencode.v19.annotation.genes.bed
33+
paste <(cut -f1-3 gencode.v19.annotation.genes.bed) <(grep -o 'gene_name ".*"' gencode.v19.annotation.genes.bed | sed -e 's|gene_name ||g' | cut -d ';' -f1 | tr -d '"') <(cut -f4- gencode.v19.annotation.genes.bed) > gencode.v19.annotation.genes.id4.bed
3334

3435
# ~~~~~ GENCODE hg38 ~~~~~ #
3536
# generate the Gencode hg38 annotations .bed file

0 commit comments

Comments
 (0)