diff bam_dump.xml @ 27:8be4f23d1018

Add bam-dump and test data.
author Matt Shirley <mdshw5@gmail.com>
date Mon, 30 Mar 2015 22:40:59 -0400
parents
children fdc981664a43
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bam_dump.xml	Mon Mar 30 22:40:59 2015 -0400
@@ -0,0 +1,88 @@
+<tool id="bam_dump" name="Extract reads" version="1.1.2">
+  <description> in BAM format from NCBI SRA.</description>
+  <command>
+    sam-dump --log-level fatal
+    #if str( $region ) != "":
+      --aligned-region $region
+    #end if
+    #if str( $matepairDist ) != "":
+      --matepair-distance $matepairDist
+    #end if
+    #if str( $minMapq ) != "":
+      --minmapq $minMapq
+    #end if
+    #if $header == "yes":
+      --header
+    #else:
+      --no-header
+    #end if
+    #if str( $alignments ) == "both":
+      --unaligned
+    #end if
+    #if str( $alignments ) == "unaligned":
+      --unaligned-spots-only
+    #end if
+    #if (str( $primary ) == "yes") and (str ( $alignments != "unaligned") ):
+      --primary
+    #end if
+    #if $input.input_select == "file":
+      $input.file
+    #elif $input.input_select == "accession_number":
+      $input.accession
+    #elif $input.input_select == "text":
+      `cat $input.text`
+    #end if
+    | samtools view -Sb - > $output
+  </command>
+  <version_string>sam-dump --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>
+    <param format="text" name="region" type="text" label="aligned region"/>
+    <param format="text" name="matepairDist" type="text" label="mate-pair distance (from-to|unknown)"/>
+    <param format="text" name="header" type="select" value="yes">
+      <label>output BAM header</label>
+      <option value="yes">Yes</option>
+      <option value="no">No</option>
+    </param>
+    <param format="text" name="alignments" type="select" value="both">
+      <label>aligned or unaligned reads</label>
+      <option value="both">both</option>
+      <option value="aligned">aligned only</option>
+        <option value="unaligned">unaligned only</option>
+    </param>
+    <param format="text" name="primary" type="select" value="no">
+      <label>only primary aligments</label>
+      <option value="no">No</option>
+      <option value="yes">Yes</option>
+    </param>
+    <param format="text" name="minMapq" type="text" label="minimum mapping quality"/>
+  </inputs>
+  <outputs>
+    <data name="output" format="bam"/>
+  </outputs>
+  <requirements>
+    <requirement type="package" version="2.4.5">sra_toolkit</requirement>
+    <requirement type="package" version="1.2">samtools</requirement>
+  </requirements>
+  <help>
+    This tool extracts reads from sra archives using sam-dump.
+    Browse the NCBI SRA for SRR accessions at http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=studies.
+    The sam-dump program is developed at NCBI, and is available at: http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software.
+    Contact Matt Shirley at mdshw5@gmail.com for support and bug reports.
+  </help>
+</tool>