annotate check_interleaved.py @ 0:fb24e1904d08 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
author iuc
date Tue, 02 Dec 2025 09:26:01 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
1 """
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
2 Helper script to check if AMAS input files are interleaved.
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
3 """
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
4 import argparse
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
5 import re
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
6 import sys
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
7
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
8
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
9 def check_phylip_interleaved(filepath):
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
10 """Check if PHYLIP file is interleaved."""
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
11 with open(filepath, encoding='utf-8') as f:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
12 # First line is header: ntax nchar
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
13 header = next(f).strip().split()
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
14 ntax = int(header[0])
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
15
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
16 for idx, line in enumerate(f, 1):
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
17 if line.strip():
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
18 if idx > ntax:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
19 return True
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
20
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
21 return False
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
22
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
23
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
24 def check_nexus_interleaved(filepath):
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
25 """Check if NEXUS file is interleaved."""
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
26 in_data_block = False
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
27 in_matrix = False
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
28 ntax = None
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
29 seq_lines = 0
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
30
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
31 with open(filepath, encoding='utf-8') as f:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
32 for line in f:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
33 content = line.strip().lower()
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
34
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
35 if not content:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
36 continue
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
37
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
38 if in_matrix:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
39 if content == 'end;':
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
40 return seq_lines != ntax if ntax else False
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
41
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
42 if content != ';':
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
43 seq_lines += 1
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
44 if ntax and seq_lines > ntax:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
45 return True
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
46 continue
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
47
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
48 if not in_data_block:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
49 if content.startswith('begin'):
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
50 words = content.split()
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
51 if len(words) > 1 and (
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
52 words[1].startswith('data')
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
53 or words[1].startswith('characters')):
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
54 in_data_block = True
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
55 continue
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
56
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
57 if content.startswith('dimensions') and ntax is None:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
58 match = re.search(r'ntax=(\d+)', content)
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
59 if match:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
60 ntax = int(match.group(1))
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
61
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
62 elif content.startswith('format'):
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
63 if re.search(r'\binterleave(?:;|=yes;?)?\b', content):
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
64 return True
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
65
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
66 elif content.startswith('matrix'):
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
67 in_matrix = True
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
68
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
69 return False
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
70
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
71
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
72 def check_fasta_interleaved(filepath):
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
73 """FASTA files are not interleaved."""
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
74 return False
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
75
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
76
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
77 def main():
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
78 parser = argparse.ArgumentParser(
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
79 description='Check if AMAS input files are interleaved'
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
80 )
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
81 parser.add_argument('input_files', nargs='+', help='Input sequence files')
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
82 parser.add_argument('--format', required=True,
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
83 choices=['fasta', 'phylip', 'nexus'],
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
84 help='Input format')
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
85
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
86 args = parser.parse_args()
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
87
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
88 interleaved_status = []
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
89 for filepath in args.input_files:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
90 if args.format == 'phylip':
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
91 is_interleaved = check_phylip_interleaved(filepath)
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
92 elif args.format == 'nexus':
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
93 is_interleaved = check_nexus_interleaved(filepath)
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
94 else:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
95 is_interleaved = check_fasta_interleaved(filepath)
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
96
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
97 interleaved_status.append(is_interleaved)
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
98
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
99 interleaved_status = list(set(interleaved_status))
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
100 if len(interleaved_status) > 1:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
101 raise Exception("Error: Input files are a mix of interleaved/sequential formats")
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
102
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
103 if interleaved_status[0]:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
104 print(f"{args.format}-int")
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
105 else:
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
106 print(args.format)
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
107
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
108 return 0
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
109
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
110
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
111 if __name__ == '__main__':
fb24e1904d08 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
112 sys.exit(main())