view merge_comparates_and_gen_headers_for_bayesian.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 source

<tool id="merge_comparates_and_gen_headers_for_bayesian" name="Merge Comparate Datasets and Generate Headers" version="21.1.13">
    <description>for Bayesian Analysis of Allelic Imbalance</description>
    <macros>
      <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command><![CDATA[
    mkdir outputs;
    cd outputs;
    merge_comparates_generate_bayesian_headers.py
    --output=`pwd`
    --collection_identifiers="${','.join($collection.keys())}"
    --collection_filenames="${','.join(map(str, $collection))}"
    --design=$design
]]></command>
    <inputs>
        <param name="collection" type="data_collection" collection_type="list" label="Collection of Comparate Datasets containing Prior Probability Estimates" help="Select the collection containing files to be merged. [Required]"/>
        <param name="design" type="data" format="tabular,tsv" label=" Comparate Design file" help="Select your Comparate Design file.  See below for correct formatting of this design file [Required]"/>
    </inputs>
    <outputs>
      <collection name="split_output" type="list" label="${tool.name} on ${on_string}: Merged Comparates with Headers">
        <discover_datasets pattern="(?P&lt;name&gt;bayesian_input_.*)" ext="tabular" sort_by="reverse_filename" directory="outputs" />
      </collection>
    </outputs>
    <tests>
        <test>
            <param name="design" value="bayesian_input/comparate_design_file.tsv" ftype="tsv"/>
            <param name="collection" value="merge_priors_testdata/merge_priors_to_comparate" ftype="data_collection"/>
            <output_collection name="split_output" type="list">
              <element name="FEATURE_ID">
                <assert_contents>
                  <has_text_matching expression="Merge_comparates_and_gen_headers"/>
                </assert_contents>
              </element>
             </output_collection>
        </test>
    </tests>
    <help><![CDATA[
**Tool Description**

The Merge Comparates and Generate Headers tool merges the comparate datasets containing the priors (generated by the Merge Priors tool) as specified in the Comparate Design File.
New headers are created by mapping the user-specified comparate names to a general variable.

**Inputs**

**Collection of Merged Prior to Comparate Files [REQUIRED]**

The collection of datasets containing summarized ASE Count Tables with Prior Estimates generated by the Merge Priors to Comparate tool.

Example of a merged prior to comparate file in the collection (W55_Mated)::

	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



**Comparate Design File [REQUIRED]**

This tool requires a Comparate Design File created by the user that contains the desired comparates to be tested.

**NOTE**:The Comparate Design File is created and supplied by the user. It explicitly lists the comparates that the user wants to compare.

The Comparate Design File must contain the following columns, in order::

    (1) Comparate_1: comparate 1 identifier (ex. W55_M)
    (2) Comparate_2: comparate 2 identifier (ex. W55_V)
    (3) CompID: An unique identifier that specifies the comparison (ex. W55_M_V)

An example design file:

    +-------------+-------------+--------+
    | Comparate_1 | Comparate_2 | compID |
    +=============+=============+========+
    | W55_M       | W55_V       | W55_M_V|
    +-------------+-------------+--------+

**Outputs**

    -This tool outputs the following:

A TSV file containing all comparates as defined in the Comparate Design File.

In the example below, the W55 Virgin and W55 Mated comparates are in a single file where c1=W55_Virgin and c2=W55_Mated. 

Example of Output::

    +-------------+-----------------+-------------------+--------------------+-----------------+-------------+------------------+-------------------+--------------------+------------------+-------------------------+---------------------+------------------+-------------------+--------------------+-------------------+--------------------------+------------------+--------------------+-------------------+--------------------+------------------+--------------+------------------+------------------+--------------------+-------------------+-------------------+------------------+-----------------+----------------------+---------------------+-------------------+-------------------------+-------------------+
    | Feature_ID  | prior_c1_both   | prior_c1_g1       | prior_c1_g2        | c1_flag_analyze | c1_num_reps | c1_g1_total_rep1 | c1_g2_total_rep1  | c1_both_total_rep1 | c1_flag_apn_rep1 | c1_APN_total_reads_rep1 | c1_APN_both_rep1    | c1_g1_total_rep2 | c1_g2_total_rep2  | c1_both_total_rep2 | c1_flag_apn_rep2  | c1_APN_total_reads_rep2  | c1_APN_both_rep2 |prior_c2_both       | prior_c2_g1       |  prior_c2_g2       | c2_flag_analyze  | c2_num_reps  | c2_g1_total_rep1 | c2_g2_total_rep1 | c2_both_total_rep1 | c2_flag_apn_rep1  | c2_flag_apn_rep1  | c2_APN_both_rep1 | c2_g1_total_rep2|  c2_g2_total_rep2    | c2_both_total_rep2  | c2_flag_apn_rep2  | c2_APN_total_reads_rep2 | c2_APN_both_rep2  |
    +-------------+-----------------+-------------------+--------------------+-----------------+-------------+------------------+-------------------+--------------------+------------------+-------------------------+---------------------+------------------+-------------------+--------------------+-------------------+--------------------------+------------------+--------------------+-------------------+--------------------+------------------+--------------+------------------+------------------+--------------------+-------------------+-------------------+------------------+-----------------+----------------------+---------------------+-------------------+-------------------------+-------------------+
    |l(1)G1096    |0.799907266902715| 0.118361153262519 | 0.0817315798347665 |        1        |       2     |        295       |         234       |        2197        |         1        |     12.7234208727912    | 10.2551010446158    |        1885      |        1165       |        12201       |         1         | 71.2019427901982         | 56.9617787757493 | 0.802196053469128  | 0.114417568427753 | 0.0833863781031191 |         1        |       2      |        691       |        519       |         5020       |         1         | 29.0734648052328  | 23.4243873865079 |      1075       |           812        |         7481        |          1        | 43.7266913990042        | 34.9168212437762  |
    +-------------+-----------------+-------------------+--------------------+-----------------+-------------+------------------+-------------------+--------------------+------------------+-------------------------+---------------------+------------------+-------------------+--------------------+-------------------+--------------------------+------------------+--------------------+-------------------+--------------------+------------------+--------------+------------------+------------------+--------------------+-------------------+-------------------+------------------+-----------------+----------------------+---------------------+-------------------+-------------------------+-------------------+
    | CG10932     |0.853881278538813| 0.0597412480974125| 0.0863774733637747 |        1        |       2     |         13       |          39       |         308        |         1        |     5.06815839835124    | 4.33534520830266    |         100      |         134       |         1394       |         1         | 22.9213896658325         | 19.6266745178861 | 0.866028708133971  | 0.0344497607655502| 0.0995215311004785 |         1        |       2      |         29       |         62       |          674       |         1         | 10.3878993081113  | 9.10716914470779 |        38       |           125        |          920        |          1        |  15.2470189901369       | 12.9534815250994  |
    +-------------+-----------------+-------------------+--------------------+-----------------+-------------+------------------+-------------------+--------------------+------------------+-------------------------+---------------------+------------------+-------------------+--------------------+-------------------+--------------------------+------------------+--------------------+-------------------+--------------------+------------------+--------------+------------------+------------------+--------------------+-------------------+-------------------+------------------+-----------------+----------------------+---------------------+-------------------+-------------------------+-------------------+
    | CG8920      |0.808955223880597| 0.123383084577114 | 0.0676616915422886 |        1        |       2     |         93       |          20       |         500        |         1        |     39.4720538720539    | 32.1912457912458    |         347      |         257       |         2633       |         1         | 208.422222222222         | 169.53063973064  | 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>