view mafAddIRows.xml @ 1:76f19f4cb5e6 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/ucsc_tools/maftools commit 62876fcda4bf5b365ef9c1bee10d611dda5453a9
author iuc
date Tue, 09 Sep 2025 16:20:49 +0000
parents 1e64bb6893b2
children
line wrap: on
line source

<tool id="ucsc_mafaddirows" name="mafAddIRows" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="24.2" license="MIT">
    <description>Add i rows to a MAF file</description>
    <macros>
        <token name="@TOOL_VERSION@">482</token>
        <token name="@VERSION_SUFFIX@">0</token>
    </macros>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">ucsc-mafaddirows</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        mafAddIRows
        $input_maf
        $twoBitFile
        $output_maf
        #if $nBeds
            #import re
            #for $bed in $nBeds:
                #set identifier = re.sub('[^\s\w\-\\.]','_',str($bed.element_identifier))
                && ln -s '$bed' '$identifier' &&
                echo '$identifier' >> 'bed.txt'
            #end for
            -nBeds='bed.txt'
        #end if
        $addN
        $addDash
    ]]></command>
    <inputs>
        <param name="input_maf" type="data" format="maf" label="Input MAF file" help="MAF file with a single target sequence"/>
        <param name="twoBitFile" type="data" format="twobit" label="TwoBit reference file" help="TwoBit file for the reference genome"/>
        <param name="nBeds" type="data" format="bed" optional="true" multiple="true" label="List of BED files" help="One BED file per species with N locations"/>
        <param name="addN" type="boolean" truevalue="-addN" falsevalue="" label="Add rows of N's" help="Add rows of N's into MAF blocks instead of annotating them"/>
        <param name="addDash" type="boolean" truevalue="-addDash" falsevalue="" label="Add rows of -'s" help="Add rows of -'s into MAF blocks instead of annotating them"/>
    </inputs>
    <outputs>
        <data name="output_maf" format="maf" label="${tool.name} on ${on_string}: MAF output"/>
    </outputs>
    <tests>
        <!-- Test 1: Using -addN option -->
        <test expect_num_outputs="1">
            <param name="input_maf" value="mafIn.maf"/>
            <param name="twoBitFile" value="ref.2bit"/>
            <param name="addN" value="true"/>
            <param name="addDash" value="false"/>
            <output name="output_maf" ftype="maf">
                <assert_contents>
                    <has_n_lines n="8"/>
                    <has_line line="i gorGor3.chr7 N 0 N 0"/>
                </assert_contents>
            </output>
        </test>
        <!-- Test 2: Using -addDash option -->
        <test expect_num_outputs="1">
            <param name="input_maf" value="mafIn.maf"/>
            <param name="twoBitFile" value="ref.2bit"/>
            <param name="addN" value="false"/>
            <param name="addDash" value="true"/>
            <output name="output_maf" ftype="maf">
                <assert_contents>
                    <has_n_lines n="8"/>
                    <has_line line="i gorGor3.chr7 N 0 N 0"/>
                    <has_line line="s panTro4.chr7 1000 20 + 159345973 ACGTAC-TAC-TACGTACGT"/>
                </assert_contents>
            </output>
        </test>
        <!-- Test 3: -nBeds option -->
        <test expect_num_outputs="1">
            <param name="input_maf" value="mafIn.maf"/>
            <param name="twoBitFile" value="ref.2bit"/>
            <param name="nBeds" value="gorGor3.bed,hg38.bed,panTro4.bed"/>
            <param name="addN" value="true"/>
            <param name="addDash" value="false"/>
            <output name="output_maf" ftype="maf">
                <assert_contents>
                    <has_n_lines n="8"/>
                    <has_line line="i gorGor3.chr7 N 0 N 0"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
**mafAddIRows**

This tool adds 'i' rows to a Multiple Alignment Format (MAF) file. It requires a MAF file with a single target sequence.

**Usage**

- **Input MAF file**: Provide a MAF file containing alignments with only one target sequence.
- **TwoBit reference file**: Specify a TwoBit file for the reference genome.
- **List of BED files** (optional): Provide BED files (one per species) specifying N locations.
- **Add rows of N's**: Check to insert rows of N's into MAF blocks instead of annotating.
- **Add rows of -'s**: Check to insert rows of -'s into MAF blocks instead of annotating.

**Output**

- A modified MAF file with added 'i' rows or annotations based on the provided options.

**Note**

- The input MAF file must contain only a single target sequence.
- Use either `-addN` or `-addDash`, but not both, to modify the MAF blocks directly.
    ]]></help>
    <citations>
        <citation type="bibtex">
@misc{mafAddIRows,
  title = {mafAddIRows: Add 'i' rows to a MAF file},
  author = {Kent UCSC},
  note = {Tool for adding 'i' rows to MAF files with a single target sequence}
}
        </citation>
    </citations>
    <creator>
        <person givenName="Saim" familyName="Momin" url="https://github.com/SaimMomin12"/>
        <organization name="Galaxy Europe" url="https://galaxyproject.org/eu/"/>
    </creator>
</tool>