diff mismatch_frequencies.xml @ 24:6590be3f8e3f draft

planemo upload for repository https://bitbucket.org/drosofff/gedtools/
author mvdbeek
date Sun, 24 May 2015 11:36:31 -0400
parents ca7b7890ed20
children 1088aadcb5f9
line wrap: on
line diff
--- a/mismatch_frequencies.xml	Sun May 24 17:33:33 2015 +0200
+++ b/mismatch_frequencies.xml	Sun May 24 11:36:31 2015 -0400
@@ -1,11 +1,11 @@
-<tool id="mismatch_frequencies" name="Mismatch Frequencies" version="0.0.3" hidden="false" >
-	<description>Analyze mismatch frequencies in BAM/SAM alignments</description>
-        <requirements>
-    	    <requirement type="package" version="0.7.7">pysam</requirement>
-    	    <requirement type="package" version="0.14">pandas</requirement>
-    	    <requirement type="package" version="1.4">matplotlib</requirement>
-        </requirements>
-	<command interpreter="python">mismatch_frequencies.py --input 
+<tool id="mismatch_frequencies" name="Mismatch Frequencies" version="0.0.9" hidden="false" >
+  <description>Analyze mismatch frequencies in BAM/SAM alignments</description>
+  <requirements>
+    <requirement type="package" version="0.7.7">pysam</requirement>
+    <requirement type="package" version="0.14.1">pandas</requirement>
+    <requirement type="package" version="1.2.1">matplotlib</requirement>
+  </requirements>
+  <command interpreter="python">mismatch_frequencies.py --input 
 		#for i in $rep
 			"$i.input_file" 
 		#end for
@@ -17,20 +17,73 @@
                  --n_mm $number_of_mismatches
                  --five_p $five_p
                  --three_p $three_p
-        </command>
-	<inputs>
-            <repeat name="rep" title="alignment files">
-        	<param name="input_file" type="data" format="bam,sam" label="Alignment file" help="The input alignment file(s) for which to analyze the mismatches."/>
-            </repeat>
-          <param name="number_of_mismatches" label="Maximum number of allowed mismatches per read" help="Discard reads with more than the chosen number of mismatches from the frequency calculation" type="integer" value="3"/>
-          <param name="min_length" label="Minumum read length to analyse" type="integer" value="21"/>
-	  <param name="max_length" label="Maximum read length to analyse" type="integer" value="21"/>
-	  <param name="five_p" label="Ignore mismatches in the first N nucleotides of a read" type="integer" value="0"/>
-	  <param name="three_p" label="Ignore mismatches in the last N nucleotides of a read" help="useful to discriminate between tailing events and editing events" type="integer" value="3"/>
-	</inputs>
-        <outputs>
-                <data format="pdf" name="output_pdf" />
-                <data format="tabular" name="output_tab" />
-        </outputs>
+                 --expanded_output_tab $expanded_tab
+                 --possible_mismatches $possible_mismatches
+  </command>
+  <inputs>
+    <repeat name="rep" title="alignment files">
+      <param name="input_file" type="data" format="bam,sam" label="Alignment file" help="The input alignment file(s) for which to analyze the mismatches."/>
+    </repeat>
+    <param name="number_of_mismatches" label="Maximum number of allowed mismatches per read" help="Discard reads with more than the chosen number of mismatches from the frequency calculation" type="integer" value="3"/>
+    <param name="possible_mismatches" label="Specify mismatches that should be counted" help="Ignores mismatches that are not listed" type="text" value="AC AG AT CA CG CT GA GC GT TA TC TG">
+      <validator type="expression" message="Allowed values are AGCTN, seperated by space.">len([False for char in value if not char in " AGCTN"]) == 0</validator>
+    </param>
+    <param name="min_length" label="Minumum read length to analyse" type="integer" value="21"/>
+    <param name="max_length" label="Maximum read length to analyse" type="integer" value="21"/>
+    <param name="five_p" label="Ignore mismatches in the first N nucleotides of a read" type="integer" value="0"/>
+    <param name="three_p" label="Ignore mismatches in the last N nucleotides of a read" help="useful to discriminate between tailing events and editing events" type="integer" value="3"/>
+    <param help="Output expanded tabular format" label="Nucleotide mismatches per reference sequence" name="expanded" type="select">
+        <option select="true" value="false">No</option>
+        <option value="expanded">Yes</option>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="tabular" name="output_tab" />
+    <data format="fasta" name="expanded_tab">
+        <filter> expanded == "expanded"</filter>
+    </data>
+    <data format="pdf" name="output_pdf" />
+  </outputs>
+  <tests>
+    <test>
+      <param name="rep_0|input_file" value="3mismatches_ago2ip_s2.bam" ftype="bam" />
+      <param name="rep_1|input_file" value="3mismatches_ago2ip_ovary.bam" ftype="bam" />
+      <param name="number_of_mismatches" value="1" />
+      <param name="min_length" value="21" />
+      <param name="max_length" value="21" />
+      <param name="three_p" value="0" />
+      <param name="five_p" value="0" />
+      <output name="tabular" file="mismatch.tab" ftype="tabular"/>
+    <!--
+      <output name="pdf" file="mismatch.pdf" ftype="pdf"/>
+    -->
+    </test>
+  </tests>
+  <help>
 
+.. class:: infomark
+
+
+***What it does***
+
+This tool reconstitues for each aligned read of an alignment file in SAM/BAM format whether
+a mismatch is annotated in the MD tag, and if that is the case counts the identity of the 
+mismatch relative to the reference sequence. The output is a PDF document with the calculated
+frequency for each mismatch that occured relative to the total number of valid reads and a table
+with the corresponding values. Read length can be limited to a specific read length, and 5 prime and 
+3 prime-most nucleotides of a read can be ignored.
+
+----
+
+.. class:: warningmark
+
+***Warning***
+
+This tool skips all read that have insertions and has been tested only with bowtie and bowtie2
+generated alignment files.
+
+Written by Marius van den Beek, m.vandenbeek at gmail . com
+  </help>
+  <citations>
+  </citations>
 </tool>