Mercurial > repos > bgruening > hicexplorer_hicbuildmatrix
comparison hicBuildMatrix.xml @ 2:eb0d14cdf8b8 draft
planemo upload for repository https://github.com/maxplanck-ie/HiCExplorer/tree/master/galaxy/wrapper/ commit 4d61b6bf2fed275ab38c226d0c4390b095a38251
author | bgruening |
---|---|
date | Thu, 02 Nov 2017 11:11:01 -0400 |
parents | 9767c021cd58 |
children | 2a13bfe5bff2 |
comparison
equal
deleted
inserted
replaced
1:3d56e784d0bd | 2:eb0d14cdf8b8 |
---|---|
3 <macros> | 3 <macros> |
4 <token name="@BINARY@">hicBuildMatrix</token> | 4 <token name="@BINARY@">hicBuildMatrix</token> |
5 <import>macros.xml</import> | 5 <import>macros.xml</import> |
6 </macros> | 6 </macros> |
7 <expand macro="requirements" > | 7 <expand macro="requirements" > |
8 <requirement type="package" version="1.3.1">samtools</requirement> | 8 <requirement type="package" version="1.6">samtools</requirement> |
9 </expand> | 9 </expand> |
10 <command> | 10 <command detect_errors="exit_code"><![CDATA[ |
11 <![CDATA[ | |
12 | 11 |
13 mkdir ./QCfolder && | 12 mkdir ./QCfolder && |
14 mkdir $qc.files_path | 13 mkdir $qc.files_path && |
15 && | |
16 | |
17 hicBuildMatrix | 14 hicBuildMatrix |
18 | 15 |
19 --samFiles | 16 --samFiles |
20 #for $repeat in $samFiles: | 17 #for $repeat in $samFiles: |
21 '${repeat.samFile}' | 18 '${repeat.samFile}' |
22 #end for | 19 #end for |
23 | 20 |
24 #if $binSize: | 21 #if $restrictionCutFileBinSize_conditional.restrictionCutFileBinSize_selector == "optionRestrictionCutFile": |
25 --binSize $binSize | 22 --restrictionCutFile '$restrictionCutFileBinSize_conditional.restrictionCutFile' |
23 --minDistance $restrictionCutFileBinSize_conditional.minDistance | |
24 --maxDistance $restrictionCutFileBinSize_conditional.maxDistance | |
26 #end if | 25 #end if |
27 | 26 |
28 #if $restrictionCutFile: | 27 #if $restrictionCutFileBinSize_conditional.restrictionCutFileBinSize_selector == "optionBinSize": |
29 --restrictionCutFile '$restrictionCutFile' | 28 --binSize $restrictionCutFileBinSize_conditional.binSize |
30 #end if | 29 #end if |
31 | 30 |
32 #if $minDistance: | |
33 --minDistance $minDistance | |
34 #end if | |
35 | |
36 #if $maxDistance: | |
37 --maxDistance $maxDistance | |
38 #end if | |
39 | 31 |
40 #if $restrictionSequence: | 32 #if $restrictionSequence: |
41 --restrictionSequence '$restrictionSequence' | 33 --restrictionSequence '$restrictionSequence' |
42 #end if | 34 #end if |
43 | 35 |
46 #end if | 38 #end if |
47 | 39 |
48 --outFileName ./matrix.h5 | 40 --outFileName ./matrix.h5 |
49 --outBam ./unsorted.bam | 41 --outBam ./unsorted.bam |
50 | 42 |
51 #if $restrictionCutFile: | 43 $keepSelfCircles |
52 --restrictionCutFile '$restrictionCutFile' | |
53 #end if | |
54 | |
55 $removeSelfCircles | |
56 | 44 |
57 #if $minMappingQuality and $minMappingQuality is not None: | 45 #if $minMappingQuality and $minMappingQuality is not None: |
58 --minMappingQuality $minMappingQuality | 46 --minMappingQuality $minMappingQuality |
59 #end if | 47 #end if |
60 | 48 |
49 #if $danglingSequence: | |
50 --danglingSequence '$danglingSequence' | |
51 #end if | |
52 | |
53 --threads @THREADS@ | |
54 | |
61 --QCfolder ./QCfolder | 55 --QCfolder ./QCfolder |
62 && | 56 && |
63 mv ./QCfolder/* $qc.files_path/ | 57 mv ./QCfolder/* $qc.files_path/ |
64 && | 58 && |
65 mv $qc.files_path/hicQC.html $qc | 59 mv $qc.files_path/hicQC.html $qc |
66 && | 60 && samtools sort ./unsorted.bam -o sorted.bam |
67 samtools sort ./unsorted.bam -o sorted.bam | 61 |
68 | |
69 ]]> | 62 ]]> |
70 </command> | 63 </command> |
71 <inputs> | 64 <inputs> |
72 <repeat max="2" min="2" name="samFiles" title="Sam/Bam files to process"> | 65 <repeat max="2" min="2" name="samFiles" title="Sam/Bam files to process"> |
73 <param name="samFile" type="data" format="sam,bam"/> | 66 <param name="samFile" type="data" format="sam,bam"/> |
74 </repeat> | 67 </repeat> |
68 <conditional name="restrictionCutFileBinSize_conditional"> | |
69 <param name="restrictionCutFileBinSize_selector" type="select" label="Choose to use a restriction cut file or a bin size"> | |
70 <option value="optionRestrictionCutFile">Restriction cut file</option> | |
71 <option value="optionBinSize" selected="True">Bin size</option> | |
72 </param> | |
73 <when value="optionRestrictionCutFile"> | |
74 <param argument="--restrictionCutFile" type="data" format="bed" optional="True" | |
75 help="BED file with all restriction cut places. Should contain only mappable restriction sites. If given, the | |
76 bins are set to match the restriction fragments (i.e. the region between one restriction site and the next)"/> | |
77 <param name="restrictionCutFile" type="data" format="bed" optional="true" label="BED file with all restriction cut places" | |
78 help="Should contaion only mappable restriction sites. If given, the bins are set to match the restriction fragments | |
79 (i.e. the region between one restriction site and the next)." argument="--restrictionCutFile"/> | |
80 <param name="minDistance" type="integer" value="" optional="true" label="Minimum distance between restriction sites" | |
81 help="Restriction sites that are closer that this distance are merged into one. | |
82 This option only applies if --restrictionCutFile is given." argument="--minDistance"/> | |
75 | 83 |
76 <param argument="--restrictionCutFile" type="data" format="bed" optional="True" | 84 <param name="maxDistance" type="integer" value="" optional="true" label="Maximum distance in bp from restriction site to read, to consider a read a valid one" |
77 help="BED file with all restriction cut places. Should contain only mappable restriction sites. If given, the | 85 help="This option only applies if --restrictionCutFile is given." argument="--maxDistance"/> |
78 bins are set to match the restriction fragments (i.e. the region between one restriction site and the next)"/> | 86 </when> |
79 | 87 <when value="optionBinSize"> |
80 <param name="binSize" type="integer" value="" optional="true" label="Bin size in bp" | 88 <param name="binSize" type="integer" value="" optional="true" label="Bin size in bp" |
81 help="If used, the restriction cut places (if given) are used to only consider reads that are in the vicinity of the resctriction sites. | 89 help="If used, the restriction cut places (if given) are used to only consider reads that are in the vicinity of the resctriction sites. |
82 Otherwise all reads in the interval are considered. " argument="--binSize"/> | 90 Otherwise all reads in the interval are considered. " argument="--binSize"/> |
83 | 91 </when> |
84 <param name="restrictionCutFile" type="data" format="bed" optional="true" label="BED file with all restriction cut places" | 92 </conditional> |
85 help="Should contaion only mappable restriction sites. If given, the bins are set to match the restriction fragments | |
86 (i.e. the region between one restriction site and the next)." argument="--restrictionCutFile"/> | |
87 | |
88 <param name="minDistance" type="integer" value="" optional="true" label="Minimum distance between restriction sites" | |
89 help="Restriction sites that are closer that this distance are merged into one. | |
90 This option only applies if --restrictionCutFile is given." argument="--minDistance"/> | |
91 | |
92 <param name="maxDistance" type="integer" value="" optional="true" label="Maximum distance in bp from restriction site to read, to consider a read a valid one" | |
93 help="This option only applies if --restrictionCutFile is given." argument="--maxDistance"/> | |
94 | 93 |
95 <param name="restrictionSequence" type="text" optional="true" label="Sequence of the restriction site" | 94 <param name="restrictionSequence" type="text" optional="true" label="Sequence of the restriction site" |
96 help="This is used to discard reads that end/start with such sequence and that are considered un-ligated fragments or | 95 help="This is used to discard reads that end/start with such sequence and that are considered un-ligated fragments or |
97 "dangling-ends". If not given, such statistics will not be available." argument="--restrictionSequence"/> | 96 "dangling-ends". If not given, such statistics will not be available." argument="--restrictionSequence"/> |
98 | 97 |
99 <expand macro="region" /> | 98 <expand macro="region" /> |
100 | 99 |
101 <param argument="--removeSelfCircles" type="boolean" truevalue="--removeSelfCircles" falsevalue="" | 100 <param argument="--keepSelfCircles" type="boolean" truevalue="--keepSelfCircles" falsevalue="" |
102 label="Save the matrix of values underlying the heatmap" help="If set, outward facing reads, at a distance of less thatn 25kbs are removed." /> | 101 label="Keep self circles" help="If set, outward facing reads without any restriction fragment (self circles) are kept. ' |
102 + 'They will be counted and shown in the QC plots." /> | |
103 | 103 |
104 <expand macro="minMappingQuality" /> | 104 <expand macro="minMappingQuality" /> |
105 | 105 |
106 <param name="danglingSequence" type="text" optional="true" label="The dangling sequence" | |
107 help="Dangling end sequence left by the restriction enzyme. For DpnII for example, | |
108 the dangling end is the same restriction sequence. This is used | |
109 to discard reads that end/start with such sequence | |
110 and that are considered un-ligated fragments or | |
111 'dangling-ends'. If not given, such statistics will | |
112 not be available." argument="--danglingSequence"/> | |
106 </inputs> | 113 </inputs> |
107 <outputs> | 114 <outputs> |
108 <data name="outBam" from_work_dir="sorted.bam" format="bam" label="${tool.name} BAM file on ${on_string}"/> | 115 <data name="outBam" from_work_dir="sorted.bam" format="bam" label="${tool.name} BAM file on ${on_string}"/> |
109 <data name="outFileName" from_work_dir="matrix.h5" format="h5" label="${tool.name} MATRIX on ${on_string}"/> | 116 <data name="outFileName" from_work_dir="matrix.h5" format="h5" label="${tool.name} MATRIX on ${on_string}"/> |
110 <data name="qc" format="html" label="${tool.name} QC"/> | 117 <data name="qc" format="html" label="${tool.name} QC"/> |
115 <param name="samFile" value="small_test_R1_unsorted.bam" ftype="sam" /> | 122 <param name="samFile" value="small_test_R1_unsorted.bam" ftype="sam" /> |
116 </repeat> | 123 </repeat> |
117 <repeat name="samFiles"> | 124 <repeat name="samFiles"> |
118 <param name="samFile" value="small_test_R2_unsorted.bam" ftype="sam"/> | 125 <param name="samFile" value="small_test_R2_unsorted.bam" ftype="sam"/> |
119 </repeat> | 126 </repeat> |
120 <param name="binSize" value="5000"/> | 127 <conditional name="restrictionCutFileBinSize_conditional"> |
121 <output name="outBam" file="hicBuildMatrix_result1.bam" ftype="bam"/> | 128 <param name="restrictionCutFileBinSize_selector" value="optionBinSize"/> |
122 <output name="outFileName" file="hicBuildMatrix_result1.h5" ftype="h5" compare="sim_size"/> | 129 <param name="binSize" value="5000"/> |
130 </conditional> | |
131 <output name="outBam" file="small_test_matrix_result_sorted.bam" ftype="bam"/> | |
132 <output name="outFileName" file="small_test_matrix.h5" ftype="h5" compare="sim_size" delta="30000"/> | |
123 </test> | 133 </test> |
124 </tests> | 134 </tests> |
125 <help><![CDATA[ | 135 <help><![CDATA[ |
126 | 136 |
127 **What it does** | 137 **What it does** |