Repository revision
11:55e500606bbe

Repository 'bbtools_bbduk'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/bbtools_bbduk

BBTools: BBduk tool metadata
Miscellaneous
decontamination using kmers
bbtools_bbduk
toolshed.g2.bx.psu.edu/repos/iuc/bbtools_bbduk/bbtools_bbduk/39.08+galaxy2
39.08+galaxy2
None
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/iuc/bbtools_bbduk/bbtools_bbduk/39.08+galaxy3
toolshed.g2.bx.psu.edu/repos/iuc/bbtools_bbduk/bbtools_bbduk/39.08+galaxy2 (this tool)
toolshed.g2.bx.psu.edu/repos/iuc/bbtools_bbduk/bbtools_bbduk/39.08+galaxy1
toolshed.g2.bx.psu.edu/repos/iuc/bbtools_bbduk/bbtools_bbduk/39.08+galaxy0
toolshed.g2.bx.psu.edu/repos/iuc/bbtools_bbduk/bbtools_bbduk/39.06+galaxy2
toolshed.g2.bx.psu.edu/repos/iuc/bbtools_bbduk/bbtools_bbduk/39.06+galaxy1
toolshed.g2.bx.psu.edu/repos/iuc/bbtools_bbduk/bbtools_bbduk/39.06+galaxy0
toolshed.g2.bx.psu.edu/repos/iuc/bbtools_bbduk/bbtools_bbduk/39.01+galaxy0
toolshed.g2.bx.psu.edu/repos/iuc/bbtools_bbduk/bbtools_bbduk/1.0.0+galaxy3
toolshed.g2.bx.psu.edu/repos/iuc/bbtools_bbduk/bbtools_bbduk/1.0.0+galaxy2
toolshed.g2.bx.psu.edu/repos/iuc/bbtools_bbduk/bbtools_bbduk/1.0.0+galaxy1.0.0
bbtools_bbduk
Requirements (dependencies defined in the <requirements> tag set)
name version type
bbmap 39.08 package
samtools 1.20 package
Additional information about this tool
#import os

#if str($input_type_cond.input_type) in ['single', 'pair']:
    #set read1 = $input_type_cond.read1
    ## bbduk uses the file extension to determine the input format.
    #set ext = '.fastq'
    #if $read1.ext.endswith('.gz'):
        #set ext = $ext + '.gz'
    #end if
    #set read1_file = 'forward'  + $ext
    ln -s '${read1}' '${read1_file}' &&
    #if str($input_type_cond.input_type) == 'pair':
        #set read2 = $input_type_cond.read2
        #set read2_file = 'reverse' + $ext
        ln -s '${read2}' '${read2_file}' &&
    #end if
#else:
    #set read1 = $input_type_cond.reads_collection['forward']
    ## bbduk uses the file extension to determine the input format.
    #set ext = '.fastq'
    #if $read1.ext.endswith('.gz'):
        #set ext = $ext + '.gz'
    #end if
    #set read1_file = 'forward' + $ext
    ln -s '${read1}' '${read1_file}' &&
    #set read2 = $input_type_cond.reads_collection['reverse']
    #set read2_file = 'reverse' + $ext
    ln -s '${read2}' '${read2_file}' &&
#end if

#if str($reference_type_cond.reference_type) == 'files':
    #set refs = list()
    #for ref in $reference_type_cond.reference:
        ## bbduk looks at the file extension.
        #set ref_name = str($os.path.basename($ref.file_name)) + '.fa'
        #if $ref.ext.endswith('.gz'):
            gunzip -c '$ref' > '$ref_name' &&
        #else:
            ln -s '$ref' '$ref_name' &&
        #end if
        $refs.append(str($ref_name))
    #end for
    #set refs = ','.join($refs)
#else if str($reference_type_cond.reference_type) == 'keywords':
    #set refs = str($reference_type_cond.reference)
#end if

bbduk.sh
in='${read1_file}'

#if str($input_type_cond.input_type) in ['pair', 'paired']:
    in2='${read2_file}'
#end if
#if str($outputs_select).find('outu') >= 0:
    out='${outputu}'
    #if str($input_type_cond.input_type) in ['pair', 'paired']:
        out2='${outputu2}'
    #end if
#end if
#if str($outputs_select).find('outm') >= 0:
    outm='${outputm}'
    #if str($input_type_cond.input_type) in ['pair', 'paired']:
        outm2='${outputm2}'
    #end if
#end if
#if str($outputs_select).find('outs') >= 0:
    outs='${outputs}'
#end if

#if str($reference_type_cond.reference_type) != 'no_reference':
    ref='$refs'
    #if str($reference_type_cond.ktrim_cond.ktrim_select) == 'yes':
        ktrim='${reference_type_cond.ktrim_cond.ktrim}'
        minlength=$reference_type_cond.ktrim_cond.minlength
    #end if
#end if

k=$advanced_options.k
rcomp='${advanced_options.rcomp}'
maskmiddle='${advanced_options.maskmiddle}'
minkmerhits='${advanced_options.minkmerhits}'
minkmerfraction=$advanced_options.minkmerfraction
mincovfraction=$advanced_options.mincovfraction
hammingdistance=$advanced_options.hammingdistance
qhdist=$advanced_options.qhdist
editdistance=$advanced_options.editdistance
forbidn='${advanced_options.forbidn}'
trimfailures='${advanced_options.trimfailures}'
findbestmatch='${advanced_options.findbestmatch}'
skipr1='${advanced_options.skipr1}'
skipr2='${advanced_options.skipr2}'

#if str($output_stats_cond.output_stats) == 'yes':
    #if str($output_stats_cond.output_stats_select).find('stats') >= 0:
        stats='${output_stats}'
    #end if
    #if str($output_stats_cond.output_stats_select).find('ref') >= 0:
        refstats='${output_ref}'
    #end if
    #if str($output_stats_cond.output_stats_select).find('rpkm') >= 0:
        rpkm='${output_rpkm}'
    #end if
    #if str($output_stats_cond.output_stats_select).find('dump') >= 0:
        dump='${output_dump}'
    #end if
#end if
#if str($output_hists_cond.output_hists) == 'yes':
    #if str($output_hists_cond.output_hists_select).find('bhist') >= 0:
        bhist='${output_bhist}'
    #end if
    #if str($output_hists_cond.output_hists_select).find('quhist') >= 0:
        qhist='${output_quhist}'
    #end if
    #if str($output_hists_cond.output_hists_select).find('quchist') >= 0:
        qchist='${output_quchist}'
    #end if
    #if str($output_hists_cond.output_hists_select).find('aqhist') >= 0:
        aqhist='${output_aqhist}'
    #end if
    #if str($output_hists_cond.output_hists_select).find('bqhist') >= 0:
        bqhist='${output_bqhist}'
    #end if
    #if str($output_hists_cond.output_hists_select).find('lhist') >= 0:
        lhist='${output_lhist}'
    #end if
    #if str($output_hists_cond.output_hists_select).find('phist') >= 0:
        phist='${output_phist}'
    #end if
    #if str($output_hists_cond.output_hists_select).find('gchist') >= 0:
        gchist='${output_gchist}'
    #end if
    #if str($output_hists_cond.output_hists_select).find('enthist') >= 0:
        enthist='${output_enthist}'
    #end if
#end if
#if $log_file
    2> >(tee '$log_output' >&2)
#end if
t=\${GALAXY_SLOTS:-4}
None
False
Functional tests
name inputs outputs required files
Test-1 input_type_cond|read1: 13-1941-6_S4_L001_R1_600000.fastq.gz
reference_type_cond|reference: adapters.fa.gz
reference_type_cond|reference_type: files
outputs_select: outu
log_file: True
name: value
name: value
13-1941-6_S4_L001_R1_600000.fastq.gz
adapters.fa.gz
value
Test-2 input_type_cond|read1: 13-1941-6_S4_L001_R1_600000.fastq.gz
input_type_cond|read2: 13-1941-6_S4_L001_R2_600000.fastq.gz
input_type_cond|input_type: pair
reference_type_cond|reference: adapters.fa.gz
reference_type_cond|reference_type: files
outputs_select: outu
output_stats_cond|output_stats_select: dump
output_stats_cond|output_stats: yes
output_hists_cond|output_hists_select: quhist
output_hists_cond|output_hists: yes
name: value
name: value
name: value
name: value
13-1941-6_S4_L001_R1_600000.fastq.gz
13-1941-6_S4_L001_R2_600000.fastq.gz
adapters.fa.gz
value
Test-3 input_type_cond|reads_collection: paired collection
input_type_cond|input_type: paired
reference_type_cond|reference: ['adapters', 'artifacts', 'phix', 'lambda', 'pjet', 'mtst', 'kapa']
reference_type_cond|reference_type: keywords
outputs_select: outu
name: value
name: value
13-1941-6_S4_L001_R1_600000.fastq.gz
13-1941-6_S4_L001_R2_600000.fastq.gz
value