-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.sh
executable file
·37 lines (26 loc) · 1.12 KB
/
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
#!/bin/bash
odir=$1
fafile=$2
fqfile=$3
if [ $# -lt 3 ] || [ $1 == '-h' ]; then
echo; echo " Usage:" \$MYSMISDIR/$(basename $0) \</full/path/to/destdir\> \<draft_assembly\> \<long_reads\> ; echo
echo " /full/path/to/destdir: folder where to run the pipeline (Please provide full path)"
echo " draft_assembly: fasta file of the assembly to be scaffolded (Please provide full path)"
echo " long_reads: fastq file of long reads for scaffolding (Please provide full path)"
exit 1
fi
echo; echo "${MYSMISDIR:?Need to set MYSMISDIR to location of your smis}" > /dev/null
mkdir -p $odir
cd $odir
rm -f mysettings.sh
echo export "MYSMISDIR="$MYSMISDIR > mysettings.sh
sed -e "s#ODIR#$odir#g" $MYSMISDIR/settings.sh \
| sed -e "s#FAFILE#$fafile#g" | sed -e "s#FQFILE#$fqfile#g" >> mysettings.sh
sed "s#ODIR#$odir#g" $MYSMISDIR/smissv.sh > mysmissv.sh
chmod x mysmissv.sh
echo
echo " You're all set! You can now launch $odir/mysmissv.sh to run the pipeline:"
echo " $ cd "$odir
echo " $ ./mysmissv.sh"
echo; echo " If needed, modify alignment and scaffolding settings in file $odir/mysettings.sh"
echo