Mercurial > repos > jjohnson > defuse
diff defuse.xml @ 4:679a5c7b1294 draft
deFuse version 0.5.0 - Use tool_dependencies.xml
author | Jim Johnson <jj@umn.edu> |
---|---|
date | Fri, 04 Jan 2013 13:29:03 -0600 |
parents | c90022a13c7c |
children | 3bd1087db05e |
line wrap: on
line diff
--- a/defuse.xml Fri Jan 06 16:06:17 2012 -0600 +++ b/defuse.xml Fri Jan 04 13:29:03 2013 -0600 @@ -1,7 +1,10 @@ -<tool id="defuse" name="DeFuse" version="1.2"> +<tool id="defuse" name="DeFuse" version="1.5"> <description>identify fusion transcripts</description> <requirements> - <requirement type="binary"></requirement> + <requirement type="package" version="0.5.0">defuse</requirement> + <requirement type="package">bowtie</requirement> + <requirement type="package">blat</requirement> + <requirement type="package">fatotwobit</requirement> </requirements> <command interpreter="command"> /bin/bash $shscript </command> <inputs> @@ -69,7 +72,7 @@ </when> <!-- history --> </conditional> <!-- refGenomeSource --> <param name="keep_output" type="boolean" checked="true" truevalue="yes" falsevalue="no" label="Save DeFuse working directory files"/> - <param name="do_get_reads" type="boolean" checked="false" truevalue="yes" falsevalue="no" label="Run get_reads on each cluster"/> + <param name="do_get_reads" type="boolean" checked="true" truevalue="yes" falsevalue="no" label="Run get_reads on each cluster"/> </inputs> <configfiles> <configfile name="defuse_config"> @@ -91,15 +94,7 @@ #try $ref_dict['source_directory'] #except -#try -## Try to find the defuse source dir in the galaxy tool path -#import Cheetah.FileUtils -#set $toolpath = '/'.join([$__root_dir__,'tools','defuse']) -#set $defuse = $Cheetah.FileUtils.findFiles($toolpath,['defuse.pl'],[],['tools','external','include','em','data'])[0] -$defuse.replace('/scripts/defuse.pl','') -#except -${__root_dir__}/tools/defuse/defuse -#end try +__DEFUSE_PATH__ #end try # Directory where you want your dataset @@ -159,37 +154,37 @@ #try $ref_dict['bowtie_bin'] #except -/soft/bowtie/0.12.7/bowtie +__BOWTIE_BIN__ #end try bowtie_build_bin = #slurp #try $ref_dict['bowtie_build_bin'] #except -/soft/bowtie/0.12.7/bowtie-build +__BOWTIE_BUILD_BIN__ #end try blat_bin = #slurp #try $ref_dict['blat_bin'] #except -/soft/blat/34/bin/blat +__BLAT_BIN__ #end try fatotwobit_bin = #slurp #try $ref_dict['fatotwobit_bin'] #except -/soft/blat/34/bin/faToTwoBit +__FATOTWOBIT_BIN__ #end try r_bin = #slurp #try $ref_dict['r_bin'] #except -/project/sdml-sles11-weblocal/R-2.12.1/bin/R +__R_BIN__ #end try rscript_bin = #slurp #try $ref_dict['rscript_bin'] #except -/project/sdml-sles11-weblocal/R-2.12.1/bin/Rscript +__RSCRIPT_BIN__ #end try #raw @@ -499,14 +494,12 @@ #!/bin/bash ## define some things for cheetah proccessing #set $ds = chr(36) +#set $amp = chr(38) #set $gt = chr(62) #set $lt = chr(60) #set $echo_cmd = 'echo' ## Find the defuse.pl in the galaxy tool path #import Cheetah.FileUtils -#set $toolpath = '/'.join([$__root_dir__,'tools','defuse']) -#set $defuse = $Cheetah.FileUtils.findFiles($toolpath,['defuse.pl'],[],['tools','external','include','em','data'])[0] -#set $get_reads = $Cheetah.FileUtils.findFiles($toolpath,['get_reads.pl'],[],['tools','external','include','em','data'])[0] ## declare a bash function for converting a results tsv into html with links to the get_reads output files results2html() { rlts=${ds}1 @@ -531,10 +524,21 @@ for i in `awk '${ds}1 ~ /[1-9][0-9]*/{print ${ds}1}' ${ds}rlts`; do fn=cluster_${ds}{i}_reads.txt; pn=${ds}_EFP/${ds}fn; - perl $get_reads -c $defuse_config -o output_dir -i ${ds}i ${gt} ${ds}pn; + perl \${DEFUSE_PATH}/scripts/get_reads.pl -c $defuse_config -o output_dir -i ${ds}i ${gt} ${ds}pn; done fi } +## substitute pathnames into config file +if `grep __DEFUSE_PATH__ $defuse_config ${gt} /dev/null`;then sed -i'.tmp' "s#__DEFUSE_PATH__#\${DEFUSE_PATH}#" $defuse_config; fi +if `grep __SAMTOOLS_BIN__ $defuse_config ${gt} /dev/null` ${amp}${amp} SAMTOOLS_BIN=`which samtools`;then sed -i'.tmp' "s#__SAMTOOLS_BIN__#\${SAMTOOLS_BIN}#" $defuse_config; fi +if `grep __BOWTIE_BIN__ $defuse_config ${gt} /dev/null` ${amp}${amp} BOWTIE_BIN=`which bowtie`;then sed -i'.tmp' "s#__BOWTIE_BIN__#\${BOWTIE_BIN}#" $defuse_config; fi +if `grep __BOWTIE_BUILD_BIN__ $defuse_config ${gt} /dev/null` ${amp}${amp} BOWTIE_BUILD_BIN=`which bowtie-build`;then sed -i'.tmp' "s#__BOWTIE_BUILD_BIN__#\${BOWTIE_BUILD_BIN}#" $defuse_config; fi +if `grep __BLAT_BIN__ $defuse_config ${gt} /dev/null` ${amp}${amp} BLAT_BIN=`which blat`;then sed -i'.tmp' "s#__BLAT_BIN__#\${BLAT_BIN}#" $defuse_config; fi +if `grep __FATOTWOBIT_BIN__ $defuse_config ${gt} /dev/null` ${amp}${amp} FATOTWOBIT_BIN=`which faToTwoBit`;then sed -i'.tmp' "s#__FATOTWOBIT_BIN__#\${FATOTWOBIT_BIN}#" $defuse_config; fi +if `grep __R_BIN__ $defuse_config ${gt} /dev/null` ${amp}${amp} R_BIN=`which R`;then sed -i'.tmp' "s#__R_BIN__#\${R_BIN}#" $defuse_config; fi +if `grep __RSCRIPT_BIN__ $defuse_config ${gt} /dev/null` ${amp}${amp} RSCRIPT_BIN=`which Rscript`;then sed -i'.tmp' "s#__RSCRIPT_BIN__#\${RSCRIPT_BIN}#" $defuse_config; fi + + ## copy config to output cp $defuse_config $config_txt ## make a data_dir and ln -s the input fastq @@ -549,7 +553,7 @@ mkdir -p output_dir #end if ## run defuse.pl -perl $defuse -c $defuse_config -d data_dir -o output_dir -p 8 +perl \${DEFUSE_PATH}/scripts/defuse.pl -c $defuse_config -d data_dir -o output_dir -p 8 ## copy primary results to output datasets if [ -e output_dir/log/defuse.log ]; then cp output_dir/log/defuse.log $defuse_log; fi if [ -e output_dir/results.tsv ]; then cp output_dir/results.tsv $results_tsv; fi