-
Notifications
You must be signed in to change notification settings - Fork 1
/
tipars
executable file
·31 lines (23 loc) · 1.56 KB
/
tipars
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
#!/usr/bin/env python3
import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument("-aa", action="store_true", help="TIPars excpets nucleotides by default, use -aa for protein")
parser.add_argument("-t", "--tree", help = "tree file, in Newick format")
parser.add_argument("-s", "--sequence", help="fasta/vcf file contains aligned taxa sequences")
parser.add_argument("-a", "--ancseq", help="fasta/vcf file contains aligned ancestral sequences")
parser.add_argument("-q", "--query", help="fasta/vcf file contains one or multiple query seqence(s)")
parser.add_argument("-o", "--output", default="TIPars_output.tree", help="output tree file name")
parser.add_argument("-p", "--type", default="insertion", help="one of 'insertion' or 'placement'")
parser.add_argument("-f", "--format", default="fasta", help="one of 'fasta', 'vcf'")
parser.add_argument("-m", "--multiplacement", default="true", help="one of 'true', 'false'")
parser.add_argument("-d", "--print2screen", default="true", help="one of 'true', 'false'")
parser.add_argument("-x", "--xmx", default="4G", help="Java Xmx setting, e.g.,1G,8G")
parser.add_argument('-v','--version', action='version', version='TIPars v1.1.0')
args = parser.parse_args()
exec_dir = os.path.dirname(__file__)
## print(exec_dir)
cmd = "java -jar -Xmx" + args.xmx + " " + exec_dir + "/TIPars.jar" + " " + args.tree + " " + \
args.sequence + " " + args.ancseq + " " + args.query + " " + args.format + \
" " + args.multiplacement + " " + args.output + " " + args.type + " " + args.print2screen + " " + str(args.aa)
os.system(cmd)