-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands.txt
executable file
·51 lines (42 loc) · 1.83 KB
/
commands.txt
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
## Commands
This section lists command(s) run by biomodalQC workflow
* Running biomodalQC
```
set -euo pipefail
mkdir init_folder
ln -s $INIT_FOLDER/* ./init_folder
cd init_folder
mkdir -p dataset/~{run_name}/gsi-input
mkdir -p dataset/~{run_name}/nf-input
meta_file_path="dataset/~{run_name}/meta_file.csv"
input_path="dataset/~{run_name}/gsi-input/"
nf_input_path="dataset/~{run_name}/nf-input/"
ln -s ~{fastqR1} ${input_path}
ln -s ~{fastqR2} ${input_path}
read1_link="${nf_input_path}~{sample_id}_S1_~{lane}_R1_001.fastq.gz"
read2_link="${nf_input_path}~{sample_id}_S1_~{lane}_R2_001.fastq.gz"
ln -s ~{fastqR1} ${read1_link}
ln -s ~{fastqR2} ${read2_link}
cat << EOF > ${meta_file_path}
sample_id, ~{sample_id}
description, ~{group_desc}
EOF
cat << EOF > ./input_config.txt
tag=~{tag}
run_name=~{run_name}
sample_id=~{sample_id}
lane=~{lane}
mode=~{mode}
subsample=~{subsample}
random_downsample=~{random_downsample}
meta_file=${meta_file_path}
data_path=${input_path}
run_directory=~{run_name}
work_dir="dataset"
EOF
./run_biomodal_qc.sh ./input_config.txt
cp dataset/~{run_name}/nf-result/duet-1.1.2_~{tag}_~{mode}/dqsreport/~{sample_id}_dqsummary.html ../
cp dataset/~{run_name}/nf-result/duet-1.1.2_~{tag}_~{mode}/pipeline_report/~{run_name}_~{mode}_Summary.csv ../
mv ../~{run_name}_~{mode}_Summary.csv ../~{sample_id}_~{mode}_Summary.csv
chmod -R 770 ./
```