-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathannotate.sh
More file actions
executable file
·28 lines (18 loc) · 883 Bytes
/
annotate.sh
File metadata and controls
executable file
·28 lines (18 loc) · 883 Bytes
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
chr=$1
### pipe in
# set the genome build:
hg=hg19;
# hardwire paths to ref:
ref=/ifs/scratch/c2b2/rr_lab/shares/ref/${hg}
refchr=${ref}/results/chr
ccds=${refchr}/${chr}/ccds
snp=${refchr}/${chr}/snp
thousand=${refchr}/${chr}/1000genome
d1=/ifs/home/c2b2/rr_lab/shares/scripts
varsfile=tmp_0
cut -f3- > $varsfile
cat $varsfile | cut -f1-3 | awk '{print int($1)"\t"int($1)"\t"100"\t"NR"\t"$2"\t"$3}' > tmp_1
sort -k1,1n -k2,2n -m tmp_1 ${ccds}/seg_exon | $d1/segsmerge | $d1/segsone 100 > tmp_2
#rm tmp_1
cat tmp_2 | $d1/modannotate -t /ifs/home/c2b2/rr_lab/shares/scripts/humangencode.txt /ifs/scratch/c2b2/rr_lab/shares/ref/${hg}/results/chr/${chr}/ccds/seq -c ${chr} -transcript /ifs/scratch/c2b2/rr_lab/shares/ref/${hg}/results/chr/${chr}/ccds/name_transcript -ccds /ifs/scratch/c2b2/rr_lab/shares/ref/${hg}/results/chr/${chr}/ccds/name -exon > tmp_3
paste tmp_0 tmp_3