forked from awalling/virushunters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
argpasser.sh
executable file
·38 lines (30 loc) · 1.4 KB
/
argpasser.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
#$1, $2, $3, $4 all stand for arguments
#$0 means the first item in command line, which is the
#name of the script
#This code prints out "Not enough arguments", if there are
#less than 4 arguments in the command line
if [ $# -lt 4 ]; then
echo "$0: Not enough arguments. You need to input ./argpasser.sh followed by 4 file names."
echo "The first file should be a scaffolds file"
echo "The second file should be a fasta file"
echo "The third file should be the name you want the output file name to be, from the first python script"
echo "The fourth file should be the name you want the output file name to be, from the second python script"
echo "Usage: $0 "
exit
#This code prints out "Too many arguments", if there are
#more than 4 arguments in the command line
elif [ $# -gt 4 ]; then
echo "$0: Too many arguments. You need to input ./argpasser.sh followed by 4 file names."
echo "The first file should be a scaffolds file"
echo "The second file should be a fasta file"
echo "The third file should be the name you want the output file name to be, from the first python script"
echo "The fourth file should be the name you want the output file name to be, from the second python script"
echo "Usage: $0 "
exit
#Then this code calls the python scripts and passes the
#arguments needed for each of the files
fi
python sequencefinder.py -i $1 -s $2 -o $3
python gc_calculator.py -i $3 -o $4
exit