Mercurial > repos > jetbrains > span
comparison span.xml @ 3:4130e95bd6c8 draft
Batch processing mode supported
author | jetbrains |
---|---|
date | Mon, 19 Nov 2018 08:24:04 -0500 |
parents | 5b99943c4627 |
children | d87ecbc477d8 |
comparison
equal
deleted
inserted
replaced
2:5b99943c4627 | 3:4130e95bd6c8 |
---|---|
7 <!-- Wrapper ensures anything other than zero is an error --> | 7 <!-- Wrapper ensures anything other than zero is an error --> |
8 <exit_code range="1:"/> | 8 <exit_code range="1:"/> |
9 <exit_code range=":-1"/> | 9 <exit_code range=":-1"/> |
10 </stdio> | 10 </stdio> |
11 <command interpreter="python"> | 11 <command interpreter="python"> |
12 #import re | |
13 #set treatment_identifier = re.sub('[^\w\-\.]', '_', str($treatment_file.element_identifier)) | |
14 #set genome_identifier = re.sub('[^\w\-\.]', '_', str($genome_file.element_identifier)) | |
15 | |
16 #if $control.control_selector | |
17 #set control_identifier = re.sub('[^\w\-\.]', '_', str($control.control_file.element_identifier)) | |
18 #end if | |
19 | |
20 #if str($action.action_selector) == "model" | 12 #if str($action.action_selector) == "model" |
21 #if $control.control_selector | 13 #if str($control_file) != 'None': |
22 span_wrapper.py model with_control | 14 span_wrapper.py model_with_control |
23 "${genome_identifier}" "${genome_file}" | 15 "${genome_file.name}" "${genome_file}" |
24 "${treatment_identifier}" "${treatment_file}" | 16 "${treatment_file.name}" "${treatment_file}" |
25 "${bin}" "${action.model_file}" | 17 "${control_file.name}" "${control_file}" |
26 "${control_identifier}" "${control.control_file}" | 18 "${bin}" |
27 #else | 19 #else |
28 span_wrapper.py model without_control | 20 span_wrapper.py model_without_control |
29 "${genome_identifier}" "${genome_file}" | 21 "${genome_file.name}" "${genome_file}" |
30 "${treatment_identifier}" "${treatment_file}" | 22 "${treatment_file.name}" "${treatment_file}" |
31 "${bin}" "${action.model_file}" | 23 "${bin}" |
32 #end if | 24 #end if |
33 #else | 25 #else |
34 #if $control.control_selector | 26 #if str($control_file) != 'None': |
35 span_wrapper.py peaks with_control | 27 span_wrapper.py peaks_with_control |
36 "${genome_identifier}" "${genome_file}" | 28 "${genome_file.name}" "${genome_file}" |
37 "${treatment_identifier}" "${treatment_file}" | 29 "${treatment_file.name}" "${treatment_file}" |
38 "${bin}" "${action.model_file}" | 30 "${control_file.name}" "${control_file}" |
39 "${control_identifier}" "${control.control_file}" | 31 "${bin}" |
40 "${action.fdr}" "${action.gap}" "${action.peaks_file}" | 32 "${action.fdr}" "${action.gap}" |
41 #else | 33 #else |
42 span_wrapper.py peaks without_control | 34 span_wrapper.py peaks_without_control |
43 "${genome_identifier}" "${genome_file}" | 35 "${genome_file.name}" "${genome_file}" |
44 "${treatment_identifier}" "${treatment_file}" | 36 "${treatment_file.name}" "${treatment_file}" |
45 "${bin}" "${action.model_file}" | 37 "${bin}" |
46 "${action.fdr}" "${action.gap}" "${action.peaks_file}" | 38 "${action.fdr}" "${action.gap}" |
47 #end if | 39 #end if |
48 #end if | 40 #end if |
49 </command> | 41 </command> |
50 <inputs> | 42 <inputs> |
51 <param name="treatment_file" type="data" format="bam" label="Treatment BAM" | 43 <param name="treatment_file" type="data" format="bam" label="Treatment BAM" |
52 description="Treatment BAM reads to process" argument="--treatment" | 44 description="Treatment BAM reads to process" argument="--treatment" |
53 help="Treatment BAM reads to process"/> | 45 help="Treatment BAM reads to process"/> |
46 | |
47 <param name="control_file" type="data" format="BAM" label="Control BAM" optional="True" | |
48 argument="--control" help="Control BAM reads to process"/> | |
49 | |
54 <param name="genome_file" type="data" format="chrom.sizes" label="Genome chrom.sizes" | 50 <param name="genome_file" type="data" format="chrom.sizes" label="Genome chrom.sizes" |
55 description="Genome build chrom.sizes file" argument="--chrom.sizes" | 51 description="Genome build chrom.sizes file" argument="--chrom.sizes" |
56 help="Genome build chrom.sizes file"/> | 52 help="Genome build chrom.sizes file"/> |
57 | |
58 <conditional name="control"> | |
59 <param name="control_selector" type="boolean" label="Control available" value="false"/> | |
60 <when value="true"> | |
61 <param name="control_file" type="data" format="bam" label="Control BAM" | |
62 description="Control BAM reads to process" argument="--control" | |
63 help="Control BAM reads to process"/> | |
64 </when> | |
65 </conditional> | |
66 | 53 |
67 <conditional name="action"> | 54 <conditional name="action"> |
68 <param name="action_selector" type="select" label="Action"> | 55 <param name="action_selector" type="select" label="Action"> |
69 <option value="model">Compute SPAN model</option> | 56 <option value="model">Compute SPAN model</option> |
70 <option value="peaks">Compute SPAN model and produce peaks file</option> | 57 <option value="peaks">Compute SPAN model and produce peaks file</option> |
71 </param> | 58 </param> |
72 <when value="model"> | |
73 <param name="model_file" type="text" value="model.span" label="Model name" | |
74 help="Trained model file in binary format, which can be visualized directly in JBR Genome Browser | |
75 and used in integrated peak calling pipeline"/> | |
76 </when> | |
77 <when value="peaks"> | 59 <when value="peaks"> |
78 <param name="model_file" type="text" value="model.span" label="Model file name" | |
79 help="Trained model file in binary format, which can be visualized directly in JBR Genome Browser | |
80 and used in integrated peak calling pipeline"/> | |
81 <param name="fdr" size="5" type="float" value="0.0001" label="FDR" argument="--fdr" | 60 <param name="fdr" size="5" type="float" value="0.0001" label="FDR" argument="--fdr" |
82 help="Minimum FDR cutoff to call significant regions, default value is 1.0E-6. | 61 help="Minimum FDR cutoff to call significant regions, default value is 1.0E-6. |
83 SPAN reports p- and q- values for the null hypothesis that a given bin is not enriched with a histone modification. | 62 SPAN reports p- and q- values for the null hypothesis that a given bin is not enriched with a histone modification. |
84 Peaks are formed from a list of truly (in the FDR sense) enriched bins for the analyzed biological condition by thresholding the | 63 Peaks are formed from a list of truly (in the FDR sense) enriched bins for the analyzed biological condition by thresholding the |
85 Q-value with a cutoff FDR and merging spatially close peaks using GAP option to broad ones. This is equivalent to controlling FDR. | 64 Q-value with a cutoff FDR and merging spatially close peaks using GAP option to broad ones. This is equivalent to controlling FDR. |
86 q-values are are calculated from p-values using Benjamini-Hochberg procedure."/> | 65 q-values are are calculated from p-values using Benjamini-Hochberg procedure."/> |
87 <param name="gap" size="5" type="integer" value="5" label="GAP" argument="--gap" | 66 <param name="gap" size="5" type="integer" value="5" label="GAP" argument="--gap" |
88 help="Gap size to merge spatially close peaks. Useful for wide histone modifications. | 67 help="Gap size to merge spatially close peaks. Useful for wide histone modifications. |
89 Default value is 5, i.e. peaks separated by 5*BIN distance or less are merged."/> | 68 Default value is 5, i.e. peaks separated by 5*BIN distance or less are merged."/> |
90 <param name="peaks_file" type="text" value="result.peak" label="Peaks file name" argument="--peaks"/> | |
91 </when> | 69 </when> |
92 </conditional> | 70 </conditional> |
93 | 71 |
94 <param name="bin" size="5" type="integer" value="200" label="Bin size" argument="--bin" | 72 <param name="bin" size="5" type="integer" value="200" label="Bin size" argument="--bin" |
95 help="Peak analysis is performed on read coverage tiled into consequent bins, with size being configurable. | 73 help="Peak analysis is performed on read coverage tiled into consequent bins, with size being configurable. |
96 Default value is 200bp, approximately the length of one nucleosome."/> | 74 Default value is 200bp, approximately the length of one nucleosome."/> |
97 </inputs> | 75 </inputs> |
98 <outputs> | 76 <outputs> |
99 <data name="SPAN model file" format="span" from_work_dir="*.span" label="SPAN model file ${action.model_file} on ${on_string}"/> | 77 <data name="model.span" format="span" from_work_dir="*.span" |
100 <data name="SPAN peaks file" format="bed" from_work_dir="*.peak" label="SPAN peaks file ${action.peaks_file} on ${on_string}"> | 78 label="SPAN model on ${on_string} (${treatment_file.name}#if str($control_file) != 'None' then '_{}'.format($control_file.name) else '' #_${bin})"/> |
79 <data name="result.peak" format="bed" from_work_dir="*.peak" | |
80 label="SPAN peaks on ${on_string} (${treatment_file.name}#if str($control_file) != 'None' then '_{}'.format($control_file.name) else '' #_${bin}_${action.fdr}_${action.gap})"> | |
101 <filter>action['action_selector'] == "peaks"</filter> | 81 <filter>action['action_selector'] == "peaks"</filter> |
102 </data> | 82 </data> |
103 <data name="SPAN log file" format="txt" from_work_dir="*.log" label="SPAN log file on ${on_string}"/> | 83 <data name="span.log" format="txt" from_work_dir="*.log" label="SPAN logs on ${on_string}"/> |
104 </outputs> | 84 </outputs> |
105 <help><![CDATA[ | 85 <help><![CDATA[ |
106 .. class:: infomark | 86 .. class:: infomark |
107 | 87 |
108 **What it does** | 88 **What it does** |
132 | 112 |
133 ----- | 113 ----- |
134 | 114 |
135 **Outputs** | 115 **Outputs** |
136 | 116 |
137 This tool produces a SPAN binary model file and/or peaks in ENCODE broadPeak (BED 6+3) format. | 117 This tool produces a SPAN binary model file (can be visualized in JBR Genome Browser and used in semi-supervised peak calling) and/or peaks in ENCODE broadPeak (BED 6+3) format. |
138 | 118 |
139 Peak file columns contain the following data: | 119 Peak file columns contain the following data: |
140 | 120 |
141 * **1st**: chromosome name | 121 * **1st**: chromosome name |
142 * **2nd**: start position of peak | 122 * **2nd**: start position of peak |