view scHicPlotClusterProfiles.xml @ 2:65f2f5d29947 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/schicexplorer commit d350f8e73ae518245a21f9720f8282f06eb9cc5d
author iuc
date Fri, 14 Apr 2023 14:23:35 +0000
parents 9da580a74230
children
line wrap: on
line source

<tool id="schicexplorer_schicplotclusterprofiles" name="@BINARY@" version="@TOOL_VERSION@.1" profile="@PROFILE@">
    <description>plot single-cell Hi-C interaction matrices cluster profiles</description>
    <macros>
        <token name="@BINARY@">scHicPlotClusterProfiles</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[
        @BINARY@

        --matrix $matrix_scooler
        --clusters $clusters
        #if $chromosomes:
            #set $chromosome = ' '.join([ '\'%s\'' % $chrom for $chrom in str($chromosomes).split(' ') ])
            --chromosomes $chromosome
        #end if
        
        #if $order_by_conditional.order_by_selection == 'orderByFile':
            --orderBy $order_by_conditional.order_by_selection
        #elif $order_by_conditional.order_by_selection == 'svl':
            --orderBy $order_by_conditional.order_by_selection
            --distanceShortRange $order_by_conditional.distanceShortRange
            --distanceLongRange $order_by_conditional.distanceLongRange
        #end if
        #if $dpi:
            --dpi $dpi
        #end if 
        --outFileName plot.$image_file_format

        --threads @THREADS@

        && mv plot.$image_file_format plot

    ]]></command>
    <inputs>
        <expand macro="matrix_scooler_macro"/>
        <param name='clusters' type='data' format='txt' label='Cluster file' help='Cluster file created by scHicCluster, scHicClusterCompartments, scHicClusterMinHash or scHicClusterSVL'/>
        <param name="maximalDistance" type="integer" value="2000000"  label="Maximal distance" help='Maximal distance to consider for plotting' />   
        <conditional name="order_by_conditional">
            <param name='order_by_selection' label='Order samples by' type='select'>
                <option value='svl' selected='true'>Short vs long range ratio</option>
                <option value='orderByFile'>Order by file</option>
            </param>
            <when value='svl' >
                <param name="distanceShortRange" type="integer" value="2000000"  label="Distance short range" help='Distance for the short range to compute the ratio of sum (short range interactions) / sum (long range interactions)' />   
                <param name="distanceLongRange" type="integer" value="12000000"  label="Distance long range" help='Distance for the long range to compute the ratio of sum (short range interactions) / sum (long range interactions)' />   
            </when>
            <when value='orderByFile'>
            </when>
        </conditional>
        <param name='chromosomes' type='text' label='List of chromosomes to consider' help='Please separate the chromosomes by space'/>
        <param name='dpi' type='integer' label='DPI for image' help='Change the default resolution of the plot.' optional='true'/>
        
        <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='output_plot' from_work_dir='plot' format='png' label='Cluster profile plot on ${on_string} '>
            <change_format>
                <when input="image_file_format" value="svg" format="svg" />
                <when input="image_file_format" value="pdf" format="pdf" />
            </change_format>
        </data>
    </outputs>
    <tests>
        <test>
            <param name='matrix_scooler' value='test_matrix.scool' />
            <param name='clusters' value='scHicPlotClusterProfiles/cluster_kmeans.txt' />
            <conditional name="order_by_conditional">
                <param name="order_by_selection" value="svl"/>
                <param name="distanceShortRange" value="2000000" />
                <param name="distanceLongRange" value="12000000" />
            </conditional>
            <param name="maximalDistance" value="50000000" />
            <param name="image_file_format" value="png" />
            <param name="dpi" value="300" />

            <output name="output_plot" file="scHicPlotClusterProfiles/plot.png" ftype="png" compare="sim_size" delta="35000"/>        
        </test>
       
    </tests>
    <help><![CDATA[

Plot cluster profiles
=====================

scHicPlotClusterProfiles plots the profile of each scHi-C interaction matrix associated to a cluster, within the cluster the matrices can be ordered either via their short vs long range ratio or by the order of the file.
This tool is useful as a quality control of a cluster to check if all matrices assigned to that cluster are displaying similar contacts distribution.

.. image:: $PATH_TO_IMAGES/clusters_svl_spectral.png
   :width: 50%

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

.. _readthedocs.io: http://schicexplorer.readthedocs.io/
]]></help>
    <expand macro="citations" />

</tool>