view chicDifferentialTest.xml @ 0:fa6fc09ba259 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 3b41d687ff30583540d055f6995de00530cca81d-dirty"
author bgruening
date Mon, 16 Dec 2019 14:36:01 -0500
parents
children 1e52af48d34e
line wrap: on
line source

<tool id="hicexplorer_chicdifferentialtest" name="@BINARY@" version="@WRAPPER_VERSION@.0">
    <description>computes differential interactions of viewpoints</description>
    <macros>
        <token name="@BINARY@">chicDifferentialTest</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[
        #import re

        mkdir interactionFiles &&
        mkdir differentialFolder &&

        #for $file in $interactionFiles:
            #set identifier = @ESCAPE_IDENTIFIER_FILE@
            ln -s '$file' 'interactionFiles/$identifier' &&
        #end for

        #if $batchmode_conditional.batchmode_selector == 'optionSinglemode':
            #set $interactonfileslist = ' '.join([ '\'interactionFiles/%s\'' % @ESCAPE_IDENTIFIER_FILE@ for $file in $interactionFiles ])
        #end if
        @BINARY@
            #if $batchmode_conditional.batchmode_selector == 'optionSinglemode':
                --interactionFile $interactonfileslist
            #else:
                --interactionFile $batchmode_conditional.interactionFilesOrderFile
                --interactionFileFolder interactionFiles
                --batchMode
                --rejectedFileNamesToFile rejected_H0.txt
            #end if
            --statisticTest $statisticTest_selector
            --alpha $alpha
            --outputFolder differentialFolder
            --threads @THREADS@
    ]]></command>
    <inputs>
        <param name='interactionFiles' type="data" format="interval" label="Interaction files" multiple="true"/>

        <conditional name="batchmode_conditional">
            <param name="batchmode_selector" type="select" label="Compute files individually or in batch mode">
                <option value="optionBatchmode">Batch processing</option>
                <option value="optionSinglemode" selected="True">Single file processing</option>
            </param>
            <when value="optionBatchmode">
                <param name='interactionFilesOrderFile' type="data" format="txt" label="Interaction file order"/>
            </when>
            <when value="optionSinglemode">              
            </when>
        </conditional>
        <param name='alpha' type="float" value='2.0' label="Alpha" help='Accept all samples to significance level alpha.'/> 
        <param name="statisticTest_selector" type="select" label="Statistical test">
                <option value="fisher" selected="True">Fisher exact</option>
                <option value="chi2">Chi2 contingency</option>
        </param>    
    </inputs>
    <outputs>
        <collection name="differentialFolderCollection" type="list" label="Differential test files">
            <discover_datasets pattern="__name__" format="interval"  directory="differentialFolder" />
        </collection>
        <data name="rejectedFileNames" from_work_dir="rejected_H0.txt" format="txt" label="${tool.name} rejected H0">
            <filter>batchmode_conditional.batchmode_selector == 'optionBatchmode'</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="interactionFiles" value="cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_14300280_14300280_Eya1_aggregated.bed,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_14300280_14300280_Eya1_aggregated.bed,cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_4487435_4487435_Sox17_aggregated.bed,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_4487435_4487435_Sox17_aggregated.bed,cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d_aggregated.bed,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_aggregated.bed"/>
            
            <conditional name="batchmode_conditional">
                <param name="batchmode_selector" value='optionBatchmode'/>
                <param name="interactionFilesOrderFile" value='cHi-C/chicAggregateStatistic/batch_mode_file_names.txt'/>
            </conditional>
            <param name="statisticTest_selector" value='chi2'/>
            <param name="alpha" value='0.5'/>
            <output_collection name="differentialFolderCollection" type="list" count="9">
                <element name="FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_H0_accepted.bed" file="cHi-C/chicDifferentialTest/batch_mode_chi2/FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_H0_accepted.bed" ftype="interval" lines_diff="4"/>
                <element name="FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_H0_rejected.bed" file="cHi-C/chicDifferentialTest/batch_mode_chi2/FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_H0_rejected.bed" ftype="interval" lines_diff="4"/>
                <element name="FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_results.bed" file="cHi-C/chicDifferentialTest/batch_mode_chi2/FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_results.bed" ftype="interval" lines_diff="4"/>


                <element name="FL-E13-5_MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_H0_accepted.bed" file="cHi-C/chicDifferentialTest/batch_mode_chi2/FL-E13-5_MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_H0_accepted.bed" ftype="interval" lines_diff="4"/>
                <element name="FL-E13-5_MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_H0_rejected.bed" file="cHi-C/chicDifferentialTest/batch_mode_chi2/FL-E13-5_MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_H0_rejected.bed" ftype="interval" lines_diff="4"/>
                <element name="FL-E13-5_MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_results.bed" file="cHi-C/chicDifferentialTest/batch_mode_chi2/FL-E13-5_MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_results.bed" ftype="interval" lines_diff="4"/>
               
                <element name="FL-E13-5_MB-E10-5_chr1_chr1_4487435_4487435_Sox17_H0_accepted.bed" file="cHi-C/chicDifferentialTest/batch_mode_chi2/FL-E13-5_MB-E10-5_chr1_chr1_4487435_4487435_Sox17_H0_accepted.bed" ftype="interval" lines_diff="4"/>
                <element name="FL-E13-5_MB-E10-5_chr1_chr1_4487435_4487435_Sox17_H0_rejected.bed" file="cHi-C/chicDifferentialTest/batch_mode_chi2/FL-E13-5_MB-E10-5_chr1_chr1_4487435_4487435_Sox17_H0_rejected.bed" ftype="interval" lines_diff="4"/>
                <element name="FL-E13-5_MB-E10-5_chr1_chr1_4487435_4487435_Sox17_results.bed" file="cHi-C/chicDifferentialTest/batch_mode_chi2/FL-E13-5_MB-E10-5_chr1_chr1_4487435_4487435_Sox17_results.bed" ftype="interval" lines_diff="4"/>
            
            </output_collection>

            <output name="rejectedFileNames" file="cHi-C/chicDifferentialTest/rejectedFilesList.txt" ftype="txt" compare="sim_size" delta='40000'/>
        </test>
        <test>
            <param name="interactionFiles" value="cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_14300280_14300280_Eya1_aggregated.bed,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_14300280_14300280_Eya1_aggregated.bed"/>
            
            <conditional name="batchmode_conditional">
                <param name="batchmode_selector" value='optionSinglemode'/>
            </conditional>
            <param name="statisticTest_selector" value='fisher'/>
            <param name="alpha" value='0.5'/>

            <output_collection name="differentialFolderCollection" type="list" count="3">
                <element name="FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_H0_accepted.bed" file="cHi-C/chicDifferentialTest/regular_mode_fisher/FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_H0_accepted.bed" ftype="interval" lines_diff="4"/>
                <element name="FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_H0_rejected.bed" file="cHi-C/chicDifferentialTest/regular_mode_fisher/FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_H0_rejected.bed" ftype="interval" lines_diff="4"/>
                <element name="FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_results.bed" file="cHi-C/chicDifferentialTest/regular_mode_fisher/FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_results.bed" ftype="interval" lines_diff="4"/>
            </output_collection>
        </test>
    </tests>
    <help><![CDATA[

Differential testing of two viewpoints
======================================

chicDifferentialTest tests if two locations under consideration of the reference point have a different interaction count. For this either Fisher's test or chi2 contingency test can be used.
The files that are accepted for this test can be created with `chicAggregateStatistic`. H0 is assuming the interactions are not different. Therefore the differential interaction counts are all where H0 was rejected.


For more information about HiCExplorer please consider our documentation on readthedocs.io_

.. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html
]]></help>
    <expand macro="citations" />
</tool>