forked from jaxcs/Seqnature
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdo_DO.sh
executable file
·66 lines (53 loc) · 1.61 KB
/
do_DO.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#! /bin/bash
# A sample script for creating an individualized reference genome
# and annotation gtf file.
date
echo Building Genomes...
ID=$1
PFX=$2
OUT=$3
if [[ ${#TMPDIR} == 0 ]]; then
TMPDIR=$OUT
else
TMPDIR=${TMPDIR}/
fi
if [[ ${#OUT} > 0 ]]; then
rm -rf $OUT
mkdir -p $OUT
fi
./build_individualized_genome.py \
-c ${PFX}${ID}.founder.blocks.L.csv \
-r NCBIM37_genome \
-i 20111102-indels-all.annotated.vcf \
-s 20111102-snps-all.annotated.vcf ${ID} L \
> ${TMPDIR}${ID}_L.fa 2> ${OUT}${ID}_L_stderr.txt &
./build_individualized_genome.py \
-c ${PFX}${ID}.founder.blocks.R.csv \
-r NCBIM37_genome \
-i 20111102-indels-all.annotated.vcf \
-s 20111102-snps-all.annotated.vcf ${ID} R \
> ${TMPDIR}${ID}_R.fa 2> ${OUT}${ID}_R_stderr.txt &
wait
# Bring everything together into one .fa
cat ${TMPDIR}${ID}_{L,R}.fa > ${OUT}${ID}.fa &
date
echo Done building genomes. Now on to the gtfs...
# Build the DO-specific gtfs
./adjust_individualized_annotations.py \
-c 1 -t 3 -s 4 -e 5 -n 5 \
-o ${TMPDIR}${ID}_L.gtf \
-x ${PFX}${ID}.founder.blocks.L.csv \
Mus_musculus.NCBIM37.67.gtf ${ID} L \
> ${OUT}${ID}_L_adjust_stdout.txt 2> ${OUT}${ID}_L_adjust_stderr.txt &
./adjust_individualized_annotations.py \
-c 1 -t 3 -s 4 -e 5 -n 5 \
-o ${TMPDIR}${ID}_R.gtf \
-x ${PFX}${ID}.founder.blocks.R.csv \
Mus_musculus.NCBIM37.67.gtf ${ID} R \
> ${OUT}${ID}_R_adjust_stdout.txt 2> ${OUT}${ID}_R_adjust_stderr.txt &
wait
cat ${TMPDIR}${ID}_{L,R}.gtf > ${OUT}${ID}.gtf
mv ${ID}*offsets_chr* ${OUT}
touch ${OUT}/done.marker
date
echo Done.