changeset 3:609810451a80 draft

planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
author devteam
date Tue, 13 Oct 2015 12:54:20 -0400
parents 787d6c86c6ea
children 7bf8c0f07c46
files macros.xml samtools_calmd.xml tool-data/tool_data_table_conf.xml.sample tool_data_table_conf.xml.sample tool_dependencies.xml
diffstat 5 files changed, 116 insertions(+), 72 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Tue Oct 13 12:54:20 2015 -0400
@@ -0,0 +1,70 @@
+<macros>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="1.2">samtools</requirement>
+            <yield/>
+        </requirements>
+    </xml>
+    <xml name="citations">
+        <citations>
+            <citation type="bibtex">
+                @misc{SAM_def,
+                title={Definition of SAM/BAM format},
+                url = {https://samtools.github.io/hts-specs/SAMv1.pdf},}
+            </citation>
+            <citation type="doi">10.1093/bioinformatics/btp352</citation>
+            <citation type="doi">10.1093/bioinformatics/btr076</citation>
+            <citation type="doi">10.1093/bioinformatics/btr509</citation>
+            <citation type="bibtex">
+                @misc{Danecek_et_al,
+                Author={Danecek, P., Schiffels, S., Durbin, R.},
+                title={Multiallelic calling model in bcftools (-m)},
+                url = {http://samtools.github.io/bcftools/call-m.pdf},}
+            </citation>
+            <citation type="bibtex">
+                @misc{Durbin_VCQC,
+                Author={Durbin, R.},
+                title={Segregation based metric for variant call QC},
+                url = {http://samtools.github.io/bcftools/rd-SegBias.pdf},}
+            </citation>
+            <citation type="bibtex">
+                @misc{Li_SamMath,
+                Author={Li, H.},
+                title={Mathematical Notes on SAMtools Algorithms},
+                url = {http://www.broadinstitute.org/gatk/media/docs/Samtools.pdf},}
+            </citation>
+            <citation type="bibtex">
+                @misc{SamTools_github,
+                title={SAMTools GitHub page},
+                url = {https://github.com/samtools/samtools},}
+            </citation>
+        </citations>
+    </xml>
+    <xml name="version_command">
+        <version_command>samtools --version | head -n 1 | awk '{ print $2 }'</version_command>
+    </xml>
+    <xml name="stdio">
+        <stdio>
+            <exit_code range="1:" level="fatal" description="Error" />
+        </stdio>
+    </xml>
+    <token name="@no-chrom-options@">
+-----
+
+.. class:: warningmark
+
+**No options available? How to re-detect metadata**
+
+If you see a &quot;No options available&quot; within the &quot;**Select references (chromosomes and contigs) you would like to restrict bam to**&quot; drop down, you need to re-detect metadata for the dataset you are trying to process. To do this follow these steps:
+
+1. Click on the **pencil** icon adjacent to the dataset in the history
+2. A new menu will appear in the center pane of the interface
+3. Click **Datatype** tab
+4. Set **New Type** to **BAM**
+5. Click **Save**
+
+The medatada will be re-detected and you will be able to see the list of reference sequences in the &quot;**Select references (chromosomes and contigs) you would like to restrict bam to**&quot; drop-down.
+
+    </token>
+
+</macros>
--- a/samtools_calmd.xml	Mon Sep 29 12:16:47 2014 -0400
+++ b/samtools_calmd.xml	Tue Oct 13 12:54:20 2015 -0400
@@ -1,9 +1,11 @@
-<tool id="samtools_calmd" name="Recalculate" version="1.0.1">
-    <description>MD/NM tags and '=' bases</description>
-    <requirements>
-        <requirement type="package" version="1.1">samtools</requirement>
-    </requirements>
-    <version_command>samtools --version | head -n 1 | awk '{ print $2 }'</version_command>
+<tool id="samtools_calmd" name="CalMD" version="2.0">
+  <description>recalculate MD/NM tags</description>
+  <macros>
+    <import>macros.xml</import>
+  </macros>
+  <expand macro="requirements"></expand>
+  <expand macro="stdio"></expand>
+  <expand macro="version_command"></expand>
     <command><![CDATA[
         #if str( $reference_source.reference_source_selector ) == "history":
             #set ref_fa = 'ref.fa'
@@ -17,15 +19,12 @@
         #end if
         -b "$input_bam" "$ref_fa" > "$calmd_output" ]]>
     </command>
-    <stdio>
-        <exit_code range="1:" level="fatal" description="Error" />
-    </stdio>
     <inputs>
         <param format="bam" name="input_bam" type="data" label="BAM file to recalculate" />
         <conditional name="reference_source">
-            <param name="reference_source_selector" type="select" label="Choose the source for the reference FASTA">
-                <option value="cached">Locally cached</option>
-                <option value="history">History</option>
+            <param name="reference_source_selector" type="select" label="Choose the source for the reference genome">
+                <option value="cached">Use a built-in genome</option>
+                <option value="history">Use a genome from the history</option>
             </param>
             <when value="cached">
                 <param name="ref_fasta" type="select" label="Using reference genome">
@@ -46,10 +45,10 @@
             </param>
             <when value="default" />
             <when value="advanced">
-                <param name="change_identical" type="boolean" truevalue="-e" falsevalue="" checked="False" label="Change identical bases to '='" />
-                <param name="modify_quality" type="boolean" truevalue="-A" falsevalue="" checked="False" label="Modify the quality string" />
-                <param name="compute_cap" type="boolean" truevalue="-r" falsevalue="" checked="False" label="Compute BQ or cap baseQ by BAQ" />
-                <param name="extended_baq" type="boolean" truevalue="-E" falsevalue="" checked="False" label="Extended BAQ for better sensitivity" />
+                <param name="change_identical" type="boolean" truevalue="-e" falsevalue="" checked="False" label="Change identical bases to '='" help="-e"/>
+                <param name="modify_quality" type="boolean" truevalue="-A" falsevalue="" checked="False" label="Modify the quality string" help="-A"/>
+                <param name="compute_cap" type="boolean" truevalue="-r" falsevalue="" checked="False" label="Compute BQ or cap baseQ by BAQ" help="-r"/>
+                <param name="extended_baq" type="boolean" truevalue="-E" falsevalue="" checked="False" label="Extended BAQ for better sensitivity" help="-E"/>
             </when>
         </conditional>
     </inputs>
@@ -59,52 +58,42 @@
     <tests>
         <test>
             <param name="option_sets" value="default" /> 
-            <param name="input_bam" value="phiX.bam" dbkey="phiX" />
-            <param name="reference_source|reference_source_selector" value="history" />
-            <param name="ref_fasta" value="phiX.fasta" dbkey="phiX" />
-            <output name="calmd_output" file="samtools_calmd_out_1.bam" ftype="bam" />
-        </test>
-        <!-- Using the test-data-repo's phiX.fa should produce the same output. -->
-        <test>
-            <param name="option_sets" value="default" /> 
-            <param name="input_bam" value="phiX.bam" dbkey="phiX" />
-            <param name="reference_source|reference_source_selector" value="cached" />
-            <param name="ref_fasta" value="phiX" />
+            <param name="input_bam" value="phiX.bam"/>
+            <param name="reference_source_selector" value="history" />
+            <param name="ref_fasta" value="phiX.fasta" />
             <output name="calmd_output" file="samtools_calmd_out_1.bam" ftype="bam" />
         </test>
         <test>
             <param name="option_sets" value="advanced" /> 
             <param name="change_identical" value="true" />
             <param name="extended_baq" value="true" />
-            <param name="input_bam" value="phiX.bam" dbkey="phiX" />
-            <param name="reference_source|reference_source_selector" value="history" />
-            <param name="ref_fasta" value="phiX.fasta" dbkey="phiX" />
-            <output name="calmd_output" file="samtools_calmd_out_2.bam" ftype="bam" />
-        </test>
-        <!-- Using the test-data-repo's phiX.fa should, as before, produce the same output. -->
-        <test>
-            <param name="option_sets" value="advanced" /> 
-            <param name="change_identical" value="true" />
-            <param name="extended_baq" value="true" />
-            <param name="input_bam" value="phiX.bam" dbkey="phiX" />
-            <param name="reference_source|reference_source_selector" value="cached" />
-            <param name="ref_fasta" value="phiX" />
+            <param name="input_bam" value="phiX.bam"/>
+            <param name="reference_source_selector" value="history" />
+            <param name="ref_fasta" value="phiX.fasta" />
             <output name="calmd_output" file="samtools_calmd_out_2.bam" ftype="bam" />
         </test>
     </tests>
     <help>
 **What it does**
 
-Generate the MD tag. If the MD tag is already present, this command will give a warning if the MD tag generated is different from the existing tag. Outputs a BAM file. 
+Generates the MD tag using ``samtools calmd`` command. If the MD tag (see SAM format refernce below for explanation of SAM/BAM tags) is already present, this command will give a warning if the MD tag generated is different from the existing tag. Outputs a BAM file. The command has the following options::
 
-------
+  -e       change identical bases to '='
+  -A       modify the quality string
+  -r       compute the BQ tag (without -A) or cap baseQ by BAQ (with -A)
+  -E       extended BAQ for better sensitivity but lower specificity
+  
+-----
 
-**Citation**
+**NM and MD tags**
 
-For the underlying tool, please cite `Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R; 1000 Genome Project Data Processing Subgroup. The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009 Aug 15;25(16):2078-9. &lt;http://www.ncbi.nlm.nih.gov/pubmed/19505943&gt;`_
-
+From SAM format specification::
 
-If you use this tool in Galaxy, please cite Blankenberg D, et al. *In preparation.*
+  MD (string)  String for mismatching positions. Regex : [0-9]+(([A-Z]|\^[A-Z]+)[0-9]+)*7
+  NM (indeger) Edit distance to the reference, including ambiguous bases but excluding clipping
+  
+See refernces for more information about SAM format tags.
 
-        </help>
+    </help>
+    <expand macro="citations"></expand>
 </tool>
--- a/tool-data/tool_data_table_conf.xml.sample	Mon Sep 29 12:16:47 2014 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<tables>
-    <table comment_char="#" name="fasta_indexes">
-        <columns>value, dbkey, name, path</columns>
-        <file path="/afs/bx.psu.edu/user/d/dave/workspace/CleanGalaxy/tool-data/gaius.bx.psu.edu/repos/devteam/sam_to_bam/e400768b0a91/fasta_indexes.loc" />
-    <tool_shed_repository><tool_shed>gaius.bx.psu.edu:9009</tool_shed><repository_name>sam_to_bam</repository_name><repository_owner>devteam</repository_owner><installed_changeset_revision>e400768b0a91</installed_changeset_revision></tool_shed_repository></table>
-
-<table comment_char="#" name="fasta_indexes">
-        <columns>value, dbkey, name, path</columns>
-        <file path="/afs/bx.psu.edu/user/d/dave/workspace/CleanGalaxy/tool-data/gaius.bx.psu.edu/repos/devteam/sam_to_bam/e400768b0a91/fasta_indexes.loc" />
-    <tool_shed_repository><tool_shed>gaius.bx.psu.edu:9009</tool_shed><repository_name>sam_to_bam</repository_name><repository_owner>devteam</repository_owner><installed_changeset_revision>e400768b0a91</installed_changeset_revision></tool_shed_repository></table>
-
-<table comment_char="#" name="fasta_indexes">
-        <columns>value, dbkey, name, path</columns>
-        <file path="/afs/bx.psu.edu/user/d/dave/workspace/CleanGalaxy/tool-data/gaius.bx.psu.edu/repos/devteam/sam_to_bam/e400768b0a91/fasta_indexes.loc" />
-    <tool_shed_repository><tool_shed>gaius.bx.psu.edu:9009</tool_shed><repository_name>sam_to_bam</repository_name><repository_owner>devteam</repository_owner><installed_changeset_revision>e400768b0a91</installed_changeset_revision></tool_shed_repository></table>
-
-<table comment_char="#" name="fasta_indexes">
-        <columns>value, dbkey, name, path</columns>
-        <file path="/afs/bx.psu.edu/user/d/dave/workspace/CleanGalaxy/tool-data/gaius.bx.psu.edu/repos/devteam/sam_to_bam/e400768b0a91/fasta_indexes.loc" />
-    <tool_shed_repository><tool_shed>gaius.bx.psu.edu:9009</tool_shed><repository_name>sam_to_bam</repository_name><repository_owner>devteam</repository_owner><installed_changeset_revision>e400768b0a91</installed_changeset_revision></tool_shed_repository></table>
-</tables>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Tue Oct 13 12:54:20 2015 -0400
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<tables>
+    <table comment_char="#" name="fasta_indexes">
+        <columns>value, dbkey, name, path</columns>
+        <file path="tool-data/fasta_indexes.loc" />
+    </table>
+</tables>
--- a/tool_dependencies.xml	Mon Sep 29 12:16:47 2014 -0400
+++ b/tool_dependencies.xml	Tue Oct 13 12:54:20 2015 -0400
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <tool_dependency>
-  <package name="samtools" version="1.1">
-	<repository changeset_revision="c01b111a243b" name="package_samtools_1_1" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
-  </package>
+    <package name="samtools" version="1.2">
+        <repository changeset_revision="192f00129358" name="package_samtools_1_2" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+    </package>
 </tool_dependency>