diff mageck_mle.xml @ 4:b34c9d6373e0 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mageck commit 4478aabdcb10e4787450b1b23944defa7dc38ffe
author iuc
date Mon, 04 Jun 2018 10:58:04 -0400
parents 9cd937788131
children
line wrap: on
line diff
--- a/mageck_mle.xml	Thu Apr 19 05:34:53 2018 -0400
+++ b/mageck_mle.xml	Mon Jun 04 10:58:04 2018 -0400
@@ -46,10 +46,12 @@
     --adjust-method $adv.adjust_method
 #end if
 
-#if $adv.sgrnaeff_file:
-    --sgrna-efficiency $adv.sgrnaeff_file
-    --sgrna-eff-name-column $adv.sgrnaid_col
-    --sgrna-eff-score-column $adv.sgrnaeff_col
+#if $adv.sgrnaeff.sgrnaeff_file_select == "yes":
+    #set $nindex = int(str($adv.sgrnaeff.sgrnaeff_name_col)) - 1
+    #set $sindex = int(str($adv.sgrnaeff.sgrnaeff_score_col)) - 1
+    --sgrna-efficiency $adv.sgrnaeff.sgrnaeff_file
+    --sgrna-eff-name-column $nindex
+    --sgrna-eff-score-column $sindex
 #end if
 
 $adv.remove_outliers
@@ -98,9 +100,18 @@
                 <option value="holm">Holm</option>
                 <option value="pounds">Pounds</option>
             </param>
-            <param name="sgrnaeff_file" argument="--sgrna-efficiency" type="data" format="tabular" optional="true" label="sgRNA efficiency file" help="An optional file of sgRNA efficiency prediction. The efficiency prediction will be used as an initial guess of the probability an sgRNA is efficient. Must contain at least two columns, one containing sgRNA ID, the other containing sgRNA efficiency prediction" />
-            <param name="sgrnaeff_name_col" argument="--sgrna-eff-score-column" type="data_column" data_ref="sgrnaeff_file" value="1" optional="true" label="sgRNA score column" help="The sgRNA efficiency prediction column in sgRNA efficiency prediction file (specified by the --sgrna-efficiency option). Default is 1 (the second column)." />
-            <param name="sgrnaeff_score_col" argument="--sgrna-eff-name-column" type="data_column" data_ref="sgrnaeff_file" value="0" optional="true" label="sgRNA ID column" help="The sgRNA ID column in sgRNA efficiency prediction file (specified by the --sgrna-efficiency option). Default is 0 (the first column)" />
+            <conditional name="sgrnaeff">
+                <param name="sgrnaeff_file_select" type="select" label="Incorporate sgRNA efficiency" help="Optionally sgRNA efficiency information can be incorporated into the analysis. See the MAGeCK website here for more information: https://sourceforge.net/p/mageck/wiki/Home/#tutorial-3-include-the-sgrna-efficiency-into-mle-calculation">
+                    <option value="yes">Yes</option>
+                    <option value="no" selected="True">No</option>
+                </param>
+                <when value="yes">
+                    <param name="sgrnaeff_file" argument="--sgrna-efficiency" type="data" format="tabular" label="sgRNA efficiency file" help="A file of sgRNA efficiency prediction from the SSC program. The efficiency prediction will be used as an initial guess of the probability an sgRNA is efficient. Must contain at least two columns, one containing sgRNA ID, the other containing sgRNA efficiency prediction." />
+                    <param name="sgrnaeff_name_col" argument="--sgrna-eff-name-column" type="data_column" data_ref="sgrnaeff_file" value="1" label="sgRNA ID column" help="The sgRNA ID column in sgRNA efficiency prediction file (specified by the --sgrna-efficiency option). Default is 1 (the first column)" />
+                    <param name="sgrnaeff_score_col" argument="--sgrna-eff-score-column" type="data_column" data_ref="sgrnaeff_file" value="2" label="sgRNA score column" help="The sgRNA efficiency prediction column in sgRNA efficiency prediction file (specified by the --sgrna-efficiency option). Default is 2 (the second column)." />
+                </when>
+                <when value="no"/>
+            </conditional>
             <param name="update_eff" argument="--update-efficiency" type="boolean" truevalue="--update-efficiency" falsevalue="" checked="false" optional="true"
                 label="Update efficiency" help="Iteratively update sgRNA efficiency during EM iteration" />
             <param name="out_log" type="boolean" truevalue="True" falsevalue="" checked="false"
@@ -119,10 +130,40 @@
             <param name="count_table" value="demo/demo1/sample.txt" ftype="tabular" />
             <param name="design_matrix" ftype="tabular" value="in.mle.design_matrix.txt" />
             <param name="out_log" value="True"/>
-            <output name="gene_summary" file="out.mle.gene_summary.txt" compare="sim_size"/>
-            <output name="sgrna_summary" file="out.mle.sgrna_summary.txt"/>
+            <output name="gene_summary">
+                <assert_contents>
+                    <has_text_matching expression="Gene.*sgRNA.*beta.*z.*p-value.*fdr.*wald-p-value.*wald-fdr.*beta.*p-value.*fdr.*wald-p-value.*wald-fdr" />
+                    <has_text_matching expression="A1CF.*10.*0.05018.*0.3479.*0.7278.*0.8665.*0.0927.*0.6435.*0.5198.*0.8170"/>
+                </assert_contents>
+            </output>
+            <output name="sgrna_summary">
+                <assert_contents>
+                    <has_text_matching expression="Gene.*sgRNA.*eff" />
+                    <has_text_matching expression="ADNP2.*ADNP2_m77891006.*1"/>
+                </assert_contents>
+            </output>
             <output name="log" file="out.mle.log.txt" compare="sim_size"/>
         </test>
+        <test><!-- Ensure sgRNA efficiency file works -->
+            <param name="count_table" value="demo/demo1/sample.txt" ftype="tabular" />
+            <param name="design_matrix" ftype="tabular" value="in.mle.design_matrix.txt" />
+            <param name="sgrnaeff_file_select" value="yes"/>
+            <param name="sgrnaeff_file" value="in.mle.sgrnaeff"/>
+            <param name="sgrnaeff_name_col" value="2"/>
+            <param name="sgrnaeff_score_col" value="4"/>
+            <output name="gene_summary">
+                <assert_contents>
+                    <has_text_matching expression="Gene.*sgRNA.*beta.*z.*p-value.*fdr.*wald-p-value.*wald-fdr.*beta.*p-value.*fdr.*wald-p-value.*wald-fdr" />
+                    <has_text_matching expression="A1CF.*10.*0.05018.*0.3479.*0.7278.*0.8665.*0.0927.*0.6435.*0.5198.*0.8252"/>
+                </assert_contents>
+            </output>
+            <output name="sgrna_summary">
+                <assert_contents>
+                    <has_text_matching expression="Gene.*sgRNA.*eff" />
+                    <has_text_matching expression="ADNP2.*ADNP2_m77891006.*0.646"/>
+                </assert_contents>
+            </output>
+        </test>
     </tests>
 
     <help><![CDATA[