File tree Expand file tree Collapse file tree 1 file changed +71
-0
lines changed
Expand file tree Collapse file tree 1 file changed +71
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ function usage() {
4+ echo " Usage: $0 [options]"
5+ echo
6+ echo " -s <sample id> : sample id"
7+ echo " -d <dir> : directory containing pod5 files"
8+ echo " "
9+ exit 0
10+ }
11+
12+ while getopts " s:d:h" arg; do
13+ case $arg in
14+ s) # sample id
15+ export sample_id=$OPTARG
16+ ;;
17+ d) # data
18+ export data_path=$OPTARG
19+ ;;
20+ h | * ) # Display help.
21+ usage
22+ ;;
23+ :)
24+ echo " Parameter -$OPTARG requires a positional argument"
25+ exit 1
26+ ;;
27+ esac
28+ done
29+
30+ if [ -z " $sample_id " ] || [ -z " $data_path " ];
31+ then
32+ echo " Please specify sample and data path"
33+
34+ usage
35+ fi
36+
37+ PREFIX=.
38+
39+ if [ -e batches ];
40+ then
41+ PREFIX=./batches
42+ fi
43+
44+ BATCH_DIR=$PREFIX /${sample_id}
45+
46+ mkdir $BATCH_DIR
47+
48+ echo '
49+ samples:
50+ - identifier: $sample_id
51+ familyId: $sample_id
52+ sex: female
53+ inputs:
54+ - $data_path
55+ parents: null
56+
57+ ' | envsubst | tee $BATCH_DIR /samples.yaml
58+
59+
60+ echo
61+ echo " Done."
62+ echo
63+ echo "
64+ To run this:
65+
66+ cd $BATCH_DIR
67+
68+ # TODO: ADJUST SEX OF SAMPLES in samples.yaml
69+
70+ bpipe run -p ANALYSIS_QUAL=hac --env ont_server /storage/warpy/src/pipeline.groovy -targets /storage/warpy/designs/WGS_REFFLAT_10_NOALT_38/WGS_REFFLAT_10_NOALT_38.bed -samples samples.yaml
71+ "
You can’t perform that action at this time.
0 commit comments