view sra_pileup.xml @ 0:9f74a22d2060 draft default tip

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sra-tools commit 70fadb7e8972b1db550d0e067584930ce1ec8673-dirty
author mvdbeek
date Wed, 04 Nov 2015 06:57:32 -0500
parents
children
line wrap: on
line source

<tool id="sra_pileup" name="Generate pileup format" version="1.2.4">
    <description>from NCBI sra.</description>
    <macros>
        <import>sra_macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command>
        <![CDATA[
        ## Need to set the home directory to the current working directory,
        ## else the tool tries to write to home/.ncbi and fails when used 
        ## with a cluster manager. 
        export HOME=\$PWD;
        vdb-config --restore-defaults;
        vdb-config -s "/repository/user/main/public/root=\$PWD";
         #if ( str( $adv.region ) == "" ):
            ASCP_PATH=`which ascp`;
            ASCP_KEY=`dirname \$ASCP_PATH`/asperaweb_id_dsa.openssh;
            prefetch --ascp-path "\$ASCP_PATH|\$ASCP_KEY" "$input.accession";
        ##Duplicate vdb-config, in case settings changed between prefetch and
        ##dump command.
        #end if
        vdb-config -s "/repository/user/main/public/root=\$PWD";
        sra-pileup --log-level fatal
        #if str( $adv.region ) != "":

        --aligned-region "$adv.region"

        #end if
        #if str( $adv.minMapq ) != "":
        --minmapq "$adv.minMapq"
        #end if
        #if $input.input_select == "file":
        "$input.file" > "$output_file"
        #elif $input.input_select == "accession_number":
        "$input.accession" > "$output_accession"
        #elif $input.input_select == "text":
        `cat $input.text` > "$output_text"
        #end if
        ]]>
    </command>
    <version_string>sra-pileup --version</version_string>
    <inputs>
        <conditional name="input">
            <param name="input_select" type="select" label="select input type">
                <option value="accession_number">SRR accession</option>
                <option value="file">SRA archive in current history</option>
                <option value="text">text file containing SRR accession</option>
            </param>
            <when value="file">
                <param format="sra" name="file" type="data" label="sra archive"/>
            </when>
            <when value="accession_number">
                <param format="text" name="accession" type="text" label="accession"/>
            </when>
            <when value="text">
                <param format="txt" name="text" type="data" label="text file"/>
            </when>
        </conditional>
        <section name="adv" title="Advanced Options" expanded="False">
            <expand macro="region"/>
          <expand macro="minMapq"/>
        </section>
    </inputs>
    <outputs>
        <data format="pileup" name="output_accession" label="${input.accession}.pileup">
            <filter>input['input_select'] == "accession_number"</filter>
        </data>
        <data format="pileup" name="output_file" label="${input.file.name}.pileup">
            <filter>input['input_select'] == "file"</filter>
        </data>
        <data format="pileup" name="output_text" label="${input.text.name}.pileup">
            <filter>input['input_select'] == "text"</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="input_select" value="accession_number"/>
            <param name="accession" value="SRR925743"/>
            <param name="region" value="17:41243452-41277500"/>
            <output name="output_accession" file="sra_pileup_result.pileup" ftype="pileup"/>
        </test>
    </tests>
    <help>
        This tool produces pileup format from sra archives using sra-pileup.
        The sra-pileup program is developed at NCBI, and is available at
        http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software.
        @SRATOOLS_ATTRRIBUTION@
    </help>
</tool>