diff sra_pileup.xml @ 0:b723c120161a draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sra-tools commit d555f296be01d0c0fa5ac28d28a48cf4ada98297
author iuc
date Sun, 06 Dec 2015 09:04:37 -0500
parents
children f256cb398262
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sra_pileup.xml	Sun Dec 06 09:04:37 2015 -0500
@@ -0,0 +1,88 @@
+<tool id="sra_pileup" name="Generate pileup format" version="1.2.5">
+    <description>from NCBI sra.</description>
+    <macros>
+        <import>sra_macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <version_command>sra-pileup --version</version_command>
+    <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=`command -v ascp` &&
+            ASCP_KEY=`dirname \$ASCP_PATH`/asperaweb_id_dsa.openssh || true &&
+            prefetch --ascp-path "\$ASCP_PATH|\$ASCP_KEY" "$input.accession" &&
+            ## Duplicate vdb-config, in case settings changed between prefetch and
+            ## sra-pileup command.
+            vdb-config -s "/repository/user/main/public/root=\$PWD" &&
+        #end if
+        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>
+    <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="SRR accession" help="Must start with SRR, e.g. SRR925743"/>
+            </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" compare="contains" 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>
+    <expand macro="citation"/>
+</tool>