-
Notifications
You must be signed in to change notification settings - Fork 3
/
data_download.sh
38 lines (30 loc) · 1.02 KB
/
data_download.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
#!/bin/bash
#SBATCH --job-name=data_download
#SBATCH -n 1
#SBATCH -N 1
#SBATCH -c 1
#SBATCH --mem=20G
#SBATCH --partition=general
#SBATCH --qos=general
#SBATCH --array=[1-8]%8
##SBATCH --mail-type=ALL
##SBATCH [email protected]
#SBATCH -o ../log_files/%x_%A_%a.out
#SBATCH -e ../log_files/%x_%A_%a.err
d1="raw_data"
INPUT_FILES=(SRR1517848 SRR1517878 SRR1517884 SRR1517906 SRR1517991 SRR1518011 SRR1518158 SRR1518253)
INPUT_FILE_NAME="${INPUT_FILES[$SLURM_ARRAY_TASK_ID - 1]}"
echo "host name : " `hostname`
echo "input file name : " $INPUT_FILE_NAME
echo "SLURM_ARRAY_TASK_ID : " $SLURM_ARRAY_TASK_ID
##################################################################
## Download data
##################################################################
echo "=========== Download of reads :: ${INPUT_FILE_NAME} ================="
module load sratoolkit/2.8.2
if [ ! -d ../${d1} ]; then
mkdir -p ../${d1}
fi
cd ../${d1}
fastq-dump --split-files ${INPUT_FILE_NAME}
echo "Download complete ${INPUT_FILE_NAME} `date`"