Mercurial > repos > rnateam > blockclust
comparison blockclust.xml @ 12:aab6cf87b40a draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/blockclust commit 8a847f019b21abaf4de2612dead57163b2c92d81
author | rnateam |
---|---|
date | Mon, 19 Nov 2018 08:10:14 -0500 |
parents | 6ecd674b5b62 |
children | dbb6ee3179bc |
comparison
equal
deleted
inserted
replaced
11:6ecd674b5b62 | 12:aab6cf87b40a |
---|---|
1 <tool id="blockclust" name="BlockClust" version="1.0.0"> | 1 <tool id="blockclust" name="BlockClust" version="1.1.0"> |
2 <description>efficient clustering and classification of non-coding RNAs from short read RNA-seq profiles</description> | 2 <description>efficient clustering and classification of non-coding RNAs from short read RNA-seq profiles</description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="package" version="1.0">blockclust</requirement> | 4 <requirement type="package" version="1.1.0">blockclust</requirement> |
5 <requirement type="package" version="1.1">eden</requirement> | |
6 <requirement type="package" version="3.0.3">R</requirement> | |
7 <requirement type="package" version="0.1.19">samtools</requirement> | |
8 <requirement type="package" version="12.135">mcl</requirement> | |
9 <requirement type="package" version="1.0">blockclust_rlibs</requirement> | |
10 </requirements> | 5 </requirements> |
11 <version_command>echo '1.0'</version_command> | 6 <version_command>blockclust.py -v</version_command> |
12 <command> | 7 <command detect_errors="aggressive"><![CDATA[ |
13 <![CDATA[ | 8 export BLOCKCLUST_DATA_PATH=\$(dirname \$(which blockclust.py))/../share/blockclust_data && |
9 | |
14 #if str($tool_mode.operation) == "pre": | 10 #if str($tool_mode.operation) == "pre": |
15 BlockClustPipeLine.pl -m PRE -bam $tool_mode.reads_bam -tbed $tags_bed | 11 ln -s '$tool_mode.reads_bam' reads.bam && |
16 #elif str($tool_mode.operation) == "clust": | 12 ln -f -s '${$tool_mode.reads_bam.metadata.bam_index}' reads.bam.bai && |
13 blockclust.py | |
14 -m PRE -bam reads.bam | |
15 -tbed '$tags_bed' | |
16 #elif str($tool_mode.operation) == "analysis": | |
17 #set $outputdir = $clusters.files_path | 17 #set $outputdir = $clusters.files_path |
18 #set $accept_bed=list() | 18 blockclust.py |
19 #set $reject_bed=list() | 19 -o ./ |
20 ## prepare annotations | 20 -m ANALYSIS |
21 #if str($tool_mode.reference) == "hg19": | 21 -f "\$BLOCKCLUST_DATA_PATH/blockclust.config" |
22 $accept_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/hg19/hg19.accept.bed") | |
23 $reject_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/hg19/hg19.reject.bed") | |
24 #elif str($tool_mode.reference) == "mm10": | |
25 $accept_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/mm10/mm10.accept.bed") | |
26 $reject_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/mm10/mm10.reject.bed") | |
27 #elif str($tool_mode.reference) == "dm3": | |
28 $accept_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/dm3/dm3.accept.bed") | |
29 $reject_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/dm3/dm3.reject.bed") | |
30 #elif str($tool_mode.reference) == "rheMac3": | |
31 $accept_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/rheMac3/rheMac3.accept.bed") | |
32 $reject_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/rheMac3/rheMac3.reject.bed") | |
33 #elif str($tool_mode.reference) == "panTro4": | |
34 $accept_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/panTro3/panTro4.accept.bed") | |
35 $reject_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/panTro3/panTro4.reject.bed") | |
36 #elif str($tool_mode.reference) == "xenTro3": | |
37 $accept_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/xenTro3/xenTro3.accept.bed") | |
38 $reject_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/xenTro3/xenTro3.reject.bed") | |
39 #elif str($tool_mode.reference) == "celWS235": | |
40 $accept_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/celWS235/celWS235.accept.bed") | |
41 $reject_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/celWS235/celWS235.reject.bed") | |
42 #elif str($tool_mode.reference) == "tair10": | |
43 $accept_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/tair10/tair10.accept.bed") | |
44 $reject_bed.append("\$BLOCKCLUST_DATA_PATH/annotations/tair10/tair10.reject.bed") | |
45 #end if | |
46 BlockClustPipeLine.pl -m TEST -c \$BLOCKCLUST_DATA_PATH/blockclust.config | |
47 -t $tool_mode.input_bbo | 22 -t $tool_mode.input_bbo |
48 -a #echo ''.join( $accept_bed ) | 23 -a "\$BLOCKCLUST_DATA_PATH/$tool_mode.reference/${tool_mode.reference}.accept.bed" |
49 -r #echo ''.join( $reject_bed ) | 24 -r "\$BLOCKCLUST_DATA_PATH/$tool_mode.reference/${tool_mode.reference}.reject.bed" |
50 -o $outputdir | |
51 #if $tool_mode.nochr: | 25 #if $tool_mode.nochr: |
52 -nochr | 26 -nochr |
53 #end if | 27 #end if |
54 #if str($tool_mode.pred.enable_pred) == "yes": | 28 #if str($tool_mode.pred.enable_pred) == "yes": |
55 -p | 29 -c |
56 -pm $tool_mode.pred.pred_mode | 30 -cm $tool_mode.pred.pred_mode |
57 -md \$BLOCKCLUST_DATA_PATH/models; | 31 -md "\$BLOCKCLUST_DATA_PATH/models" |
58 #if str($tool_mode.pred.pred_mode) == "nearest_neighbour": | |
59 cp #echo os.path.join($outputdir,'nearest_neighbour_predictions.txt')# $nearest_neighbour_pred_bed; | |
60 #elif str($tool_mode.pred.pred_mode) == "model_based": | |
61 cp #echo os.path.join($outputdir,'model_based_predictions.txt')# $model_based_pred_bed; | |
62 #end if | |
63 #else: | |
64 ; | |
65 #end if | 32 #end if |
66 | |
67 cp #echo os.path.join($outputdir, 'mcl_clusters','all_clusters.bed')# $clusters; | |
68 cp #echo os.path.join($outputdir, 'hclust_tree.pdf')# $hclust_plot; | |
69 cp #echo os.path.join($outputdir, 'discretized.gspan.tab')# $sim_tab_out | |
70 #elif str($tool_mode.operation) == "post": | 33 #elif str($tool_mode.operation) == "post": |
71 BlockClustPipeLine.pl -m POST -cbed $tool_mode.clusters_bed -cm $tool_mode.cmsearch_out -tab $tool_mode.sim_tab_in -rfam \$BLOCKCLUST_DATA_PATH/rfam_map.txt -o ./; | 34 blockclust.py |
35 -m POST | |
36 -cbed '$tool_mode.clusters_bed' | |
37 -cs '$tool_mode.cmsearch_out' | |
38 -tab '$tool_mode.sim_tab_in' | |
39 -rfam "\$BLOCKCLUST_DATA_PATH/rfam_map.txt" | |
40 -o ./ | |
72 #end if | 41 #end if |
73 ]]> | 42 ]]> |
74 </command> | 43 </command> |
75 <inputs> | 44 <inputs> |
76 <conditional name="tool_mode"> | 45 <conditional name="tool_mode"> |
77 <param name="operation" type="select" label="Select mode of operation"> | 46 <param name="operation" type="select" label="Select mode of operation"> |
78 <option value="pre">Pre-processing </option> | 47 <option value="pre">Pre-processing </option> |
79 <option value="clust">Clustering and classification</option> | 48 <option value="analysis">Clustering and classification</option> |
80 <option value="post">Post-processing</option> | 49 <option value="post">Post-processing</option> |
81 </param> | 50 </param> |
82 <when value="pre"> | 51 <when value="pre"> |
83 <param name="reads_bam" type="data" format="bam" label="BAM file containing alignments" /> | 52 <param name="reads_bam" type="data" format="bam" label="BAM file containing alignments" /> |
84 </when> | 53 </when> |
85 <when value="clust"> | 54 <when value="analysis"> |
86 <param name="input_bbo" type="data" format="tabular" label="Input blockgroups file" /> | 55 <param name="input_bbo" type="data" format="tabular" label="Input blockgroups file" /> |
87 <param name="reference" type="select" label="Select reference genome"> | 56 <param name="reference" type="select" label="Select reference genome"> |
88 <option value="hg19">Human (hg19)</option> | 57 <option value="hg19">Human (hg19)</option> |
89 <option value="mm10">Mouse (mm10)</option> | 58 <option value="mm10">Mouse (mm10)</option> |
90 <option value="dm3">Fly (dm3)</option> | 59 <option value="dm3">Fly (dm3)</option> |
100 <option value="no">No</option> | 69 <option value="no">No</option> |
101 <option value="yes">Yes</option> | 70 <option value="yes">Yes</option> |
102 </param> | 71 </param> |
103 <when value="yes"> | 72 <when value="yes"> |
104 <param name="pred_mode" type="select" label="Mode of classification"> | 73 <param name="pred_mode" type="select" label="Mode of classification"> |
105 <option value="model_based">Model based</option> | 74 <option value="MODEL">Model based</option> |
106 <option value="nearest_neighbour">Nearest neighbour</option> | 75 <option value="NEAREST">Nearest neighbour</option> |
107 </param> | 76 </param> |
108 </when> | 77 </when> |
109 </conditional> | 78 </conditional> |
110 </when> | 79 </when> |
111 <when value="post"> | 80 <when value="post"> |
116 </conditional> | 85 </conditional> |
117 </inputs> | 86 </inputs> |
118 | 87 |
119 <outputs> | 88 <outputs> |
120 <data format="bed" name="tags_bed" label="BlockClust: BAM to BED on ${on_string}"> | 89 <data format="bed" name="tags_bed" label="BlockClust: BAM to BED on ${on_string}"> |
121 <filter> tool_mode["operation"]=="pre"</filter> | 90 <filter>tool_mode["operation"]=="pre"</filter> |
122 </data> | 91 </data> |
123 <data format="pdf" name="hclust_plot" label="BlockClust: Hierarchical clustering plot on ${on_string}" > | 92 <data format="pdf" name="hclust_plot" from_work_dir="hclust_tree.pdf" label="BlockClust: Hierarchical clustering plot on ${on_string}" > |
124 <filter> tool_mode["operation"]=="clust"</filter> | 93 <filter>tool_mode["operation"]=="analysis"</filter> |
125 </data> | 94 </data> |
126 <data format="bed" name="clusters" label="BlockClust: BED of predicted clusters on ${on_string}"> | 95 <data format="bed" name="clusters" from_work_dir="mcl_clusters/all_clusters.bed" label="BlockClust: BED of predicted clusters on ${on_string}"> |
127 <filter> tool_mode["operation"]=="clust"</filter> | 96 <filter>tool_mode["operation"]=="analysis"</filter> |
128 </data> | 97 </data> |
129 <data format="bed" name="model_based_pred_bed" label="BlockClust: Model based predictions BED on ${on_string}"> | 98 <data format="bed" name="model_based_pred_bed" from_work_dir="model_based_predictions.txt" label="BlockClust: Model based predictions BED on ${on_string}"> |
130 <filter> | 99 <filter> |
131 (( | 100 (( |
132 tool_mode["operation"] == 'clust' and | 101 tool_mode["operation"] == 'analysis' and |
133 tool_mode["pred"]["enable_pred"] == "yes" and | 102 tool_mode["pred"]["enable_pred"] == "yes" and |
134 tool_mode["pred"]["pred_mode"] == "model_based" | 103 tool_mode["pred"]["pred_mode"] == "MODEL" |
135 )) | 104 )) |
136 </filter> | 105 </filter> |
137 </data> | 106 </data> |
138 <data format="bed" name="nearest_neighbour_pred_bed" label="BlockClust: Nearest neighbor predictions BED on ${on_string}"> | 107 <data format="bed" name="nearest_neighbour_pred_bed" from_work_dir="nearest_neighbour_predictions.txt" label="BlockClust: Nearest neighbor predictions BED on ${on_string}"> |
139 <filter> | 108 <filter> |
140 (( | 109 (( |
141 tool_mode["operation"] == 'clust' and | 110 tool_mode["operation"] == 'analysis' and |
142 tool_mode["pred"]["enable_pred"] == "yes" and | 111 tool_mode["pred"]["enable_pred"] == "yes" and |
143 tool_mode["pred"]["pred_mode"] == "nearest_neighbour" | 112 tool_mode["pred"]["pred_mode"] == "NEAREST" |
144 )) | 113 )) |
145 </filter> | 114 </filter> |
146 </data> | 115 </data> |
147 <data format="tabular" name="sim_tab_out" label="BlockClust: Pairwise similarities on ${on_string}"> | 116 <data format="tabular" name="sim_tab_out" from_work_dir="discretized.gspan.tab" label="BlockClust: Pairwise similarities on ${on_string}"> |
148 <filter> tool_mode["operation"]=="clust"</filter> | 117 <filter>tool_mode["operation"]=="analysis"</filter> |
149 </data> | 118 </data> |
150 <data format="pdf" name="cluster_dist" from_work_dir="cluster_distribution.pdf" label="BlockClust: Cluster distribution on ${on_string}" > | 119 <data format="pdf" name="cluster_dist" from_work_dir="cluster_distribution.pdf" label="BlockClust: Cluster distribution on ${on_string}" > |
151 <filter> tool_mode["operation"]=="post"</filter> | 120 <filter>tool_mode["operation"]=="post"</filter> |
152 </data> | 121 </data> |
153 <data format="pdf" name="cluster_hclust" from_work_dir="hclust_tree_clusters.pdf" label="BlockClust: Hierarchical clustering plot of cluster centroids on ${on_string}" > | 122 <data format="pdf" name="cluster_hclust" from_work_dir="hclust_tree_clusters.pdf" label="BlockClust: Hierarchical clustering plot of cluster centroids on ${on_string}" > |
154 <filter> tool_mode["operation"]=="post"</filter> | 123 <filter>tool_mode["operation"]=="post"</filter> |
155 </data> | 124 </data> |
156 </outputs> | 125 </outputs> |
126 <tests> | |
127 <!-- Test: PRE mode --> | |
128 | |
129 <test expect_num_outputs="1"> | |
130 <param name="operation" value="pre"/> | |
131 <param name="reads_bam" value="test.bam"/> | |
132 <output name="tags_bed"> | |
133 <assert_contents> | |
134 <has_text_matching expression="chr6\t26555497\t26555527\ttag_10|1|19\t0.052632\t+" /> | |
135 <has_text_matching expression="chr11\t122017275\t122017297\ttag_30|1|3\t0.333333\t-" /> | |
136 </assert_contents> | |
137 </output> | |
138 </test> | |
139 | |
140 <!-- Test: Clustering only --> | |
141 <test expect_num_outputs="3"> | |
142 <param name="operation" value="analysis"/> | |
143 <param name="input_bbo" value="test.tabular"/> | |
144 <param name="reference" value="hg19"/> | |
145 <param name="enable_pred" value="no"/> | |
146 <output name="clusters"> | |
147 <assert_contents> | |
148 <has_text_matching expression="chr1\t173833959\t173834043\t10:snoRNA_CD-box:blockgroup_939:cluster_1\t451.50\t-" /> | |
149 <has_text_matching expression="chr13\t92003008\t92003075\t8:miRNA:blockgroup_256:cluster_3\t2950.50\t\+" /> | |
150 </assert_contents> | |
151 </output> | |
152 </test> | |
153 | |
154 <!-- Test: Model based prediction --> | |
155 | |
156 <test expect_num_outputs="4"> | |
157 <param name="operation" value="analysis"/> | |
158 <param name="input_bbo" value="test.tabular"/> | |
159 <param name="reference" value="hg19"/> | |
160 <param name="enable_pred" value="yes"/> | |
161 <param name="pred_mode" value="MODEL"/> | |
162 <output name="model_based_pred_bed"> | |
163 <assert_contents> | |
164 <has_text_matching expression="chr2\t203211000\t203211097\tpredicted_tRNA\t284.07\t-" /> | |
165 </assert_contents> | |
166 </output> | |
167 </test> | |
168 | |
169 <!-- Test: Nearest neighbour based prediction --> | |
170 | |
171 <test expect_num_outputs="4"> | |
172 <param name="operation" value="analysis"/> | |
173 <param name="input_bbo" value="test.tabular"/> | |
174 <param name="reference" value="hg19"/> | |
175 <param name="enable_pred" value="yes"/> | |
176 <param name="pred_mode" value="NEAREST"/> | |
177 <output name="nearest_neighbour_pred_bed"> | |
178 <assert_contents> | |
179 <has_text_matching expression="chr2\t203211000\t203211097\tpredicted_tRNA\t284.07\t-" /> | |
180 </assert_contents> | |
181 </output> | |
182 </test> | |
183 | |
184 </tests> | |
157 <help> | 185 <help> |
158 <![CDATA[ | 186 <![CDATA[ |
159 | 187 |
160 .. class:: infomark | 188 .. class:: infomark |
161 | 189 |