| Miscellaneous |
| Version lineage of this tool (guids ordered most recent to oldest) |
| toolshed.g2.bx.psu.edu/repos/bgruening/infernal/infernal_cmscan/1.1.5+galaxy0 (this tool) |
| toolshed.g2.bx.psu.edu/repos/bgruening/infernal/infernal_cmscan/1.1.2.0 |
| infernal_cmscan |
| Requirements (dependencies defined in the <requirements> tag set) |
| name | version | type |
| infernal | 1.1.5 | package |
| coreutils | 9.5 | package |
| Additional information about this tool |
## a temp file is needed, because the standard tabular output from infernal is not usefull in Galaxy
## it will be converted to a tab delimited file and piped to Galaxy
temp_tabular_output=\$(mktemp) &&
#if str($cm_opts.cm_opts_selector) == "histdb":
ln -s '$cm_opts.cmfile' cmdb.cm
#else:
ln -s '$cm_opts.database.fields.path' cmdb.cm
#end if
&&
tar xvf '$aux_files' &&
ln -s `find *.i1f` cmdb.cm.i1f &&
ln -s `find *.i1i` cmdb.cm.i1i &&
ln -s `find *.i1m` cmdb.cm.i1m &&
ln -s `find *.i1p` cmdb.cm.i1p &&
cmscan
--cpu "\${GALAXY_SLOTS:-2}"
--tblout '\$temp_tabular_output'
-o /dev/null
$g
#if $Z
-Z $Z
#end if
$verbose
$other_opts.notrunc
$other_opts.anytrunc
$other_opts.nonull3
#if $other_opts.smxsize <> 128.0
--smxsize $other_opts.smxsize
#end if
#if $other_opts.mxsize <> 128.0
--mxsize $other_opts.mxsize
#end if
$other_opts.cyk
$other_opts.acyk
$other_opts.bottomonly
$other_opts.toponly
#if str($inclusion_thresholds_opts.inclusion_thresholds_selector) == "--incE":
--incE $inclusion_thresholds_opts.incE
#elif str($inclusion_thresholds_opts.inclusion_thresholds_selector) == "--incT":
--incT $inclusion_thresholds_opts.incT
#end if
#if str($reporting_thresholds_opts.reporting_thresholds_selector) == "-E":
-E $reporting_thresholds_opts.E
#elif str($reporting_thresholds_opts.reporting_thresholds_selector) == "-T":
-T $reporting_thresholds_opts.T
#end if
$model_thresholds.cut_ga
$model_thresholds.cut_nc
$model_thresholds.cut_tc
#if $acceleration_huristics.acceleration_huristics_selector == "FZ"
--FZ $$acceleration_huristics.FZ
#else
$acceleration_huristics.acceleration_huristics_selector
#if $acceleration_huristics.acceleration_huristics_selector == "--mid"
--Fmid $acceleration_huristics.Fmid
#end if
#end if
## CM file from the history or stored as database on disc
cmdb.cm
## sequence file
'$seqdb'
######### Parse the output file in order to fix a problem reported in https://help.galaxyproject.org/t/messy-infernal-cmscan-output/5984
## remove the header
&& tail -n +3 '\$temp_tabular_output' > headless_file
## extract the last column, since the description includes a variable number of spaces (so, is not considered as a column by awk)
&& awk '{$1=$2=$3=$4=$5=$6=$7=$8=$9=$10=$11=$12=$13=$14=$15=$16=$17=""; print $0}' headless_file > description_column
## fix the tabulation the rest content (except the description column)
&& 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
## add the description column to the tabulated data
&& paste -d"\t" tabulated_columns description_column > joined_file
## include a correct header
&& 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
## export the result
&& cat header joined_file > '$outfile'
| Functional tests |
| name | inputs | outputs | required files |
| Test-1 |
seqdb: metag-example.fa cm_opts|cmfile: minifam.cm cm_opts|cm_opts_selector: histdb aux_files: minifam.tar |
name: value |
metag-example.fa minifam.cm minifam.tar value |
| Test-2 |
seqdb: metag-example.fa cm_opts|database: minifam.cm cm_opts|cm_opts_selector: db aux_files: minifam.tar |
name: value |
metag-example.fa minifam.tar value |