annotate tn93_cluster.py @ 3:2fd21f5b16bc draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
author iuc
date Sat, 28 Sep 2024 16:34:29 +0000
parents b38f620a3628
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
1 import argparse
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
2 import json
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
3 import os
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
4 import shlex
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
5 import subprocess
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
6 import sys
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
7
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
8
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
9 def cluster_to_fasta(json_file, fasta_file, reference_name=None):
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
10 with open(json_file, "r") as fh:
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
11 cluster_json = json.load(fh)
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
12 with open(fasta_file, "w") as fh2:
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
13 for c in cluster_json:
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
14 if reference_name is not None:
3
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
15 if reference_name in c["members"]:
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
16 cc = c["centroid"].split("\n")
1
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
17 cc[0] = ">" + reference_name
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
18 print("\n".join(cc), file=fh2)
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
19 continue
3
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
20 print(c["centroid"], file=fh2)
1
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
21
3
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
22 return (os.path.getmtime(fasta_file), len(cluster_json))
1
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
23
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
24
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
25 def run_command(command):
3
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
26 proc = subprocess.Popen(
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
27 shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
28 )
1
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
29 stdout, stderr = proc.communicate()
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
30 result = proc.returncode
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
31 if result != 0:
3
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
32 print(
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
33 "Command `%s` failed with exit code %s\n" % (command, result),
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
34 file=sys.stderr,
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
35 )
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
36 print("--------------------- STDOUT ---------------------")
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
37 print(stdout.decode().replace("\\n", "\n"))
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
38 print("------------------- END STDOUT -------------------")
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
39 print("--------------------- STDERR ---------------------", file=sys.stderr)
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
40 print(stderr.decode().replace("\\n", "\n"), file=sys.stderr)
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
41 print("------------------- END STDERR -------------------", file=sys.stderr)
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
42 return int(result)
1
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
43
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
44
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
45 def main(arguments):
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
46 threshold = arguments.threshold
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
47 step = threshold * 0.25
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
48 with open(arguments.reference) as fh:
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
49 for line in fh:
3
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
50 if line[0] == ">":
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
51 _ref_seq_name = line[1:].split(" ")[0].strip()
1
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
52 break
2
b38f620a3628 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit 98c0d716cbd1237ae735ce83e0153ee246abd5d8"
iuc
parents: 1
diff changeset
53 while threshold <= 1:
3
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
54 command = (
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
55 "tn93-cluster -o clusters.json -t %g -a %s -c %s -m json -l %d -g %f %s"
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
56 % (
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
57 threshold,
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
58 arguments.ambigs,
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
59 arguments.cluster_type,
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
60 arguments.overlap,
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
61 arguments.fraction,
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
62 arguments.input,
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
63 )
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
64 )
1
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
65 return_code = run_command(command)
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
66 if return_code != 0:
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
67 return return_code
3
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
68 input_stamp, cluster_count = cluster_to_fasta(
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
69 "clusters.json", "clusters.fa", _ref_seq_name
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
70 )
2
b38f620a3628 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit 98c0d716cbd1237ae735ce83e0153ee246abd5d8"
iuc
parents: 1
diff changeset
71 if cluster_count <= arguments.cluster_count:
1
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
72 break
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
73 else:
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
74 threshold += step
3
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
75 print("Found %d clusters at threshold %f" % (cluster_count, threshold))
1
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
76 return 0
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
77
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
78
3
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
79 if __name__ == "__main__":
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
80 parser = argparse.ArgumentParser(
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
81 description="Combine alignments into a single file, adding a reference sequence as well"
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
82 )
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
83 parser.add_argument("--input", help="Input MSA", required=True, type=str)
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
84 parser.add_argument(
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
85 "--reference", help="Reference sequence", required=True, type=str
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
86 )
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
87 parser.add_argument("--output", help="Input MSA", required=True, type=str)
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
88 parser.add_argument("--threshold", help="Threshold", required=True, type=float)
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
89 parser.add_argument("--ambigs", help="Handle ambigs", required=True, type=str)
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
90 parser.add_argument("--cluster-type", help="Cluster type", required=True, type=str)
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
91 parser.add_argument("--overlap", help="Overlap", required=True, type=int)
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
92 parser.add_argument("--fraction", help="Fraction", required=True, type=float)
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
93 parser.add_argument("--cluster-count", help="Max query", required=True, type=int)
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
94 parser.add_argument(
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
95 "--compressed",
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
96 help="File to write compressed clusters to",
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
97 required=True,
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
98 type=str,
2fd21f5b16bc planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents: 2
diff changeset
99 )
1
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
100 arguments = parser.parse_args()
9d793e88e15f "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff changeset
101 exit(main(arguments))