view hicCompartmentalization.xml @ 7:bd6e26c47853 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit fa140a9f660eab2459e21b0b637b129d7de24c02
author iuc
date Tue, 10 Jan 2023 18:48:44 +0000
parents ed3dea19c464
children 3a6a5381db36
line wrap: on
line source

<tool id="hicexplorer_hiccompartmentspolarization" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
    <description>compute pairwise correlations between multiple Hi-C contact matrices</description>
    <macros>
        <token name="@BINARY@">hicCompartmentalization</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[

        #for $counter, $m in enumerate($matrix_h5_cooler_multiple):
            ln -s '$m' '${counter}_matrix.$m.ext' &&
        #end for
        #set $m = ' '.join([ '\'%s_matrix.%s\'' % ($counter, $matrix.ext) for $counter, $matrix in enumerate($matrix_h5_cooler_multiple) ])
       
        @BINARY@
            --obsexp_matrices $m
            --pca '$pca'
            --quantile $quantile

            #if $set_offset_value:
                #set $offset_array = $set_offset_value.split(' ')
                #set $offset = ' '.join([ '%s' % int($value) for $value in $offset_array ])
                --offset $offset
            #end if
            --outliers $outliers
            --outputFileName plot.$image_file_format
        && mv plot.$image_file_format plot
]]>
    </command>
    <inputs>
        <expand macro="matrix_h5_cooler_multiple_macro" />
        <param name='pca' type="data" format="bedgraph" label="Eigenvector file" help='A PCA vector as a bedgraph file with no header. In case of several matrices with 
                    different conditions, ie. control treatment, the PCA of control can be 
                    used. Note that only one PCA can be provided.' />
        <param name='quantile' type="integer" value="30" label="Quantile" help='The number of to be used quantiles.' />
        <param name='outliers' type="float" value="0.0" label="Outliers" help='The number of outliers to be removed.' />
        <param name="set_offset_value" type="text" optional='True' value="" label="Offset values">
            <validator type="expression" message="Only numeric characters and the a space as seperator are allowed.">value.replace(' ', '').isnumeric()</validator>
        </param>

        <param name="image_file_format" type="select" label="Image output format">
            <option value="png" selected="True">png</option>
            <option value="svg">svg</option>
            <option value="pdf">pdf</option>
        </param>
    </inputs>
    <outputs>
        <data name="outFileName" format="png" from_work_dir="plot" label="${tool.name} [${on_string}]: Plot">
            <change_format>
                <when input="image_file_format" value="svg" format="svg" />
                <when input="image_file_format" value="pdf" format="pdf" />
            </change_format>
        </data>
        <data name='output_matrix' from_work_dir='output_matrix.npz' format='binary' label='Output .npz file includes all the generated matrices'>
            <filter>outputMatrix == '--outputMatrix output_matrix.npz'</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="matrix_h5_cooler_multiple" value="hicTransform/obs_exp_norm.h5" />
            <param name="pca" value="hicCompartmentsPolarization/pca1.bedgraph" ftype="bedgraph" />
            <output name="outFileName" file="hicCompartmentsPolarization/compartmentsPolarizationRatio.png" ftype="png" compare="sim_size" />
        </test>
        <test>
            <param name="matrix_h5_cooler_multiple" value="hicTransform/obs_exp_norm.h5" />
            <param name="pca" value="hicCompartmentsPolarization/pca1.bedgraph" ftype="bedgraph" />
            <param name="quantile" value='30' />
            <output name="outFileName" file="hicCompartmentsPolarization/compartmentsPolarizationRatio.png" ftype="png" compare="sim_size" />
        </test>
        <test>
            <param name="matrix_h5_cooler_multiple" value="hicTransform/obs_exp_norm.h5" />
            <param name="pca" value="hicCompartmentsPolarization/pca1.bedgraph" ftype="bedgraph" />
            <param name="outliers" value='1.0' />
            <output name="outFileName" file="hicCompartmentsPolarization/compartmentsPolarizationRatio.png" ftype="png" compare="sim_size" />
        </test>
    </tests>
    <help><![CDATA[

Comparmentalization
===================

**hicCompartmentalization** rearranges the average interaction frequencies using the first PC values to represent the global compartmentalization signal.
To our knowledge this has been first introduced and implemented by Wibke Schwarzer et al. 2017 (Nature. 2017 Nov 2; 551(7678): 51–56)


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>