comparison amas_split.xml @ 0:b7e4e1487fc6 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:16 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:b7e4e1487fc6
1 <tool id="amas_split" name="AMAS split" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>split multiple alignments</description>
3
4 <macros>
5 <import>macros.xml</import>
6 </macros>
7
8 <xrefs>
9 <xref type="bio.tools">amas</xref>
10 </xrefs>
11
12 <expand macro="requirements" />
13 <expand macro="version_command" />
14
15 <command detect_errors="exit_code"><![CDATA[
16 #import re
17 set -eu;
18
19 ## Let galaxy sniff input format
20 #set $in_format = $input_file.ext
21 #if $in_format == 'nex'
22 #set $in_format = 'nexus'
23 #end if
24
25 ## Check if inputs are interleaved
26 IN_FORMAT=\$(python '$__tool_directory__/check_interleaved.py'
27 '${input_file}'
28 --format '${in_format}') &&
29
30 ## Create symlinks with original filename for consistent tests because
31 ## input filenames are used as str vars
32 #set $safename_input = re.sub('[^\w\-_\.]', '_', $input_file.element_identifier)
33 ln -s '${input_file}' '${safename_input}';
34
35 python -m amas.AMAS
36 split
37 --split-by $split_by
38 $remove_empty
39 --out-format $out_format
40 --in-files $safename_input
41 --in-format "\${IN_FORMAT}"
42 --data-type $data_type
43 --cores "\${GALAXY_SLOTS:-1}"
44 $check_align
45 ]]></command>
46
47 <inputs>
48 <param name="input_file" type="data" format="fasta,phylip,nex" label="Sequence to split" multiple="false" help="Provide pre-aligned FASTA/PHYLIP/NEXUS file (DNA or protein); mixes of unaligned reads or contigs will produce meaningless results." />
49 <expand macro="output_format" label="Select output format for split alignments" />
50 <!-- If amas updates split to handle NEXUS format include nex format here -->
51 <param name="split_by" type="data" format="txt" label="Partitions file for splitting. Note: needs to be a partions file in the Unspecified format (See help section for more information)"
52 help="A file defining how to split the concatenated alignment into separate gene/locus regions. Each line specifies a partition name and its position range (e.g., 'gene1 = 1-500' for unspecified format). See the help section for more information about partitions." />
53 <param argument="--remove-empty" type="boolean" label="Remove taxa that are entirely missing within a partition" checked="false" truevalue="--remove-empty" falsevalue="" />
54 <expand macro="data_type" />
55 <expand macro="check_align" />
56 </inputs>
57
58 <outputs>
59 <expand macro="collection_outputs" name="split_alignments" />
60 </outputs>
61
62 <tests>
63 <test expect_num_outputs="1">
64 <param name="input_file" value="inputs/concat_result.phylip" />
65 <param name="split_by" value="inputs/partitions_concat_unspecified.txt" />
66 <param name="remove_empty" value="true" />
67 <param name="out_format" value="fasta" />
68 <param name="data_type" value="dna" />
69 <param name="check_align" value="false" />
70 <output_collection name="split_alignments_fasta" type="list">
71 <element name="concat_result_p1_concat_1-out.fas" file="outputs/expected_split_partition1.fas" ftype="fasta" />
72 <element name="concat_result_p2_concat_2-out.fas" file="outputs/expected_split_partition2.fas" ftype="fasta" />
73 </output_collection>
74 </test>
75 </tests>
76
77 <help><![CDATA[
78 **What it does**
79
80 AMAS Split divides a concatenated alignment back into separate gene/locus files using a partitions file. This is the reverse operation of AMAS Concat.
81
82 **Inputs**
83
84 - **Concatenated alignment**: A single alignment file containing multiple genes/loci joined end-to-end
85 - **Partitions file**: Defines the boundaries of each gene/locus (.txt file containing Unspecified formatting)
86 - **Input format**: Specify the format of your concatenated alignment
87 - **Data type**: Choose DNA for nucleotide sequences or Protein for amino acid sequences
88 - **Output format**: Select the desired format for the split alignment files
89 - **Remove empty sequences**: Optionally exclude taxa with only gaps/missing data in a partition
90
91 **Outputs**
92
93 A collection of alignment files, one per partition/gene defined in your partitions file.
94
95 @PARTITIONS_HELP@
96
97 **IMPORTANT**: A .txt file containing RAxML, or NEXUS formatting, or a .nex file containing NEXUS formatting that are produced using AMAS Concat will not work.
98
99 **Tip:** An example for your data can be generated using the AMAS concat tool.
100
101 **Use cases**
102
103 - Extract individual gene alignments from a concatenated dataset
104 - Analyze genes separately after joint phylogenetic analysis
105 - Apply gene-specific filtering or trimming
106 - Recover original locus alignments from published concatenated datasets
107
108 @AMAS_SHARED_HELP@
109 ]]></help>
110
111 <expand macro="citations" />
112 </tool>