-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvenn_lof.sh
executable file
·26 lines (22 loc) · 921 Bytes
/
venn_lof.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
#!/bin/bash
strains=("HN9-1" "HN-Z6" "YL-1" "CS3005" "FG1" "FG2")
terms=("start_lost" "stop_gained" "frameshift" "stop_lost")
terms2=("start_lost" "stop_gained" "frameshift")
mkdir -p data/venn_lof/high
mkdir -p data/venn_lof/id
mkdir -p data/venn_lof/lof
# extract var. have high effect
for strain in ${strains[@]}; do
for term in ${terms[@]}; do
grep $term data/eff/$strain.ann.vcf > data/venn_lof/high/$strain.$term.txt
cat data/venn_lof/high/$strain.$term.txt | wc -l | xargs echo "var: $strain $term "
done
done
# extract highly effected genes
for strain in ${strains[@]}; do
for term in ${terms2[@]}; do
perl ./exhg.pl data/venn_lof/high/$strain.$term.txt > data/venn_lof/id/$strain.$term.id
cat data/venn_lof/id/$strain.$term.id | cut -f 5 | sort | uniq > data/venn_lof/id/$strain.$term.nr.id
done
cat data/venn_lof/id/$strain.*.nr.id | sort | uniq > data/venn_lof/lof/$strain.lof.id
done