diff merge_priors_to_comparate.xml @ 0:e979cb57a5d5 draft default tip

"planemo upload for repository https://github.com/McIntyre-Lab/BayesASE/tree/main/galaxy commit 9b70598ef46a73632d9e0fa0c6ce6776fb5e9d6a"
author malex
date Thu, 14 Jan 2021 21:51:36 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/merge_priors_to_comparate.xml	Thu Jan 14 21:51:36 2021 +0000
@@ -0,0 +1,121 @@
+<tool id="merge_priors_to_comparate" name="Merge priors to comparate" version="21.1.13">
+    <description>merges filtered/summarized ASE Counts tables to the Calculated Prior values </description>
+    <macros>
+      <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command><![CDATA[
+    mkdir outputs;
+    cd outputs;
+    merge_priors_to_comparate.py
+    --design=$design
+    --collection1_identifiers="${",".join($collection1.keys())}"
+    --collection1_filenames="${",".join(map(str, $collection1))}"
+    --collection2_identifiers="${",".join($collection2.keys())}"
+    --collection2_filenames="${",".join(map(str, $collection2))}"
+    --out=`pwd`
+]]></command>
+    <inputs>
+        <param name="design" type="data" format="tabular,tsv" label="Priors Design file" help="Enter the Priors Design file generated from the Reformat Sample Design file; formatting is shown below"/>
+        <param name="collection1" type="data_collection" collection_type="list" label="Summarized and Filtered ASE Count Table Collection" help="Select the collection containing input filtered ASE count tables per comparate"/>
+        <param name="collection2" type="data_collection" collection_type="list" label="Calculated Priors Collection" help="Select the collection containing the Prior Probability Estimates for a given comparate"/>
+    </inputs>
+    <outputs>
+      <collection name="split_output" type="list" label="${tool.name} on ${on_string}: Merge Priors to Comparate">
+        <discover_datasets pattern="(?P&lt;name&gt;bayesian.*)" ext="tabular" directory="outputs" />
+      </collection>
+    </outputs>
+    <tests>
+        <test>
+            <param name="design" value="summarize_counts_testdata/priors_design_file.tsv" ftype="tsv"/>
+            <param name="collection1" value="summarize_counts_testdata/summarized_and_filtered_ASE_counts_tables_BASE" ftype="data_collection"/>
+            <param name="collection2" value="calculated_priors_BASE_testdata" ftype="data_collection"/>
+            <output_collection name="split_output" type="list">
+              <element name="FEATURE_ID">
+                <assert_contents>
+                  <has_text_matching expression="Merge_prior_to_comparate_test_data"/>
+                </assert_contents>
+              </element>
+             </output_collection>
+        </test>
+    </tests>
+    <help><![CDATA[
+**Tool Description**
+
+The Merge Priors to Comparate tool merges the files containing calculated prior probability estimates to the summarized and filtered ASE Counts tables for each comparate specified in the Comparate Design File.
+The files are merged on the FEATURE_ID columns.
+Therefore, the FEATURE_ID columns in the Summarized and Filtered ASE Counts Tables must be identical and in the same order as those in the Calculated Priors files.
+The tool outputs one file per comparate.
+
+**NOTE**:  FEATURE_IDs in the Summarized/Filtered ASE Counts Tables must match those in the Calculated Prior file and be in the same order
+
+**Inputs**
+
+(1) **Prior Design File [REQUIRED]** 
+
+The Prior Design File must contain the following columns in the exact order::
+
+    1. G1- name of updated parental genome 1
+    2. G2- name of the updated parental genome 2
+    3. comparate- comparate condition
+
+
+Example of a Prior Design File::
+
+    +-------+------+---------+
+    |   G1  |  G2  |comparate|
+    +-------+------+---------+
+    | W1118 | W55  | W55_M   |
+    +-------+------+---------+
+    | W1118 | W55  | W55_V   |
+    +-------+------+---------+
+
+(2) **Collection of Summarized and Filtered ASE Counts Tables [REQUIRED]**
+
+These files can be made using the *Combine Counts Table* tool followed by the *Summarize ASE Count Tables* tool
+
+An example ASE count table ::
+
+	FEATURE_ID	g1	g2	W55_M_flag_analyze     W55_M_num_reps   	W55_M_g1_total_rep1     	W55_M_g2_total_rep1     	W55_M_both_total_rep1       	W55_M_flag_apn_rep1     	W55_M_APN_total_reads_rep1	W55_M_APN_both_rep1	W55_M_g1_total_rep2     	W55_M_g2_total_rep2     	W55_M_both_total_rep2   	W55_M_flag_apn_rep2     	W55_M_APN_total_reads_rep2      	W55_M_APN_both_rep2
+	l(1)G0196	W1118	W55	1    			2			691				519				5020 	        		1   				29.073464805232			23.4243873865079		1075				812				7481				1			43.7266913990042		        34.9168212437762
+	CG8920  	W1118	W55  	1			2			29				 62				 647    			1				10.3878993081113		9.10716914470779		38				126				920				1			15.2470189901369		        12.9534815250994
+	CG10932 	W1118	W55 	1			2			163				122		                1112		    		1				89.9299663299663		71.5858585858586		237				134				1881				1			144.974410774411	            	121.086195286195
+
+
+(3) **Collection of files with Calculated Prior Estimates [REQUIRED]**
+
+A collection containing Calculated Prior Estimates for each of the comparates. These files can be created using the *Calculate Prior Probabilities* tool.
+
+
+An example prior file (W55_M_prior)::
+
+	FEATURE_ID	prior_W55_M_both	prior_W55_M_g1	prior_W55_M_g2
+	l(1)G0196	0.802196053		0.114417568	0.083386378
+	CG10932		0.866028708		0.034449761	0.099521531
+	CG8920		0.821591949		0.1084172	0.069990851
+	Mapmodulin	0.904654394		0.076762765	0.018582841
+
+
+**Outputs**
+
+(1) **A TSV file containing the prior probability estimates and the summarized ASE counts for a given comparate.**
+
+Example output for comparate W55_M::
+
+	FEATURE_ID	prior_W55_M_both	prior_W55_M_g1             prior_W55_M_g2	W55_M_flag_analyze     W55_M_num_reps   	W55_M_g1_total_rep1     	W55_M_g2_total_rep1     	W55_M_both_total_rep1       	W55_M_flag_apn_rep1     	W55_M_APN_total_reads_rep1	W55_M_APN_both_rep1	W55_M_g1_total_rep2     	W55_M_g2_total_rep2     	W55_M_both_total_rep2   	W55_M_flag_apn_rep2     	W55_M_APN_total_reads_rep2     	W55_M_APN_both_rep2
+	l(1)G0196	0.802196053469128	0.114417568427753         0.0833863781031191	1    	        	2			691				519				5020 	        		1   				29.073464805232			23.4243873865079		1075				812				7481				1			43.7266913990042		34.9168212437762
+	CG8920  	0.866028708133971	0.0344497607655502        0.0995215311004785	1			2			29				 62				 647    			1				10.3878993081113		9.10716914470779		38				126				920				1			15.2470189901369		12.9534815250994
+	CG10932 	0.821591948764867	0.108417200365965         0.0699908508691674	1			2			163				122		                1112		    		1				89.9299663299663		71.5858585858586		237				134				1881				1 			144.974410774411		121.086195286195
+
+
+
+    ]]></help>
+    <citations>
+            <citation type="bibtex">@ARTICLE{Miller20BASE,
+            author = {Brecca Miller, Alison M. Morse, Elyse Borgert, Zihao Liu, Kelsey Sinclair, Gavin Gamble, Fei Zou, Jeremy Newman, Luis Leon Novello, Fabio Marroni, Lauren M. McIntyre},
+            title = {Testcrosses are an efficient strategy for identifying cis regulatory variation: Bayesian analysis of allele imbalance among conditions (BASE)},
+            journal = {????},
+            year = {submitted for publication}
+            }</citation>
+        </citations>
+</tool>