Mercurial > repos > iuc > tn93_filter
annotate tn93_cluster.py @ 2:1aa73004ba9b 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:09 +0000 |
parents | cf50aeb956f2 |
children |
rev | line source |
---|---|
0
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
1 import argparse |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
2 import json |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
3 import os |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
4 import shlex |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
5 import subprocess |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
6 import sys |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
7 |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
8 |
ba95715078c9
"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): |
ba95715078c9
"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: |
ba95715078c9
"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) |
ba95715078c9
"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: |
ba95715078c9
"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: |
ba95715078c9
"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: |
2
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
15 if reference_name in c["members"]: |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
16 cc = c["centroid"].split("\n") |
0
ba95715078c9
"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 |
ba95715078c9
"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) |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
19 continue |
2
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
20 print(c["centroid"], file=fh2) |
0
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
21 |
2
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
22 return (os.path.getmtime(fasta_file), len(cluster_json)) |
0
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
23 |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
24 |
ba95715078c9
"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): |
2
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
26 proc = subprocess.Popen( |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
27 shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
28 ) |
0
ba95715078c9
"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() |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
30 result = proc.returncode |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
31 if result != 0: |
2
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
32 print( |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
33 "Command `%s` failed with exit code %s\n" % (command, result), |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
34 file=sys.stderr, |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
35 ) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
36 print("--------------------- STDOUT ---------------------") |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
37 print(stdout.decode().replace("\\n", "\n")) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
38 print("------------------- END STDOUT -------------------") |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
39 print("--------------------- STDERR ---------------------", file=sys.stderr) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
40 print(stderr.decode().replace("\\n", "\n"), file=sys.stderr) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
41 print("------------------- END STDERR -------------------", file=sys.stderr) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
42 return int(result) |
0
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
43 |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
44 |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
45 def main(arguments): |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
46 threshold = arguments.threshold |
ba95715078c9
"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 |
ba95715078c9
"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: |
ba95715078c9
"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: |
2
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
50 if line[0] == ">": |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
51 _ref_seq_name = line[1:].split(" ")[0].strip() |
0
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
52 break |
1
cf50aeb956f2
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit 98c0d716cbd1237ae735ce83e0153ee246abd5d8"
iuc
parents:
0
diff
changeset
|
53 while threshold <= 1: |
2
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
54 command = ( |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
55 "tn93-cluster -o clusters.json -t %g -a %s -c %s -m json -l %d -g %f %s" |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
56 % ( |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
57 threshold, |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
58 arguments.ambigs, |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
59 arguments.cluster_type, |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
60 arguments.overlap, |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
61 arguments.fraction, |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
62 arguments.input, |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
63 ) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
64 ) |
0
ba95715078c9
"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) |
ba95715078c9
"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: |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
67 return return_code |
2
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
68 input_stamp, cluster_count = cluster_to_fasta( |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
69 "clusters.json", "clusters.fa", _ref_seq_name |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
70 ) |
1
cf50aeb956f2
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit 98c0d716cbd1237ae735ce83e0153ee246abd5d8"
iuc
parents:
0
diff
changeset
|
71 if cluster_count <= arguments.cluster_count: |
0
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
72 break |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
73 else: |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
74 threshold += step |
2
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
75 print("Found %d clusters at threshold %f" % (cluster_count, threshold)) |
0
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
76 return 0 |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
77 |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
78 |
2
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
79 if __name__ == "__main__": |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
80 parser = argparse.ArgumentParser( |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
81 description="Combine alignments into a single file, adding a reference sequence as well" |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
82 ) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
83 parser.add_argument("--input", help="Input MSA", required=True, type=str) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
84 parser.add_argument( |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
85 "--reference", help="Reference sequence", required=True, type=str |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
86 ) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
87 parser.add_argument("--output", help="Input MSA", required=True, type=str) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
88 parser.add_argument("--threshold", help="Threshold", required=True, type=float) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
89 parser.add_argument("--ambigs", help="Handle ambigs", required=True, type=str) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
90 parser.add_argument("--cluster-type", help="Cluster type", required=True, type=str) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
91 parser.add_argument("--overlap", help="Overlap", required=True, type=int) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
92 parser.add_argument("--fraction", help="Fraction", required=True, type=float) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
93 parser.add_argument("--cluster-count", help="Max query", required=True, type=int) |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
94 parser.add_argument( |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
95 "--compressed", |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
96 help="File to write compressed clusters to", |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
97 required=True, |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
98 type=str, |
1aa73004ba9b
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit e9f254ea1c6712a96512cae4df91bfec8207a492
iuc
parents:
1
diff
changeset
|
99 ) |
0
ba95715078c9
"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() |
ba95715078c9
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tn93/ commit eec640a7c26b728f8175885926fe368b0756d9e5"
iuc
parents:
diff
changeset
|
101 exit(main(arguments)) |