-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtype1_script.sh
More file actions
48 lines (39 loc) · 1.02 KB
/
type1_script.sh
File metadata and controls
48 lines (39 loc) · 1.02 KB
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
#!/bin/sh
basedir=$1
phenobase=$2
outbase=$3
regpath=$4
for sample in 100 1k 10k
do
if [ "${sample}" == "100" ]; then
sample_1="100"
pf=50
fi
if [ "${sample}" == "1k" ]; then
sample_1="1000"
pf=30
fi
if [ "${sample}" == "10k" ]; then
sample_1="10000"
pf=10
fi
if [ "${sample}" == "50k" ]; then
sample_1="50000"
pf=2
fi
mkdir -p $outbase/logs/${sample}
mkdir -p $outbase/output/${sample}
mkdir -p $outbase/plots/${sample}
for seed in {1..100}
do
echo $outbase/output/${sample}/LM_res_seed${seed}
Rscript $regpath/LR.R \
--bfile $basedir/simulate.$sample_1 \
--pheno $phenobase/${sample}_samples/${sample}_samples_set_${seed}.pheno \
--out $outbase/output/${sample}/LM_res_seed${seed} \
> $outbase/logs/${sample}/LM_res_seed${seed}.log 2>&1 &
if (( seed % pf == 0 )); then
wait
fi
done
done