Mercurial > repos > bgruening > infernal
comparison cmscan.xml @ 8:c9e29ac5d099 draft default tip
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/infernal commit a812ed8de433ac4e8b42afd636e70cfbb180d2b9"
author | bgruening |
---|---|
date | Thu, 23 Sep 2021 19:38:58 +0000 |
parents | 6e18e0b098cd |
children |
comparison
equal
deleted
inserted
replaced
7:477d829d3250 | 8:c9e29ac5d099 |
---|---|
1 <tool id="infernal_cmscan" name="cmscan" version="@VERSION@.0"> | 1 <tool id="infernal_cmscan" name="cmscan" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"> |
2 <description> Search sequences against collections of covariance models</description> | 2 <description> Search sequences against collections of covariance models</description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 </macros> | 5 </macros> |
6 <expand macro="requirements"/> | 6 <expand macro="requirements"/> |
7 <expand macro="stdio"/> | 7 <expand macro="stdio"/> |
8 <expand macro="xrefs"/> | |
8 <command> | 9 <command> |
9 <![CDATA[ | 10 <![CDATA[ |
10 ## a temp file is needed, because the standard tabular output from infernal is not usefull in Galaxy | 11 ## a temp file is needed, because the standard tabular output from infernal is not usefull in Galaxy |
11 ## it will be converted to a tab delimited file and piped to Galaxy | 12 ## it will be converted to a tab delimited file and piped to Galaxy |
12 temp_tabular_output=\$(mktemp) && | 13 temp_tabular_output=\$(mktemp) && |
71 ##'$cm_opts.cmfile' | 72 ##'$cm_opts.cmfile' |
72 cmdb.cm | 73 cmdb.cm |
73 #end if | 74 #end if |
74 ## sequence file | 75 ## sequence file |
75 '$seqdb' | 76 '$seqdb' |
76 && | 77 ######### Parse the output file in order to fix a problem reported in https://help.galaxyproject.org/t/messy-infernal-cmscan-output/5984 |
77 sed 's/ \+ /\t/g' '\$temp_tabular_output' > '$outfile' | 78 ## remove the header |
79 && tail -n +3 '\$temp_tabular_output' > headless_file | |
80 ## extract the last column, since the description includes a variable number of spaces (so, is not considered as a column by awk) | |
81 && awk '{$1=$2=$3=$4=$5=$6=$7=$8=$9=$10=$11=$12=$13=$14=$15=$16=$17=""; print $0}' headless_file > description_column | |
82 ## fix the tabulation the rest content (except the description column) | |
83 && awk 'OFS="\t" {print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17 > ("tabulated_columns")}' headless_file | |
84 ## add the description column to the tabulated data | |
85 && paste -d"\t" tabulated_columns description_column > joined_file | |
86 ## include a correct header | |
87 && echo -e '#target\tname\taccession\tquery name\taccession\tmdl\tmdl from\tmdl to\tseq from\tseq to\tstrand\ttrunc\tpass\tgc\tbias\tscore\tE-value\tinc\tdescription of target' > header | |
88 ## export the result | |
89 && cat header joined_file > '$outfile' | |
78 | 90 |
79 ]]> | 91 ]]> |
80 </command> | 92 </command> |
81 <inputs> | 93 <inputs> |
82 <param name="seqdb" type="data" format="fasta" label="Sequence database <seqfile>"/> | 94 <param name="seqdb" type="data" format="fasta" label="Sequence database <seqfile>"/> |
224 label="Only search the bottom (Crick) strand of target sequences" help="in the sequence database"/> | 236 label="Only search the bottom (Crick) strand of target sequences" help="in the sequence database"/> |
225 <param argument="--toponly" truevalue="--toponly" falsevalue="" checked="False" type="boolean" | 237 <param argument="--toponly" truevalue="--toponly" falsevalue="" checked="False" type="boolean" |
226 label="Only search the top (Watson) strand of target sequences" help="in the sequence database"/> | 238 label="Only search the top (Watson) strand of target sequences" help="in the sequence database"/> |
227 | 239 |
228 </section> | 240 </section> |
229 | |
230 | |
231 | |
232 </inputs> | 241 </inputs> |
233 <outputs> | 242 <outputs> |
234 <data format="tabular" name="outfile" label="cmscan on ${on_string}"/> | 243 <data format="tabular" name="outfile" label="cmscan on ${on_string}"/> |
244 | |
235 </outputs> | 245 </outputs> |
236 <tests> | 246 <tests> |
237 <test> | 247 <test> |
238 <conditional name="cm_opts"> | 248 <conditional name="cm_opts"> |
239 <param name="cm_opts_selector" value="histdb"/> | 249 <param name="cm_opts_selector" value="histdb"/> |
240 <param name="cmfile" value="minifam.cm" /> | 250 <param name="cmfile" value="minifam.cm" /> |
241 </conditional> | 251 </conditional> |
242 <param name="aux_files" value="minifam.tar" ftype="tar"/> | 252 <param name="aux_files" value="minifam.tar" ftype="tar"/> |
243 <param name="seqdb" value="metag-example.fa"/> | 253 <param name="seqdb" value="metag-example.fa"/> |
244 <output name="outfile"> | 254 <output name="outfile" file="test_cmscan.tabular" ftype="tabular" lines_diff="8"> |
245 <assert_contents> | 255 <assert_contents> |
256 <has_n_lines n="15"/> | |
246 <has_text text="AAGA01015927.1"/> | 257 <has_text text="AAGA01015927.1"/> |
247 </assert_contents> | 258 </assert_contents> |
248 </output> | 259 </output> |
249 </test> | 260 </test> |
250 | 261 |