Mercurial > repos > bgruening > hicexplorer_hicplotdistvscounts
changeset 1:f768ce54ee2a draft
planemo upload for repository https://github.com/maxplanck-ie/HiCExplorer/tree/master/galaxy/wrapper/ commit 07491a9ed4870989c9a603b27a4b89173832700f
author | bgruening |
---|---|
date | Mon, 03 Apr 2017 07:07:41 -0400 |
parents | 6abd5817e0cd |
children | 9b664f43a90e |
files | hicPlotDistVsCounts.xml involucro macros.xml test-data/Li_et_al_2015.h5 test-data/hicBuildMatrix_result1.h5 test-data/hicCorrectMatrix_result1.npz.h5 test-data/hicPlotDistVsCounts_result1.png test-data/hicPlotDistVsCounts_result1_.png test-data/hicPlotDistVsCounts_result2.png test-data/hicSumMatrices_result1.npz.h5 test-data/small_test_matrix_50kb_res.h5 |
diffstat | 11 files changed, 41 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/hicPlotDistVsCounts.xml Thu Mar 30 02:40:49 2017 -0400 +++ b/hicPlotDistVsCounts.xml Mon Apr 03 07:07:41 2017 -0400 @@ -6,28 +6,44 @@ </macros> <expand macro="requirements" /> <command detect_errors="aggressive"><![CDATA[ - ln -s '$matrix' input_matrix.npz.h5 && + #import re + #set matrices_path=[] + #set matrices_labels=[] + #for $counter, $m, in enumerate($matrices): + #set identifier = re.sub('[^\s\w\-]', '_', str($m.element_identifier)) + ln -f -s '${m}' '${identifier}_${counter}.npz.h5' && + #silent $matrices_path.append("'%s_%s.npz.h5'" % ($identifier, $counter)) + #silent $matrices_labels.append("'%s'" % ($identifier)) + #end for + @BINARY@ - --matrix input_matrix.npz.h5 + --matrices #echo " ".join($matrices_path)# + --labels #echo " ".join($matrices_labels)# $skipDiagonal --plotFile plot.png - #if $plotTitle and $plotTitle is not None: - --plotTitle '$plotTitle' + #if $plotsize: + --plotsize $plotsize #end if - - ## special: --chromosomeExclude is optional, but if given needs at least one argument - #set chroms = '" "'.join([ str($var.chromosomeExclude) for $var in $chromosomeExclude ]) + --maxdepth $maxdepth + $perchr + #set chroms = " ".join([ "'%s'" % $var.chromosomeExclude for $var in $chromosomeExclude ]) #if $chromosomeExclude: --chromosomeExclude $chroms #end if ]]> </command> <inputs> - <param argument="--matrix" type="data" format="h5" label="Hi-C normalized/corrected matrix"/> + <param argument="--matrices" type="data" format="h5" multiple="True" label="HiC normalized (corrected) matrices"/> <param argument="--skipDiagonal" type="boolean" truevalue="--skipDiagonal" falsevalue="" label="Exclude diagonal counts" /> - <param argument="--plotTitle" type="text" optional="true" label="Plot title"/> - <repeat name="chromosomeExclude" min="0" title="Chromosomes to exclude"> + <param argument="--perchr" type="boolean" truevalue="--perchr" falsevalue="" label="Generate plots per chromosome" + help="If more than one HiC matrix is given for each chromosome a new plot is made. Otherewise, a single plot with one line per chromosome is created." /> + <param argument="--maxdepth" type="integer" value="3000000" label="Max Depth" + help="Maximum distance from diagonal to use. In other words, distances up to maxDeph are computed." /> + <param argument="--plotsize" type="text" optional="True" label="Plot size" + help="Width and height of the plot (in inches). Default is 6*number of cols, 4 * number of rows. The maximum number of rows is 4. Example --plotsize 6 5." /> + <repeat name="chromosomeExclude" min="0" title="Chromosomes to exclude" + help="This is useful for example to exclude the Y chromosome."> <param argument="--chromosomeExclude" type="text" value="" /> </repeat> @@ -37,25 +53,34 @@ </outputs> <tests> <test> - <param name="matrix" ftype="h5" value="small_test_matrix_50kb_res.h5"/> + <param name="matrices" ftype="h5" value="small_test_matrix_50kb_res.h5"/> <param name="skipDiagonal" value="False"/> <output name="plotFile" file="hicPlotDistVsCounts_result1.png" ftype="png" compare="sim_size"/> </test> <test> - <param name="matrix" ftype="h5" value="small_test_matrix_50kb_res.h5"/> + <param name="matrices" ftype="h5" value="small_test_matrix_50kb_res.h5,small_test_matrix_50kb_res.h5"/> <param name="skipDiagonal" value="False"/> - <param name="plotTitle" value="Excluded chrUextra"/> + <param name="perchr" value="True" /> <repeat name="chromosomeExclude"> <param name="chromosomeExclude" value="chrUextra"/> </repeat> - <output name="plotFile" file="hicPlotDistVsCounts_result1.png" ftype="png" compare="sim_size"/> + <repeat name="chromosomeExclude"> + <param name="chromosomeExclude" value="chrM"/> + </repeat> + <repeat name="chromosomeExclude"> + <param name="chromosomeExclude" value="chr3LHet"/> + </repeat> + <output name="plotFile" file="hicPlotDistVsCounts_result2.png" ftype="png" compare="sim_size" delta="15000"/> </test> </tests> <help><![CDATA[ **What it does** -This program makes a distance vs. hi-c counts plot per chromosome. +This program makes a distance vs. hi-c counts plots. It can use several matrix files to compare +them. If the `--perchr` option is given, each chromosome is plotted independently. In the case +of more than one matrix, multiple plots are created, one per chromosome. When plotting multiple +matrices denser matrices are scaled down to match the sum of the smaller matrix. ]]></help>
--- a/macros.xml Thu Mar 30 02:40:49 2017 -0400 +++ b/macros.xml Mon Apr 03 07:07:41 2017 -0400 @@ -11,7 +11,7 @@ </xml> <token name="@THREADS@">--numberOfProcessors "\${GALAXY_SLOTS:-4}"</token> - <token name="@WRAPPER_VERSION@">1.7.1</token> + <token name="@WRAPPER_VERSION@">1.7.2</token> <xml name="requirements"> <requirements> <requirement type="package" version="2.7.13">python</requirement>