forked from stevekm/reportIT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dir_setup.sh
executable file
·51 lines (40 loc) · 1.68 KB
/
dir_setup.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
#!/bin/bash
## USAGE: dir_setup.sh
## DESCRIPTION: This script will set up the external directory structure for the reportIT pipeline
#~~~~~ CUSTOM ENVIRONMENT ~~~~~~#
source "global_settings.sh"
# dirs to make...
# bin -> ../bin/
# data -> ../reporter_files/data
# input -> ../reporter_files/input
# output -> ../reporter_files/output
echo "Creating external pipeline directories..."
mkdir -p ../reporter_files/data && ln -fs ../reporter_files/data
mkdir -p ../reporter_files/input && ln -fs ../reporter_files/input
mkdir -p ../reporter_files/output && ln -fs ../reporter_files/output
check_dirfile_exists ../reporter_files/data "d" "Checking to make sure data dir was created..."
check_dirfile_exists ../reporter_files/input "d" "Checking to make sure input dir was created..."
check_dirfile_exists ../reporter_files/output "d" "Checking to make sure output dir was created..."
check_dirfile_exists data "l" "Checking to make sure data symlink was created..."
check_dirfile_exists input "l" "Checking to make sure input symlink was created..."
check_dirfile_exists output "l" "Checking to make sure output symlink was created..."
# script to make the bin dir
bin_setup_script="$(readlink -f bin_setup.sh)"
# make the bin dir
echo "Attempting to create bin dir..."
mkdir -p ../bin && ln -fs ../bin
check_dirfile_exists ../bin "d" "Checking to make sure bin dir was created..."
check_dirfile_exists bin "l" "Checking to make sure bin symlink was created..."
bin_dir="$(readlink -f ../bin)"
# download and compile bins
echo -e "Setting up binaries in the bin dir..."
(
cd "$bin_dir"
$bin_setup_script
)
# set up the reference data
echo "Setting up the reference data..."
(
cd ref
./cannonical_transcript_table.py
)