Repository revision
35:cbf3f518b668

Repository 'ncbi_blast_plus'
hg clone https://toolshed.g2.bx.psu.edu/repos/devteam/ncbi_blast_plus

NCBI BLAST+ blastn tool metadata
Miscellaneous
Search nucleotide database with nucleotide query sequence(s)
ncbi_blastn_wrapper
toolshed.g2.bx.psu.edu/repos/devteam/ncbi_blast_plus/ncbi_blastn_wrapper/2.14.1+galaxy2
2.14.1+galaxy2
blastn -version
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/devteam/ncbi_blast_plus/ncbi_blastn_wrapper/2.14.1+galaxy2 (this tool)
toolshed.g2.bx.psu.edu/repos/devteam/ncbi_blast_plus/ncbi_blastn_wrapper/0.0.11
ncbi_blastn_wrapper
Requirements (dependencies defined in the <requirements> tag set)
name version type
blast 2.14.1 package
Additional information about this tool
## 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

#if $query.is_of_type('fasta.gz') and $query.ext != "fasta":
  -query <(gunzip -c '${query}')
#else:
  -query '${query}'
#end if
    

#if $db_opts.db_opts_selector == "db":
  -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")}'
#else:
    #if $db_opts.subject.is_of_type('fasta.gz') and $db_opts.subject.ext != "fasta":
        -subject <(gunzip -c '${$db_opts.subject}')
    #else:
        -subject '${db_opts.subject}'
    #end if
#end if
    
-task '${blast_type}'
-evalue '${evalue_cutoff}'
 -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'
#elif str($output.out_format)=="cols"
##Pick your own columns. Galaxy gives us it comma separated, BLAST+ wants space separated:
##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'
#else:
## Note do not quote this as can be '0 -html' which is really two arguments
    -outfmt ${output.out_format}
#end if
    
-num_threads "\${GALAXY_SLOTS:-8}"
#if $adv_opts.adv_opts_selector=="advanced":
${adv_opts.strand}
$adv_opts.filter_query

## Need int(str(...)) because $adv_opts.max_hits is an InputValueWrapper object not a string
##
## Quoting BLAST 2.7.1+ output from "blastp --help" or "blastn --help":
##
##  *** Formatting options
##   -num_descriptions <Integer, >=0>
##    Number of database sequences to show one-line descriptions for
##    Not applicable for outfmt > 4
##    Default = `500'
##     * Incompatible with:  max_target_seqs
##  -num_alignments <Integer, >=0>
##    Number of database sequences to show alignments for
##    Default = `250'
##     * Incompatible with:  max_target_seqs
##
##  *** Restrict search or results
##
##  -max_target_seqs <Integer, >=1>
##   Maximum number of aligned sequences to keep
##   Not applicable for outfmt <= 4
##   Default = `500'
##    * Incompatible with:  num_descriptions, num_alignments
##
## So, taken at face value we do still need to treat the Text and HTML output
## differently from the Tabular and XML, yet the treatment of these limits is
## different (during search or after the search when writing the output):
## https://blastedbio.blogspot.com/2015/12/blast-max-target-sequences-bug.html
##
## See also our user-facing help text.
#if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0):
    #if str($output.out_format) in ["6", "ext", "cols", "5"]:
        ## Most output formats use this, including tabular and XML:
        -max_target_seqs '${adv_opts.max_hits}'
    #else
        ## Text and HTML output formats 0-4 currently need this instead:
        -num_descriptions '${adv_opts.max_hits}' -num_alignments '${adv_opts.max_hits}'
    #end if
#end if
#if str($adv_opts.max_hsps)
    -max_hsps '${adv_opts.max_hsps}'
#end if
    

#if str($adv_opts.word_size):
-word_size '${adv_opts.word_size}'
#end if
$adv_opts.parse_deflines
    
#if (str($adv_opts.identity_cutoff) and float(str($adv_opts.identity_cutoff)) > 0 ):
-perc_identity '${adv_opts.identity_cutoff}'
#end if
${adv_opts.ungapped}

#if $adv_opts.adv_optional_id_files_opts.adv_optional_id_files_opts_selector == 'negative_gilist':
    -negative_gilist '${adv_opts.adv_optional_id_files_opts.negative_gilist}'
#elif $adv_opts.adv_optional_id_files_opts.adv_optional_id_files_opts_selector == 'gilist':
    -gilist '{$adv_opts.adv_optional_id_files_opts.gilist}'
#elif $adv_opts.adv_optional_id_files_opts.adv_optional_id_files_opts_selector == 'seqidlist':
    -seqidlist '${adv_opts.adv_optional_id_files_opts.seqidlist}'
#elif $adv_opts.adv_optional_id_files_opts.adv_optional_id_files_opts_selector == 'taxidlist':
    -taxidlist '${adv_opts.adv_optional_id_files_opts.taxidlist}'
#elif $adv_opts.adv_optional_id_files_opts.adv_optional_id_files_opts_selector == 'negative_taxidlist':
    -negative_taxidlist '${adv_opts.adv_optional_id_files_opts.negative_taxidlist}'
#end if
    

#if float(str($adv_opts.qcov_hsp_perc)) > 0:
    -qcov_hsp_perc '${adv_opts.qcov_hsp_perc}'
#end if
    
## only use window size if dc-megablast mode is used
#if ($blast_type == "dc-megablast"):
   
#if str($adv_opts.window_size):
-window_size '${adv_opts.window_size}'
#end if
    
#end if

#if str($adv_opts.gapopen):
-gapopen '${adv_opts.gapopen}'
#end if
    

#if str($adv_opts.gapextend):
-gapextend '${adv_opts.gapextend}'
#end if
    
## End of advanced options:
#end if

    
None
False
Parallelism
multi
query
to_size
1000
output1
Functional tests
name inputs outputs required files
Test-1 query: rhodopsin_nucs.fasta
db_opts|database:
db_opts|subject: three_human_mRNA.fasta
db_opts|db_opts_selector: file
evalue_cutoff: 1e-40
output|out_format: 5
adv_opts|adv_opts_selector: basic
name: value
rhodopsin_nucs.fasta
three_human_mRNA.fasta
value
Test-2 query: rhodopsin_nucs.fasta
db_opts|database:
db_opts|subject: three_human_mRNA.fasta
db_opts|db_opts_selector: file
evalue_cutoff: 1e-40
output|out_format: 6
adv_opts|adv_opts_selector: basic
name: value
rhodopsin_nucs.fasta
three_human_mRNA.fasta
value
Test-3 query: rhodopsin_nucs.fasta
db_opts|database:
db_opts|subject: three_human_mRNA.fasta.gz
db_opts|db_opts_selector: file
evalue_cutoff: 1e-40
output|out_format: 6
adv_opts|adv_opts_selector: basic
name: value
rhodopsin_nucs.fasta
three_human_mRNA.fasta.gz
value
Test-4 query: rhodopsin_nucs.fasta
db_opts|database:
db_opts|subject: three_human_mRNA.fasta
db_opts|db_opts_selector: file
evalue_cutoff: 1e-40
output|std_cols: ['qseqid', 'sseqid', 'pident']
output|ext_cols: ['qlen', 'slen']
output|out_format: cols
adv_opts|adv_opts_selector: basic
name: value
rhodopsin_nucs.fasta
three_human_mRNA.fasta
value
Test-5 query: chimera.fasta
db_opts|database: three_human_mRNA
db_opts|db_opts_selector: db
output|out_format: 6
adv_opts|max_hits: 1
adv_opts|adv_opts_selector: advanced
name: value
chimera.fasta
value
Test-6 query: chimera.fasta
db_opts|database: three_human_mRNA
db_opts|db_opts_selector: db
output|out_format: 0
adv_opts|max_hits: 1
adv_opts|adv_opts_selector: advanced
name: value
chimera.fasta
value
Test-7 query: chimera.fasta
db_opts|database: three_human_mRNA
db_opts|db_opts_selector: db
output|out_format: 6
name: value
chimera.fasta
value
Test-8 query: chimera.fasta
db_opts|database: rhodopsin_nucs
db_opts|db_opts_selector: db
output|out_format: 6
name: value
chimera.fasta
value
Test-9 query: chimera.fasta
db_opts|database: rhodopsin_nucs
db_opts|db_opts_selector: db
output|out_format: 6
adv_opts|max_hsps: 1
adv_opts|adv_opts_selector: advanced
name: value
chimera.fasta
value
Test-10 query: chimera.fasta
db_opts|database: ['three_human_mRNA', 'rhodopsin_nucs']
db_opts|db_opts_selector: db
output|out_format: 6
name: value
chimera.fasta
value