# HG changeset patch # User peterjc # Date 1493203628 14400 # Node ID c5f20ca77de2d50a4c7f133485bbdd869c7e9785 # Parent a212d2984601de5ce71265a2fa9b0d5c30bc7056 planemo upload for repository https://github.com/peterjc/galaxy_blast/tree/master/tools/ncbi_blast_plus commit de1ad30e756a7073c422d5677fe5c6750521fa1b-dirty diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/README.rst --- a/tools/ncbi_blast_plus/README.rst Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/README.rst Wed Apr 26 06:47:08 2017 -0400 @@ -1,7 +1,7 @@ Galaxy wrappers for NCBI BLAST+ suite ===================================== -These wrappers are copyright 2010-2016 by Peter Cock (The James Hutton Institute, +These wrappers are copyright 2010-2017 by Peter Cock (The James Hutton Institute, UK) and additional contributors including Edward Kirton, John Chilton, Nicola Soranzo, Jim Johnson, and Bjoern Gruening. @@ -242,6 +242,8 @@ - ``blastxml_to_tabular`` now also gives percentage idenity to 3dp. - Removed never-used binary and Python module dependency declarations (internal change only). +v0.2.01 - Use ```` (internal change only). + - Single quote command line arguments (internal change only). ======= ====================================================================== diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/blastxml_to_tabular.xml --- a/tools/ncbi_blast_plus/blastxml_to_tabular.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/blastxml_to_tabular.xml Wed Apr 26 06:47:08 2017 -0400 @@ -3,21 +3,16 @@ ncbi_macros.xml - - - - - - blastxml_to_tabular.py --version - -blastxml_to_tabular.py -o "$tabular_file" + python $__tool_directory__/blastxml_to_tabular.py --version + +python $__tool_directory__/blastxml_to_tabular.py -o '$tabular_file' #if $output.out_format == "cols": #set cols = (str($output.std_cols)+","+str($output.ext_cols)).replace("None", " ").replace(",,", ",").replace(",", " ") --c "$cols" +-c '$cols' #else --c "$output.out_format" +-c '$output.out_format' #end if -#for i in $blastxml_file#"${i}" #end for# +#for i in $blastxml_file#'${i}' #end for# diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_blastdbcmd_info.xml --- a/tools/ncbi_blast_plus/ncbi_blastdbcmd_info.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_blastdbcmd_info.xml Wed Apr 26 06:47:08 2017 -0400 @@ -5,7 +5,7 @@ ncbi_macros.xml - + blastdbcmd -dbtype $db_opts.db_type -db "${db_opts.database.fields.path}" -info -out "$info" diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml Wed Apr 26 06:47:08 2017 -0400 @@ -5,7 +5,7 @@ ncbi_macros.xml - + ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces blastdbcmd -dbtype $db_opts.db_type -db "${db_opts.database.fields.path}" @@ -13,7 +13,7 @@ ##TODO: What about -ctrl_a and -target_only as advanced options? #if $id_opts.id_type=="file": --entry_batch "$id_opts.entries" +-entry_batch '$id_opts.entries' #else: ##Perform some simple search/replaces to remove whitespace ##and make it comma separated. Quoted so don't escape pipes. @@ -40,11 +40,11 @@ ##using sed, however the exact syntax differs for Mac OS X's sed #if str($outfmt)=="blastid": --out "$seq" +-out '$seq' #else if sys.platform == "darwin": -| sed -E 's/^>(lcl\||gnl\|BL_ORD_ID\|[0-9]* )/>/1' > "$seq" +| sed -E 's/^>(lcl\||gnl\|BL_ORD_ID\|[0-9]* )/>/1' > "$seq" #else: -| sed 's/>\(lcl|\|gnl|BL_ORD_ID|[0-9]* \)/>/1' > "$seq" +| sed 's/>\(lcl|\|gnl|BL_ORD_ID|[0-9]* \)/>/1' > "$seq" #end if diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml Wed Apr 26 06:47:08 2017 -0400 @@ -6,11 +6,11 @@ - + ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces blastn --query "$query" +-query '$query' @BLAST_DB_SUBJECT@ -task $blast_type -evalue $evalue_cutoff diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml Wed Apr 26 06:47:08 2017 -0400 @@ -6,11 +6,11 @@ - + ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces blastp --query "$query" +-query '$query' @BLAST_DB_SUBJECT@ -task $blast_type -evalue $evalue_cutoff diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml Wed Apr 26 06:47:08 2017 -0400 @@ -6,11 +6,11 @@ - + ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces blastx --query "$query" +-query '$query' @BLAST_DB_SUBJECT@ -query_gencode $query_gencode -task $blast_type diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_convert2blastmask_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_convert2blastmask_wrapper.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_convert2blastmask_wrapper.xml Wed Apr 26 06:47:08 2017 -0400 @@ -5,15 +5,15 @@ ncbi_macros.xml - + ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces convert2blastmask --in $infile --masking_algorithm "$masking_algorithm" --masking_options "$masking_options" +-in '$infile' +-masking_algorithm '$masking_algorithm' +-masking_options '$masking_options' $parse_seqids --out "$outfile" +-out '$outfile' -outfmt $outformat diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml Wed Apr 26 06:47:08 2017 -0400 @@ -6,18 +6,18 @@ ncbi_macros.xml - + ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces dustmasker #if $db_opts.db_opts_selector == "db": - -in "${db_opts.database.fields.path}" -infmt blastdb + -in '${db_opts.database.fields.path}' -infmt blastdb #elif $db_opts.db_opts_selector == "histdb": - -in "${os.path.join($db_opts.histdb.files_path, 'blastdb')}" -infmt blastdb + -in '${os.path.join($db_opts.histdb.files_path, "blastdb")}' -infmt blastdb #else: - -in "$subject" -infmt fasta + -in '$subject' -infmt fasta #end if --out "$outfile" +-out '$outfile' -window $window -level $level -linker $linker -outfmt $outformat diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_macros.xml --- a/tools/ncbi_blast_plus/ncbi_macros.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_macros.xml Wed Apr 26 06:47:08 2017 -0400 @@ -1,5 +1,5 @@ - 0.2.00 + 0.2.01 @@ -8,15 +8,6 @@ blast - - - - - - - - - @BINARY@ -version @@ -351,23 +342,24 @@ -num_threads "\${GALAXY_SLOTS:-8}" #if $db_opts.db_opts_selector == "db": - -db "${' '.join(str( $db_opts.database.fields.path ).split( ',' ))}" + -db '${" ".join(str($db_opts.database.fields.path).split(","))}' #elif $db_opts.db_opts_selector == "histdb": - -db "${os.path.join($db_opts.histdb.extra_files_path,'blastdb')}" + -db '${os.path.join($db_opts.histdb.extra_files_path, "blastdb")}' #else: - -subject "$db_opts.subject" + -subject '$db_opts.subject' #end if - -out "$output1" + -out '$output1' ##Set the extended list here so when we add things, saved workflows are not affected #if str($output.out_format)=="ext": - -outfmt "6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles" + -outfmt '6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles' #elif str($output.out_format)=="cols" ##Pick your own columns. Galaxy gives us it comma separated, BLAST+ wants space separated: ##TODO - Can we catch the user picking no columns and raise an error here? #set cols = (str($output.std_cols)+","+str($output.ext_cols)+","+str($output.ids_cols)+","+str($output.misc_cols)+","+str($output.tax_cols)).replace("None", "").replace(",,", ",").replace(",", " ").strip() - -outfmt "6 $cols" + -outfmt '6 $cols' #else: +## Note do not quote this as can be '0 -html' which is really two arguments -outfmt $output.out_format #end if @@ -394,11 +386,11 @@ #if str($db_opts.db_opts_selector)=='db' -${db_opts.database} +'${db_opts.database}' #elif str($db_opts.db_opts_selector)=='histdb' -${db_opts.histdb.name} +'${db_opts.histdb.name}' #else -${db_opts.subject.name} +'${db_opts.subject.name}' #end if Peter J. A. Cock, John M. Chilton, Björn Grüning, James E. Johnson, Nicola Soranzo (2015). diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_makeblastdb.xml --- a/tools/ncbi_blast_plus/ncbi_makeblastdb.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_makeblastdb.xml Wed Apr 26 06:47:08 2017 -0400 @@ -5,23 +5,24 @@ ncbi_macros.xml - check_no_duplicates.py + +python $__tool_directory__/check_no_duplicates.py ##First check for duplicates (since BLAST+ 2.2.28 fails to do so) ##and abort (via the ampersand ampersand trick) if any are found. -#for i in $input_file#"${i}" #end for# +#for i in $input_file#'${i}' #end for# && -makeblastdb -out "${os.path.join($outfile.files_path,'blastdb')}" +makeblastdb -out '${os.path.join($outfile.files_path, "blastdb")}' $parse_seqids $hash_index ## Single call to -in with multiple filenames space separated with outer quotes ## (presumably any filenames with spaces would be a problem). Note this gives ## some extra spaces, e.g. -in "file1 file2 file3 " but BLAST seems happy: --in "#for i in $input_file#${i} #end for#" +-in '#for i in $input_file#${i} #end for#' #if $title: --title "$title" +-title '$title' #else: ##Would default to being based on the cryptic Galaxy filenames, which is unhelpful --title "BLAST Database" +-title 'BLAST Database' #end if -dbtype $dbtype ## -------------------------------------------------------------------- @@ -31,7 +32,7 @@ ## See Trello issue https://trello.com/c/lp5YmA1O #if ' '.join( map(str, $mask_data_file) ) != 'None': #for i in $mask_data_file: --mask_data "${i}" +-mask_data '${i}' #end for #end if ## -------------------------------------------------------------------- diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_makeprofiledb.xml --- a/tools/ncbi_blast_plus/ncbi_makeprofiledb.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_makeprofiledb.xml Wed Apr 26 06:47:08 2017 -0400 @@ -5,19 +5,19 @@ ncbi_macros.xml - + ##Unlike makeblastdb, makeprofiledb needs directory to exist already: mkdir -p $outfile.files_path && -makeprofiledb -out "${os.path.join($outfile.files_path,'blastdb')}" +makeprofiledb -out '${os.path.join($outfile.files_path, "blastdb")}' ##We turn $infile_list into $infiles with a configfile entry defined below --in $infiles +-in '$infiles' #if $title: --title "$title" +-title '$title' #else: ##Would default to being based on the cryptic Galaxy filenames, which is unhelpful --title "Profile Database" +-title 'Profile Database' #end if -threshold $threshold @@ -32,7 +32,7 @@ -obsr_threshold $obsr_threshold -exclude_invalid $exclude_invalid --logfile "$outfile" +-logfile '$outfile' diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml Wed Apr 26 06:47:08 2017 -0400 @@ -6,15 +6,15 @@ - + ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces rpsblast --query "$query" +-query '$query' #if $db_opts.db_opts_selector == "db": - -db "${db_opts.database.fields.path}" + -db '${db_opts.database.fields.path}' #elif $db_opts.db_opts_selector == "histdb": - -db "${os.path.join($db_opts.histdb.files_path,'blastdb')}" + -db '${os.path.join($db_opts.histdb.files_path, "blastdb")}' #end if -evalue $evalue_cutoff @BLAST_OUTPUT@ diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml Wed Apr 26 06:47:08 2017 -0400 @@ -6,15 +6,15 @@ - + ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces rpstblastn --query "$query" +-query '$query' #if $db_opts.db_opts_selector == "db": - -db "${db_opts.database.fields.path}" + -db '${db_opts.database.fields.path}' #elif $db_opts.db_opts_selector == "histdb": - -db "${os.path.join($db_opts.histdb.files_path,'blastdb')}" + -db '${os.path.join($db_opts.histdb.files_path, "blastdb")}' #end if -evalue $evalue_cutoff @BLAST_OUTPUT@ diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml Wed Apr 26 06:47:08 2017 -0400 @@ -5,18 +5,18 @@ ncbi_macros.xml - + ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces segmasker #if $db_opts.db_opts_selector == "db": - -in "${db_opts.database.fields.path}" -infmt blastdb + -in '${db_opts.database.fields.path}' -infmt blastdb #elif $db_opts.db_opts_selector == "histdb": - -in "${os.path.join($db_opts.histdb.files_path, 'blastdb')}" -infmt blastdb + -in '${os.path.join($db_opts.histdb.files_path, "blastdb")}' -infmt blastdb #else: - -in "$subject" -infmt fasta + -in '$subject' -infmt fasta #end if --out "$outfile" +-out '$outfile' -window $window -locut $locut -hicut $hicut diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml Wed Apr 26 06:47:08 2017 -0400 @@ -6,11 +6,11 @@ - + ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces tblastn --query "$query" +-query '$query' @BLAST_DB_SUBJECT@ -task $blast_type -evalue $evalue_cutoff diff -r a212d2984601 -r c5f20ca77de2 tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml Wed Apr 19 05:23:06 2017 -0400 +++ b/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml Wed Apr 26 06:47:08 2017 -0400 @@ -6,11 +6,11 @@ - + ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces tblastx --query "$query" +-query '$query' @BLAST_DB_SUBJECT@ -query_gencode $query_gencode -evalue $evalue_cutoff