comparison hicCorrectMatrix.xml @ 5:44919af9194b draft

planemo upload for repository https://github.com/maxplanck-ie/HiCExplorer/tree/master/galaxy/wrapper/ commit 80462804e4fd7deafbcf8e8c5283cc7a98fa7dd5
author bgruening
date Sat, 30 Dec 2017 09:24:06 -0500
parents b55d7936cbe0
children 1612e9458940
comparison
equal deleted inserted replaced
4:b55d7936cbe0 5:44919af9194b
5 <import>macros.xml</import> 5 <import>macros.xml</import>
6 </macros> 6 </macros>
7 <expand macro="requirements" /> 7 <expand macro="requirements" />
8 <command detect_errors="exit_code"><![CDATA[ 8 <command detect_errors="exit_code"><![CDATA[
9 9
10 ln -s '$matrix' temp_matrix.npz.h5 &&
11
12 hicCorrectMatrix 10 hicCorrectMatrix
13 $mode.mode_selector 11 $mode.mode_selector
14 --matrix temp_matrix.npz.h5 12 --matrix '$matrix_h5_cooler'
15 13
16 ## special: --chromosomes is optional, but if given needs at least one argument 14 ## special: --chromosomes is optional, but if given needs at least one argument
17 #set chroms = '" "'.join([ str($var.chromosome) for $var in $chromosomes ]) 15 #set chroms = '" "'.join([ str($var.chromosome) for $var in $chromosomes ])
18 #if chroms 16 #if chroms
19 --chromosomes "$chroms" 17 --chromosomes "$chroms"
20 #end if 18 #end if
21 19
22 #if $mode.mode_selector == 'correct': 20 #if $mode.mode_selector == 'correct':
23 21
24 --iterNum $mode.iterNum 22 --iterNum $mode.iterNum
25 --outFileName corrected_matrix.npz.h5 23 #if $mode.outputFormat == 'h5'
24 --outFileName matrix.h5
25 #elif $mode.outputFormat == 'cool'
26 --outFileName matrix.cool
27 #end if
26 28
27 #if $mode.filterThreshold_low and $mode.filterThreshold_large: 29 #if $mode.filterThreshold_low and $mode.filterThreshold_large:
28 --filterThreshold $mode.filterThreshold_low $mode.filterThreshold_large 30 --filterThreshold $mode.filterThreshold_low $mode.filterThreshold_large
29 #end if 31 #end if
30 32
60 #end if 62 #end if
61 63
62 ]]> 64 ]]>
63 </command> 65 </command>
64 <inputs> 66 <inputs>
65 <param argument="--matrix" name="matrix" type="data" format="h5" 67 <expand macro='matrix_h5_cooler_macro' />
66 label="Hi-C matrix" />
67
68 <conditional name="mode"> 68 <conditional name="mode">
69 <param name="mode_selector" type="select" label="Range restriction (in bp)" argument="--range"> 69 <param name="mode_selector" type="select" label="Range restriction (in bp)" argument="--range">
70 <option value="diagnostic_plot">Diagnostic plot</option> 70 <option value="diagnostic_plot">Diagnostic plot</option>
71 <option value="correct">Correct matrix</option> 71 <option value="correct">Correct matrix</option>
72 </param> 72 </param>
95 label="Skip diagonal counts"/> 95 label="Skip diagonal counts"/>
96 96
97 <param argument="--perchr" name="perchr" type="boolean" truevalue="--perchr" falsevalue="" checked="false" 97 <param argument="--perchr" name="perchr" type="boolean" truevalue="--perchr" falsevalue="" checked="false"
98 label="Normalize each chromosome separately" /> 98 label="Normalize each chromosome separately" />
99 <expand macro="filterThreshold" /> 99 <expand macro="filterThreshold" />
100 100 <param name='outputFormat' type='select' label="Output file format">
101 <option value='h5'>HiCExplorer format</option>
102 <option value="cool">cool</option>
103 </param>
101 </when> 104 </when>
102 </conditional> 105 </conditional>
103 106
104 <repeat name="chromosomes" min="0" 107 <repeat name="chromosomes" min="0"
105 title="Include chromosomes" help="List of chromosomes to be included in the iterative correction. 108 title="Include chromosomes" help="List of chromosomes to be included in the iterative correction.
109 </param> 112 </param>
110 </repeat> 113 </repeat>
111 114
112 </inputs> 115 </inputs>
113 <outputs> 116 <outputs>
114 <data name="outFileName" from_work_dir="corrected_matrix.npz.h5" format="h5"> 117 <data name="outFileName_h5" from_work_dir="matrix.h5" format="h5">
118 <filter>outputFormat == 'h5'</filter>
115 <filter>mode['mode_selector'] == "correct"</filter> 119 <filter>mode['mode_selector'] == "correct"</filter>
120
116 </data> 121 </data>
122 <data name="outFileName_cool" from_work_dir="matrix.cool" format="cool">
123 <filter>outputFormat == 'cool'</filter>
124 <filter>mode['mode_selector'] == "correct"</filter>
125
126 </data>
127
117 <data name="diagnostic_plot" from_work_dir="diagnostic_plot.png" format="png"> 128 <data name="diagnostic_plot" from_work_dir="diagnostic_plot.png" format="png">
118 <filter>mode['mode_selector'] == "diagnostic_plot"</filter> 129 <filter>mode['mode_selector'] == "diagnostic_plot"</filter>
119 </data> 130 </data>
120 </outputs> 131 </outputs>
121 <tests> 132 <tests>
122 <test> 133 <test>
123 <param name="matrix" value="small_test_matrix.h5" ftype="h5"/> 134 <param name="matrix_h5_cooler" value="small_test_matrix.h5"/>
135
124 <param name="mode_selector" value="correct"/> 136 <param name="mode_selector" value="correct"/>
125 <repeat name="chromosomes"> 137 <repeat name="chromosomes">
126 <param name="chromosome" value="chrUextra"/> 138 <param name="chromosome" value="chrUextra"/>
127 </repeat> 139 </repeat>
128 <repeat name="chromosomes"> 140 <repeat name="chromosomes">
129 <param name="chromosome" value="chr3LHet"/> 141 <param name="chromosome" value="chr3LHet"/>
130 </repeat> 142 </repeat>
131 <output name="outFileName" file="hicCorrectMatrix_result1.npz.h5" ftype="h5" compare="sim_size"/> 143 <param name='outputFormat' value='h5'/>
144
145 <output name="outFileName_h5" file="hicCorrectMatrix_result1.npz.h5" ftype="h5" compare="sim_size"/>
132 </test> 146 </test>
133 <test> 147 <test>
134 <param name="matrix" ftype="h5" value="small_test_matrix.h5"/> 148 <param name="matrix_h5_cooler" value="small_test_matrix.h5"/>
135 <param name="mode_selector" value="diagnostic_plot"/> 149 <param name="mode_selector" value="diagnostic_plot"/>
136 <repeat name="chromosomes"> 150 <repeat name="chromosomes">
137 <param name="chromosome" value="chrUextra"/> 151 <param name="chromosome" value="chrUextra"/>
138 </repeat> 152 </repeat>
139 <repeat name="chromosomes"> 153 <repeat name="chromosomes">
145 <help><![CDATA[ 159 <help><![CDATA[
146 160
147 Matrix correction 161 Matrix correction
148 ================== 162 ==================
149 163
150 | ``hicCorrectMatrix`` runs Dekker's iterative correction over a Hi-C matrix (`Imakaev 2012`_.). For correcting the matrix, 164 ``hicCorrectMatrix`` runs Dekker's iterative correction over a Hi-C matrix (`Imakaev 2012`_.). For correcting the matrix,
151 | it is important to remove the unassembled scaffolds (e.g. `NT_`), mitochondrial DNA and Y chromosome and keep only 165 it is important to remove the unassembled scaffolds (e.g. `NT_`), mitochondrial DNA and Y chromosome and keep only
152 | chromosomes, as scaffolds create problems with matrix correction. Therefore 166 chromosomes, as scaffolds create problems with matrix correction. Therefore
153 | we use the chromosome names (1-19, X, Y) here. 167 we use the chromosome names (1-19, X, Y) here.
154 | 168
155 | **Important**: Use ‘chr1 chr2 chr3 etc.’ if your genome index uses chromosome names with the ‘chr’ prefix. 169 **Important**: Use ‘chr1 chr2 chr3 etc.’ if your genome index uses chromosome names with the ‘chr’ prefix.
156 170
157 Matrix correction works in two steps: first a histogram containing the sum of contact per bin (row sum) is produced. This plot needs to be inspected to decide the best threshold for removing bins with lower number of reads. The second steps removes the low scoring bins and does the correction. 171 Matrix correction works in two steps: first a histogram containing the sum of contact per bin (row sum) is produced. This plot needs to be inspected to decide the best threshold for removing bins with lower number of reads. The second steps removes the low scoring bins and does the correction.
158 172
159 Input 173 Input
160 ----- 174 -----