view rename_tracks.xml @ 1:75d9357a0a53 draft

planemo upload commit 58057cff13206fae66c938464c052f416047c1b3-dirty
author yating-l
date Mon, 25 Jun 2018 13:12:47 -0400
parents dd6d3b009659
children bd4d45946959
line wrap: on
line source

<tool id="rename_tracks" name="rename the tracks" version="1.0">
<description>Rename the scaffold names in the custom track files</description>
    <requirements>
        <requirement type="package" version="1.2">samtools</requirement>
        <requirement type="package" version="340">ucsc_rename_bigwig</requirement>
    </requirements>
    <stdio>
        <exit_code range="1:" />
    </stdio>
    <command><![CDATA[
        python $__tool_directory__/rename_tracks.py "${input}" "${mapping}" $format_select.format "${output}"
        #if $format_select.format == "bigwig"
            "${format_select.reference}"
        #end if


    ]]></command>
    <inputs>
        <param name="input" type="data" format="gff3,gtf,bed,bam" label="Custom track file" />
        <conditional name="format_select">
            <param name="format" type="select" label="Select the format of your custom track file">
                <option value="bed">BED</option>
                <option value="gff3">GFF3</option>
                <option value="gtf">GTF</option>
                <option value="bam">BAM</option>
                <option value="bigwig">BigWig</option>
            </param>
            <when value="bigwig">
                <param name="reference" type="data" format="fasta" label="Provide the renamed the reference file from 'renamed the scaffolds' tool" />
            </when>
        </conditional>
        <param name="mapping" type="data" format="csv" label="Provide the name mapping file from 'renamed the scaffolds' tool"/>

    </inputs>
    <outputs>
        <data name="output" format_source="input" label="${tool.name} on ${on_string}: renamed_track" />
    </outputs>
    <tests>
        <test>
            <!-- Test with GFF3 -->
            <param name="input" value="Augustus.gff3" />
            <param name="format" value="gff3" />
            <param name="mapping" value="name_mapping.csv" />
            <output name="output" file="rename_Augustus.gff3"/>
        </test>
        <test>
            <!-- Test with BED -->
            <param name="input" value="TrfBig.bed" />
            <param name="format" value="bed" />
            <param name="mapping" value="name_mapping.csv" />
            <output name="output" file="rename_TrfBig.bed"/>
        </test>
        <test>
            <!-- Test with GTF -->
            <param name="input" value="StringTie_assembled_transcripts.gtf" />
            <param name="format" value="gtf" />
            <param name="mapping" value="name_mapping.csv" />
            <output name="output" file="rename_StringTie.gtf" />
        </test>
        <test>
            <!-- Test with BAM -->
            <param name="input" value="HISAT.bam" />
            <param name="format" value="bam" />
            <param name="mapping" value="name_mapping.csv" />
            <output name="output" file="rename_HISAT.bam" />
        </test>
        <test>
            <!-- Test with BigWig -->
            <param name="input" value="sequence_cov.bigwig" />
            <param name="format" value="bigwig" />
            <param name="mapping" value="name_mapping.csv" />
            <param name="reference" value="renamed_reference.fasta" />
            <output name="output" file="rename_sequence_cov.bigwig" />
        </test>
    </tests>
    <help><![CDATA[
    This tool is to rename scaffolds in the custom track files, so that the tracks use the same scaffold names as the reference genome renamed by "rename the scaffolds" tool
    ]]></help>
    <citations>
    </citations>
</tool>