Mercurial > repos > bgruening > hicexplorer_chicqualitycontrol
diff chicQualityControl.xml @ 0:000ddd5f0f82 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 15:43:28 -0500 |
parents | |
children | 7095bb186016 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chicQualityControl.xml Mon Dec 16 15:43:28 2019 -0500 @@ -0,0 +1,97 @@ +<tool id="hicexplorer_chicqualitycontrol" name="@BINARY@" version="@WRAPPER_VERSION@.0"> + <description>generates an estimate of the quality of each viewpoint</description> + <macros> + <token name="@BINARY@">chicQualityControl</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@ + + --matrices $m + --referencePoints '$referencePoints' + --sparsity $sparsity + --fixateRange $fixateRange + --dpi $dpi + --threads @THREADS@ + --outFileName reference_points + --outFileNameHistogram histogram.$image_file_format + --outFileNameSparsity sparsity.$image_file_format + + && mv histogram.$image_file_format histogram + && mv sparsity.$image_file_format sparsity + ]]></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 build the background model." /> + <param argument="--sparsity" type="float" value="0.05" label="Sparsity threshold" help='Viewpoints with a sparsity less than given are considered of bad quality. If multiple matrices are given, the viewpoint is removed as soon as it is of bad quality in at least one matrix.'/> + + <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='dpi' type='integer' value='300' 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="raw_reference_points" from_work_dir="reference_points_raw_filter" format="interval" label="${tool.name} on [${on_string}]: Reference points raw"/> + <data name="rejected_reference_points" from_work_dir="reference_points_rejected_filter" format="interval" label="${tool.name} on [${on_string}]: Reference points rejected"/> + <data name="accepted_reference_points" from_work_dir="reference_points" format="interval" label="${tool.name} on [${on_string}]: Reference points accepted"/> + <data name="plot_histrogram" from_work_dir="histogram" format="png" label="${tool.name} on [${on_string}]: Histrogram 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="plot_sparsity" from_work_dir="sparsity" format="png" label="${tool.name} on [${on_string}]: Sparsity plot"> + <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_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.bed"/> + <param name='sparsity' value='0.05'/> + + <output name="accepted_reference_points" file="cHi-C/chicQualityControl/new_referencepoints.bed" ftype="interval" compare="sim_size" delta='40000'/> + <output name="raw_reference_points" file="cHi-C/chicQualityControl/new_referencepoints.bed_raw_filter" ftype="interval" compare="sim_size" delta='40000'/> + <output name="rejected_reference_points" file="cHi-C/chicQualityControl/new_referencepoints.bed_rejected_filter" ftype="interval" compare="sim_size" delta='40000'/> + <output name="plot_histrogram" file="cHi-C/chicQualityControl/histogram.png" ftype="png" compare='sim_size' delta='40000'/> + <output name="plot_sparsity" file="cHi-C/chicQualityControl/sparsity.png" ftype="png" compare="sim_size" delta='40000'/> + + </test> + </tests> + <help><![CDATA[ + +Compute the quality of viewpoints +================================= + +Computes the sparsity of each viewpoint to determine the quality. A viewpoint is considered of bad quality if it is too sparse i.e. there are too many locations with no interactions recorded. + +This script outputs five files: A plot with the sparsity distribution per matrix, a plot with the sparsity distribution as histograms and a filtered reference points file. Additional, the raw filter data and the rejected viewpoints are returned. + +An example usage is: + +`$ chicQualityControl -m matrix1.h5 matrix2.h5 -rp referencePointsFile.bed --range 20000 40000 --sparsity 0.01 -o referencePointFile_QC_passed.bed` + +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>