diff macros.xml @ 0:5acf23babd9a 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:27:37 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Tue Dec 02 09:27:37 2025 +0000
@@ -0,0 +1,173 @@
+<macros>
+    <token name="@TOOL_VERSION@">1.0</token>
+    <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@PROFILE@">25.0</token>
+
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@TOOL_VERSION@">amas</requirement>
+        </requirements>
+    </xml>
+
+    <xml name="version_command">
+        <version_command>python -c "import amas; print(amas.__version__)"</version_command>
+    </xml>
+
+    <token name="@SNIFF_INPUT_FORMAT@"><![CDATA[
+        #set $in_format = $input_files[0].ext
+        #if $in_format == 'nex'
+            #set $in_format = 'nexus'
+        #end if
+    ]]></token>
+
+    <token name="@CHECK_INTERLEAVED@"><![CDATA[
+        ## Check if inputs are interleaved
+        IN_FORMAT=\$(python '$__tool_directory__/check_interleaved.py' 
+            #for $f in $input_files
+                '${f}'
+            #end for
+            --format '${in_format}') &&
+    ]]></token>
+
+    <token name="@SYMLINK_INPUTS@"><![CDATA[
+        ## Create symlinks with original filename for consistent tests
+        #for $f in $input_files
+            #set $safename_input = re.sub('[^\w\-_\.]', '_', $f.element_identifier)
+            ln -s '${f}' '${safename_input}';
+        #end for
+    ]]></token>
+
+    <token name="@INPUT_FILENAMES@"><![CDATA[
+        #for $f in $input_files
+            #set $safename_input = re.sub('[^\w\-_\.]', '_', $f.element_identifier)
+            '${safename_input}'
+        #end for
+    ]]></token>
+
+    <xml name="output_format" token_name="out_format" token_label="Format of the output file">
+        <param name="out_format" type="select" label="@LABEL@">
+            <option value="fasta">fasta</option>
+            <option value="phylip">phylip (sequential)</option>
+            <option value="phylip-int">phylip (interleaved)</option>
+            <option value="nexus">nexus (sequential)</option>
+            <option value="nexus-int">nexus (interleaved)</option>
+        </param>
+    </xml>
+
+    <xml name="data_type">
+        <param name="data_type" type="select" label="Data type">
+            <option value="aa">Protein alignments</option>
+            <option value="dna">Nucleotide alignments</option>
+        </param>
+    </xml>
+
+    <xml name="check_align">
+        <param argument="--check-align" type="boolean" label="Check if input sequences are aligned" checked="false" truevalue="--check-align" falsevalue="" />
+    </xml>
+
+    <!-- Galaxy doesn't currently detect whether PHYLIP or NEXUS format is interleaved/sequential; if implemented update here and assoc in subcommands -->
+    <xml name="collection_outputs" token_name="alignments" token_label="alignment files">
+        <collection name="@NAME@_fasta" type="list" label="${tool.name} on ${on_string}: fasta">
+            <discover_datasets pattern="(?P&lt;name&gt;.+-out\..+)" format="fasta" />
+            <filter>out_format == "fasta"</filter>
+        </collection>
+        
+        <collection name="@NAME@_phylip" type="list" label="${tool.name} on ${on_string}: phylip">
+            <discover_datasets pattern="(?P&lt;name&gt;.+-out\..+)" format="phylip" />
+            <filter>out_format == "phylip" or out_format == "phylip-int"</filter>
+        </collection>
+        
+        <collection name="@NAME@_nexus" type="list" label="${tool.name} on ${on_string}: nexus">
+            <discover_datasets pattern="(?P&lt;name&gt;.+-out\..+)" format="nex" />
+            <filter>out_format == "nexus" or out_format == "nexus-int"</filter>
+        </collection>
+    </xml>
+
+    <token name="@PARTITIONS_HELP@"><![CDATA[
+        **What is a partitions file?**
+
+        The partitions file maps each gene/locus to its position in the concatenated alignment. This is essential for downstream phylogenetic analyses (e.g., RAxML, IQ-TREE) that can apply different evolutionary models to different partitions.
+
+        **Example:**
+
+        If you concatenate three genes::
+
+            gene1.fasta (500 bp)
+            gene2.fasta (700 bp)  
+            gene3.fasta (400 bp)
+
+        The partitions file (unspecified format) will contain::
+
+            gene1 = 1-500
+            gene2 = 501-1200
+            gene3 = 1201-1600
+
+        **Partition formats:**
+
+        - **Unspecified**
+        
+        ::
+
+            gene1 = 1-500
+            gene2 = 501-1200
+
+        - **RAxML**
+        
+        ::
+
+            DNA, gene1 = 1-500
+            DNA, gene2 = 501-1200
+
+        - **NEXUS**
+        
+        ::
+
+            #NEXUS
+
+            Begin sets;
+                charset gene1 = 1-500;
+                charset gene2 = 501-1200;
+            End;
+    ]]></token>
+
+    <token name="@AMAS_SHARED_HELP@"><![CDATA[
+        **Sequential vs Interleaved Phylip Format**
+
+        - **Sequential**: Each complete sequence is written in order, one after another. Easier for programmatic parsing.
+
+        ::
+
+            4 60
+            Seq1    ATGCATGCATATGCATGCATATGCATGCAT...
+            Seq2    ATGCATGCATATGCATGCATATGCATGCAT...
+            Seq3    ATGCATGCATATGCATGCATATGCATGCAT...
+            Seq4    ATGCATGCATATGCATGCATATGCATGCAT...
+
+        - **Interleaved**: Sequences are written in aligned blocks, making it easier to visually compare positions across sequences.
+
+        ::
+
+            4 60
+            Seq1    ATGCATGCATATGCATGCAT
+            Seq2    ATGCATGCATATGCATGCAT
+            Seq3    ATGCATGCATATGCATGCAT
+            Seq4    ATGCATGCATATGCATGCAT
+
+            Seq1    ATGCATGCAT...
+            Seq2    ATGCATGCAT...
+            Seq3    ATGCATGCAT...
+            Seq4    ATGCATGCAT...
+
+        **About AMAS**
+
+        AMAS (Alignment manipulation and summary statistics) is designed for modern phylogenomics workflows involving hundreds of taxa and thousands of loci.
+
+        Source code and manual: https://github.com/marekborowiec/AMAS
+    ]]></token>
+
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.7717/peerj.1660</citation>
+        </citations>
+    </xml>
+</macros>
\ No newline at end of file