-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcreateAnnoDB.sh
50 lines (41 loc) · 2.17 KB
/
createAnnoDB.sh
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
#! /bin/bash
configfile=./config.env
if [ ! -f $configfile ]; then
echo "$configfile does not exists."
exit 1
fi
source $configfile
refGene=db/refGene.txt
knownGene=db/knownGene.txt
ensGene=db/ensGene.txt
sRepeat=db/simpleRepeat.txt
if [ ! -f $refGene ]; then
echo "$refGene does not exists."
exit 1
fi
if [ ! -f $knownGene ]; then
echo "$knownGene does not exists."
exit 1
fi
if [ ! -f $ensGene ]; then
echo "$ensGene does not exists."
exit 1
fi
if [ ! -f $sRepeat ]; then
echo "$sRepeat does not exists."
exit 1
fi
perl db/coding_RefSeq.pl $refGene db/refGene.coding.exon.bed db/refGene.coding.intron.bed db/refGene.coding.5putr.bed db/refGene.coding.3putr.bed
${PATH_TO_BEDTOOLS}/mergeBed -i db/refGene.coding.exon.bed -nms | ${PATH_TO_BEDTOOLS}/sortBed -i stdin > db/refGene.merged.coding.exon.bed
${PATH_TO_BEDTOOLS}/mergeBed -i db/refGene.coding.intron.bed -nms | ${PATH_TO_BEDTOOLS}/sortBed -i stdin > db/refGene.merged.coding.intron.bed
${PATH_TO_BEDTOOLS}/mergeBed -i db/refGene.coding.5putr.bed -nms | ${PATH_TO_BEDTOOLS}/sortBed -i stdin > db/refGene.merged.coding.5putr.bed
${PATH_TO_BEDTOOLS}/mergeBed -i db/refGene.coding.3putr.bed -nms | ${PATH_TO_BEDTOOLS}/sortBed -i stdin > db/refGene.merged.coding.3putr.bed
perl db/noncoding_RefSeq.pl $refGene db/refGene.noncoding.exon.bed db/refGene.noncoding.intron.bed
${PATH_TO_BEDTOOLS}/mergeBed -i db/refGene.noncoding.exon.bed -nms | ${PATH_TO_BEDTOOLS}/sortBed -i stdin > db/refGene.merged.noncoding.exon.bed
${PATH_TO_BEDTOOLS}/mergeBed -i db/refGene.noncoding.intron.bed -nms | ${PATH_TO_BEDTOOLS}/sortBed -i stdin > db/refGene.merged.noncoding.intron.bed
perl db/known_gene_format_changer.pl $knownGene > db/knownGene.bed
${PATH_TO_BEDTOOLS}/mergeBed -i db/knownGene.bed -nms | ${PATH_TO_BEDTOOLS}/sortBed -i stdin > db/knownGene.merged.bed
perl db/ens_gene_format_changer.pl $ensGene > db/ensGene.bed
${PATH_TO_BEDTOOLS}/mergeBed -i db/ensGene.bed -nms | ${PATH_TO_BEDTOOLS}/sortBed -i stdin > db/ensGene.merged.bed
perl db/s_repeat_format_changer.pl $sRepeat > db/simpleRepeat.bed
${PATH_TO_BEDTOOLS}/mergeBed -i db/simpleRepeat.bed -nms | ${PATH_TO_BEDTOOLS}/sortBed -i stdin > db/simpleRepeat.merged.bed