view chicViewpoint.xml @ 1:68c92dfd03d7 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 5744259254d4254a29cb7a6687fbbfd103301064"
author bgruening
date Wed, 05 Feb 2020 19:38:12 -0500
parents 6d76e532b669
children 0dabfd9a496b
line wrap: on
line source

<tool id="hicexplorer_chicviewpoint" name="@BINARY@" version="@WRAPPER_VERSION@.0">
    <description>computes viewpoints with the given reference points and a background model.</description>
    <macros>
        <token name="@BINARY@">chicViewpoint</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[
        #import re

        mkdir interactionFiles &&
        #for $m in $matrix_h5_cooler_multiple:
            #set identifier = @ESCAPE_IDENTIFIER_M@
            ln -s '$m' '$identifier' &&
        #end for
        #set $m = ' '.join([ '\'%s\'' % @ESCAPE_IDENTIFIER_MATRIX@ for $matrix in $matrix_h5_cooler_multiple ])
       
        @BINARY@

            --matrices $m
            --range $rangeUpstream $rangeDownstream
            --referencePoints '$referencePoints'
            --averageContactBin $averageContactBin
            --fixateRange $fixateRange
            --threads @THREADS@
            --backgroundModelFile '$backgroundModelFile'
            --outputFolder interactionFiles
            $writeFileNamesToFile

    ]]></command>
    <inputs>
        <expand macro="matrix_h5_cooler_multiple_macro" />

        <param argument="--referencePoints" type="data" format='interval'
                        label="Reference points"
                        help="Bed file contains all reference points which should be used to create viewpoints." />
        <param name="rangeUpstream" type="integer" value="500000"  label="Upstream range" help='Defines the region upstream of a reference point which should be considered in the analysis.' />
        <param name="rangeDownstream" type="integer" value="500000"  label="Downstream range" help='Defines the region upstream of a reference point which should be considered in the analysis.' />   

        <param argument="--backgroundModelFile" type="data" format='tabular'
                        label="Background model"
                        help="The background file computed by chicViewpointBackgroundModel" />
        <param argument="--averageContactBin" type="integer" value="5"  label="Average contacts window size" help='Average the contacts of n bins via a sliding window approach.'/>    
        <param argument="--fixateRange" type="integer" value="500000"  label="Clip background distance" help='Fixate score of background model starting at distance x. E.g. all values greater 500kb are set to the value of the 500kb bin.'/>    
        <param name='writeFileNamesToFile' type='boolean' truevalue='--writeFileNamesToFile interactionFiles.txt'  falsevalue="" checked="false" label="Save interaction file names (batch processing)"
                    help="Set this parameter if you want to use the batch processing mode for the further analysis."/>
    </inputs>
    <outputs>
        <collection name="interactionFilesCollection" type="list" label="Interaction files">
            <discover_datasets pattern="__name__" format="interval"  directory="interactionFiles" />
        </collection>
        <data name="interactionFileNames" from_work_dir="interactionFiles.txt" format="txt" label="${tool.name} interaction file names">
            <filter>writeFileNamesToFile</filter>
        </data>
    </outputs>
    <tests>
        <test>
           <param name="matrix_h5_cooler_multiple" value="cHi-C/FL-E13-5_chr1.cool,cHi-C/MB-E10-5_chr1.cool"/>
            
            <param name="referencePoints" value="cHi-C/referencePoints_chicViewpoint.bed"/>
            <param name="backgroundModelFile" value="cHi-C/background.bed"/>
            <param name="fixateRange" value="500000"/>
            <param name="rangeUpstream" value="200000"/>
            <param name="rangeDownstream" value="200000"/>
            <param name="writeFileNamesToFile" value="True"/>

           
            <output_collection name="interactionFilesCollection" type="list" count="6">
                <element name="FL-E13-5_chr1_chr1_14300280_14300280_Eya1.bed" file="cHi-C/chicViewpoint/output_3/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.bed" ftype="interval" lines_diff="3"/>
                <element name="FL-E13-5_chr1_chr1_4487435_4487435_Sox17.bed" file="cHi-C/chicViewpoint/output_3/FL-E13-5_chr1_chr1_4487435_4487435_Sox17.bed" ftype="interval" lines_diff="3"/>
                <element name="FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d.bed" file="cHi-C/chicViewpoint/output_3/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d.bed" ftype="interval" lines_diff="3"/>

                <element name="MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d.bed" file="cHi-C/chicViewpoint/output_3/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d.bed" ftype="interval" lines_diff="3"/>
                <element name="MB-E10-5_chr1_chr1_14300280_14300280_Eya1.bed" file="cHi-C/chicViewpoint/output_3/MB-E10-5_chr1_chr1_14300280_14300280_Eya1.bed" ftype="interval" lines_diff="3"/>
                <element name="MB-E10-5_chr1_chr1_4487435_4487435_Sox17.bed" file="cHi-C/chicViewpoint/output_3/MB-E10-5_chr1_chr1_4487435_4487435_Sox17.bed" ftype="interval" lines_diff="3"/>
            </output_collection>
            <output name="interactionFileNames" file="cHi-C/chicViewpoint/fileNames_two_matrices.txt" ftype="txt" lines_diff='0'/>
            
        </test>
        <test>
           <param name="matrix_h5_cooler_multiple" value="cHi-C/FL-E13-5_chr1.cool,cHi-C/MB-E10-5_chr1.cool"/>
            
            <param name="referencePoints" value="cHi-C/referencePoints_chicViewpoint.bed"/>
            <param name="backgroundModelFile" value="cHi-C/background.bed"/>
            <param name="fixateRange" value="500000"/>
            <param name="rangeUpstream" value="200000"/>
            <param name="rangeDownstream" value="200000"/>
            <param name="writeFileNamesToFile" value="False"/>

           
            <output_collection name="interactionFilesCollection" type="list" count="6">
                <element name="FL-E13-5_chr1_chr1_14300280_14300280_Eya1.bed" file="cHi-C/chicViewpoint/output_3/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.bed" ftype="interval" lines_diff="3"/>
                <element name="FL-E13-5_chr1_chr1_4487435_4487435_Sox17.bed" file="cHi-C/chicViewpoint/output_3/FL-E13-5_chr1_chr1_4487435_4487435_Sox17.bed" ftype="interval" lines_diff="3"/>
                <element name="FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d.bed" file="cHi-C/chicViewpoint/output_3/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d.bed" ftype="interval" lines_diff="3"/>

                <element name="MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d.bed" file="cHi-C/chicViewpoint/output_3/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d.bed" ftype="interval" lines_diff="3"/>
                <element name="MB-E10-5_chr1_chr1_14300280_14300280_Eya1.bed" file="cHi-C/chicViewpoint/output_3/MB-E10-5_chr1_chr1_14300280_14300280_Eya1.bed" ftype="interval" lines_diff="3"/>
                <element name="MB-E10-5_chr1_chr1_4487435_4487435_Sox17.bed" file="cHi-C/chicViewpoint/output_3/MB-E10-5_chr1_chr1_4487435_4487435_Sox17.bed" ftype="interval" lines_diff="3"/>
            </output_collection>
            <!-- <output name="interactionFileNames" file="cHi-C/chicViewpoint/fileNames_two_matrices.txt" ftype="txt" lines_diff='0'/> -->
            
        </test>
    </tests>
    <help><![CDATA[

Compute viewpoints for all given reference points
=================================================

Computes per input matrix all viewpoints which are defined in the reference points file. All files are stored in the folder defined by `--outputFolder`, the files
are named by the name of the reference point, the sample name and  the location of the reference point:

gene_matrix_name_chr_start_end.bed

If multiple reference points are used and the processing downstream should be automated via batch processing mode, please activate `--writeFileNamesToFile`. In this
file all the file names will be written to; in the case of multiple samples two consecutive lines are consideres as treatment vs control in the differential analysis.

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>