Repository revision
21:120b7b35e442

Repository 'bismark'
hg clone https://toolshed.g2.bx.psu.edu/repos/bgruening/bismark

Bismark Mapper tool metadata
Miscellaneous
Bisulfite reads mapper
bismark_bowtie2
toolshed.g2.bx.psu.edu/repos/bgruening/bismark/bismark_bowtie2/0.22.1+galaxy4
0.22.1+galaxy4
None
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/bgruening/bismark/bismark_bowtie2/0.22.1+galaxy4 (this tool)
toolshed.g2.bx.psu.edu/repos/bgruening/bismark/bismark_bowtie2/0.22.1+galaxy3
toolshed.g2.bx.psu.edu/repos/bgruening/bismark/bismark_bowtie2/0.7.12
bismark_bowtie2
Requirements (dependencies defined in the <requirements> tag set)
name version type
bismark 0.22.1 package
samtools 1.8 package
bowtie2 2.3.5 package
Additional information about this tool
#import re

        #if $singlePaired.sPaired == "single":
            #if $singlePaired.input_singles.ext == "fasta":
                #set read1 = 'input_1.fa'
            #elif $singlePaired.input_singles.ext in ["fastq.gz", "fastqsanger.gz"]:
                #if $params.settingsType == "custom" and $params.pbat == "--pbat"
                    #set read1 = 'input_1.fq'
                #else
                    #set read1 = 'input_1.fq.gz'
                #end if
            #else
                #set read1 = 'input_1.fq'
            #end if

            #if $params.settingsType == "custom" and $params.pbat == "--pbat" and $singlePaired.input_singles.ext in ["fastq.gz", "fastqsanger.gz"]:
                zcat '${singlePaired.input_singles}' > '${read1}' &&
            #else
                ln -s '${singlePaired.input_singles}' '${read1}' &&
            #end if
        #else:
            #set $mate1 = list()
            #set $mate2 = list()
            #for $mate_pair in $singlePaired.mate_list

                #if $mate_pair.input_mate1.ext == "fasta":
                    #set read1 = re.sub('[^\w\-_.]', '_', str($mate_pair.input_mate1.element_identifier)) + '_1.fa'
                #elif $mate_pair.input_mate1.ext in ["fastq.gz", "fastqsanger.gz"]:
                    #if $params.settingsType == "custom" and $params.pbat == "--pbat"
                        #set read1 = re.sub('[^\w\-_.]', '_', str($mate_pair.input_mate1.element_identifier)) + '_1.fq'
                    #else
                        #set read1 = re.sub('[^\w\-_.]', '_', str($mate_pair.input_mate1.element_identifier)) + '_1.fq.gz'
                    #end if
                #else
                    #set read1 = re.sub('[^\w\-_.]', '_', str($mate_pair.input_mate1.element_identifier)) + '_1.fq'
                #end if

                #if $params.settingsType == "custom" and $params.pbat == "--pbat" and $mate_pair.input_mate1.ext in ["fastq.gz", "fastqsanger.gz"]:
                    zcat '${mate_pair.input_mate1}' > '${read1}' &&
                #else
                    ln -s '${mate_pair.input_mate1}' '${read1}' &&
                #end if

                #if $mate_pair.input_mate2.ext == "fasta":
                    #set read2 = re.sub('[^\w\-_.]', '_', str($mate_pair.input_mate1.element_identifier)) + '_2.fa'
                #elif $mate_pair.input_mate2.ext in ["fastq.gz", "fastqsanger.gz"]:
                    #if $params.settingsType == "custom" and $params.pbat == "--pbat"
                        #set read2 = re.sub('[^\w\-_.]', '_', str($mate_pair.input_mate1.element_identifier)) + '_2.fq'
                    #else
                        #set read2 = re.sub('[^\w\-_.]', '_', str($mate_pair.input_mate1.element_identifier)) + '_2.fq.gz'
                    #end if
                #else
                    #set read2 = re.sub('[^\w\-_.]', '_', str($mate_pair.input_mate1.element_identifier)) + '_2.fq'
                #end if

                #if $params.settingsType == "custom" and $params.pbat == "--pbat" and $mate_pair.input_mate2.ext in ["fastq.gz", "fastqsanger.gz"]:
                    zcat '${mate_pair.input_mate2}' > '${read2}' &&
                #else
                    ln -s '${mate_pair.input_mate2}' '${read2}' &&
                #end if

                $mate1.append( str($read1) )
                $mate2.append( str($read2) )
            #end for
        #end if

        python '$__tool_directory__/bismark_wrapper.py'

        ## Change this to accommodate the number of threads you have available.
        --num-threads "\${GALAXY_SLOTS:-4}"

        ##
        ## Bismark Genome Preparation, if desired.
        ##

        ## Handle reference file.
        #if $refGenomeSource.genomeSource == "built_in_fasta":
            --own-file '${refGenomeSource.built_in_fasta.fields.path}'
        #else if $refGenomeSource.genomeSource == "history":
            --own-file '$refGenomeSource["own_file"]'
        #else:
            --indexes-path '${refGenomeSource.built_in_indexes.fields.path}'
        #end if

        ##
        ##  Input parameters
        ##

        #if $singlePaired.sPaired == "single":
            --single-paired '${read1}'

            #if $singlePaired.input_singles.ext in ["fastq", "fastq.gz", "fastqillumina"]:
                --phred64-quals
                --fastq
            #elif $singlePaired.input_singles.ext in ["fastqsanger", "fastqsanger.gz"]:
                --fastq
            #elif $singlePaired.input_singles.ext == "fasta":
                --fasta
            #end if
        #else:
            --mate-paired

            --mate1 #echo ','.join($mate1)
            --mate2 #echo ','.join($mate2)

            #for $mate_pair in $singlePaired.mate_list:
                #if $mate_pair.input_mate1.ext == "fastqillumina":
                    --phred64-quals
                    --fastq
                #elif $mate_pair.input_mate1.ext in "fastqsanger,fastqsanger.gz":
                    --fastq
                #elif $mate_pair.input_mate1.ext == "fasta":
                    --fasta
                #end if
                #break
            #end for

            -I $singlePaired.minInsert
            -X $singlePaired.maxInsert
        #end if

        #if $sort_bam:
            --sort-bam
        #end if

        ## for now hardcode the value for the required memory per thread in --best mode
        --chunkmbs 512


        #if $params.settingsType == "custom":

            ## default 20
            --seed-len $params.seed_len
            ## default 0
            --seed-mismatches $params.seed_mismatches
            ## default 15
            --seed-extention-attempts $params.seed_extention_attempts
            ## default 2
            --max-reseed $params.max_reseed

            ## default unlimited
            #if $params.qupto != 0:
                --qupto $params.qupto
            #end if
            #if $params.skip_reads != 0:
                --skip-reads $params.skip_reads
            #end if

            #if $params.score_min != "":
                --score-min '${params.score_min}'
            #end if

            ## if set, disable the original behaviour
            $params.no_mixed
            ## if set, disable the original behaviour
            $params.no_discordant

            $params.non_directional

            $params.pbat

            #if $params.bismark_stdout:
                --stdout '$output_stdout'
            #end if

            #if $params.isReportOutput:
                --output-report-file '$report_file'
            #end if

        #else:
          --output-report-file '$report_file'
        #end if

      ##
      ## Output parameters.
      ##
      --output '$output'
      ##$suppress_header

      #if str( $singlePaired.sPaired ) == "single"
        #if $output_unmapped_reads_l
          --output-unmapped-reads '$output_unmapped_reads_l'
        #end if
        #if $output_suppressed_reads_l
          --output-suppressed-reads '$output_suppressed_reads_l'
        #end if
      #else
        #if $output_unmapped_reads_l and $output_unmapped_reads_r
          --output-unmapped-reads-l '$output_unmapped_reads_l'
          --output-unmapped-reads-r '$output_unmapped_reads_r'
        #end if
        #if $output_suppressed_reads_l and $output_suppressed_reads_l
          --output-suppressed-reads-l '$output_suppressed_reads_l'
          --output-suppressed-reads-r '$output_suppressed_reads_r'
        #end if
      #end if


    
None
False
Functional tests
name inputs outputs required files
Test-1 refGenomeSource|own_file: mm10.tiny.fa.gz
refGenomeSource|genomeSource: history
singlePaired|input_singles: input1.fq.gzip
singlePaired|sPaired: single
sort_bam: False
params|suppressed_read_file: True
params|unmapped_read_file: True
params|bismark_stdout: True
params|isReportOutput: True
params|settingsType: custom
name: value
name: value
name: value
mm10.tiny.fa.gz
input1.fq.gzip
value
Test-2 refGenomeSource|own_file: mm10.tiny.fa.gz
refGenomeSource|genomeSource: history
singlePaired|input_singles: input1.fq
singlePaired|sPaired: single
sort_bam: False
params|suppressed_read_file: True
params|unmapped_read_file: True
params|bismark_stdout: True
params|isReportOutput: True
params|settingsType: custom
name: value
name: value
name: value
mm10.tiny.fa.gz
input1.fq
value
Test-3 refGenomeSource|own_file: mm10.tiny.fa.gz
refGenomeSource|genomeSource: history
singlePaired|mate_list_0|input_mate1: input1.fq
singlePaired|mate_list_0|input_mate2: input1.fq
singlePaired|sPaired: paired
sort_bam: False
params|suppressed_read_file: True
params|unmapped_read_file: True
params|bismark_stdout: True
params|isReportOutput: True
params|settingsType: custom
name: value
name: value
name: value
mm10.tiny.fa.gz
input1.fq
value
Test-4 refGenomeSource|own_file: mm10.tiny.fa.gz
refGenomeSource|genomeSource: history
singlePaired|mate_list_0|input_mate1: input1.fq
singlePaired|mate_list_0|input_mate2: input1.fq
singlePaired|mate_list_1|input_mate1: input2.fq
singlePaired|mate_list_1|input_mate2: input2.fq
singlePaired|sPaired: paired
sort_bam: False
params|suppressed_read_file: True
params|unmapped_read_file: True
params|bismark_stdout: True
params|isReportOutput: True
params|settingsType: custom
name: value
name: value
name: value
mm10.tiny.fa.gz
input1.fq
input2.fq
value
Test-5 refGenomeSource|own_file: mm10.tiny.fa.gz
refGenomeSource|genomeSource: history
singlePaired|input_singles: input1.fq.gzip
singlePaired|sPaired: single
sort_bam: False
params|score_min: L,0,-0.8
params|suppressed_read_file: True
params|unmapped_read_file: True
params|bismark_stdout: True
params|isReportOutput: True
params|settingsType: custom
name: value
name: value
name: value
mm10.tiny.fa.gz
input1.fq.gzip
value
Test-6 refGenomeSource|own_file: mm10.tiny.fa.gz
refGenomeSource|genomeSource: history
singlePaired|input_singles: input1.fq.gzip
singlePaired|sPaired: single
sort_bam: False
params|suppressed_read_file: True
params|unmapped_read_file: True
params|bismark_stdout: True
params|isReportOutput: True
params|pbat: True
params|settingsType: custom
name: value
name: value
name: value
mm10.tiny.fa.gz
input1.fq.gzip
value