annotate check_interleaved.py @ 0:5e15238e9e55 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:31 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
1 """
5e15238e9e55 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.
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
3 """
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
4 import argparse
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
5 import re
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
6 import sys
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
7
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
8
5e15238e9e55 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):
5e15238e9e55 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."""
5e15238e9e55 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:
5e15238e9e55 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
5e15238e9e55 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()
5e15238e9e55 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])
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
15
5e15238e9e55 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):
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
17 if line.strip():
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
18 if idx > ntax:
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
19 return True
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
20
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
21 return False
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
22
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
23
5e15238e9e55 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):
5e15238e9e55 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."""
5e15238e9e55 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
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
27 in_matrix = False
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
28 ntax = None
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
29 seq_lines = 0
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
30
5e15238e9e55 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:
5e15238e9e55 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:
5e15238e9e55 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()
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
34
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
35 if not content:
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
36 continue
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
37
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
38 if in_matrix:
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
39 if content == 'end;':
5e15238e9e55 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
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
41
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
42 if content != ';':
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
43 seq_lines += 1
5e15238e9e55 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:
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
45 return True
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
46 continue
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
47
5e15238e9e55 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:
5e15238e9e55 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'):
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
50 words = content.split()
5e15238e9e55 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 (
5e15238e9e55 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')
5e15238e9e55 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')):
5e15238e9e55 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
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
55 continue
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
56
5e15238e9e55 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:
5e15238e9e55 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)
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
59 if match:
5e15238e9e55 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))
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
61
5e15238e9e55 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'):
5e15238e9e55 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):
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
64 return True
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
65
5e15238e9e55 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'):
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
67 in_matrix = True
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
68
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
69 return False
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
70
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
71
5e15238e9e55 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):
5e15238e9e55 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."""
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
74 return False
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
75
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
76
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
77 def main():
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
78 parser = argparse.ArgumentParser(
5e15238e9e55 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'
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
80 )
5e15238e9e55 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')
5e15238e9e55 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,
5e15238e9e55 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'],
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
84 help='Input format')
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
85
5e15238e9e55 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()
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
87
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
88 interleaved_status = []
5e15238e9e55 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:
5e15238e9e55 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':
5e15238e9e55 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)
5e15238e9e55 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':
5e15238e9e55 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)
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
94 else:
5e15238e9e55 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)
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
96
5e15238e9e55 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)
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
98
5e15238e9e55 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))
5e15238e9e55 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:
5e15238e9e55 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")
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
102
5e15238e9e55 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]:
5e15238e9e55 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")
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
105 else:
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
106 print(args.format)
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
107
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
108 return 0
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
109
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
110
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
111 if __name__ == '__main__':
5e15238e9e55 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/amas commit 158ec0e635067d354c425baf14b95cb616fd93c4
iuc
parents:
diff changeset
112 sys.exit(main())