Repository revision
4:02bab5ff7c37

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

obigrep tool metadata
Miscellaneous
obigrep
Filters sequence file
obi_grep
toolshed.g2.bx.psu.edu/repos/iuc/obi_grep/obi_grep/1.2.13
1.2.13
None
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/iuc/obi_grep/obi_grep/1.2.13 (this tool)
toolshed.g2.bx.psu.edu/repos/iuc/obi_grep/obi_grep/1.2.11
toolshed.g2.bx.psu.edu/repos/iuc/obi_grep/obi_grep/1.0.010
obi_grep
Requirements (dependencies defined in the <requirements> tag set)
name version type
obitools 1.2.13 package
Additional information about this tool
#if $input.ext.endswith(".gz")
            gunzip -c '$input' > input &&
        #else
            ln -s '$input' input &&
        #end if
    

        obigrep
        --without-progress-bar
        ${v}
        #if str($options_grep.options_grep_selector) == 'sequence'
            -s ${options_grep.sequence}
        #else if str($options_grep.options_grep_selector) == 'definition'
            -D ${options_grep.definition}
        #else if str($options_grep.options_grep_selector) == 'identifier'
            -I ${options_grep.identifier}
        #else if str($options_grep.options_grep_selector) == 'idlist'
            --id-list '${options_grep.idlist}'
        #else if str($options_grep.options_grep_selector) == 'attribute'
            -a ${options_grep.attribute}
        #else if str($options_grep.options_grep_selector) == 'hasattribute'
            -A ${options_grep.attribute}
        #else if str($options_grep.options_grep_selector) == 'predicat'
            -p ${options_grep.predicat}
        #else if str($options_grep.options_grep_selector) == 'lmax'
            -L ${options_grep.lmax}
        #else if str($options_grep.options_grep_selector) == 'lmin'
            -l ${options_grep.lmin}
        #end if
        
        #if $input_format_options.options_inputtype
            $input_format_options.options_inputtype
        #else
            #if $input.ext.startswith("fasta")
                --fasta
            #else if $input.ext.startswith("fastqsolexa")
                ## input file is in fastq nucleic format produced by solexa sequencer
                --solexa
            #else
                ## input file is in sanger fastq nucleic format (standard fastq)
                --sanger
            #end if
        #end if
        #if $input_format_options.options_seqtype
            $input_format_options.options_seqtype
        #end if
    
        
        #if $out_format
            --${out_format}-output
        #end if
    
        input
        
        #if $input.ext.endswith(".gz")
        | gzip -c 
    #end if
     
        > '$output'
        
        #import json

        #try:
            #silent $outputs[0]
        #except 
            #set outputs = [("output", $output)]
        #end try

        #if $input.ext.startswith("fastq")
            #set ext = "fastqsanger"
        #else if $input.ext.startswith("fasta")
            #set ext = "fasta"
        #end if

        #try
            #if $out_format == "fasta"
                #set ext = "fasta"
            #else if $out_format == "fastq"
                #set ext = "fastqsanger"
            #end if
        #except
            #set ext = "fasta"
        #end try

        #if $input.ext.endswith(".gz")
            #set ext = ext + ".gz"
        #end if

        #set gxy_json = {}
        #for oname, o in $outputs
            #silent gxy_json[oname] = {"ext": ext}
        #end for
        && echo '${json.dumps(gxy_json)}' >> galaxy.json
    
    
None
False
Functional tests
name inputs outputs required files
Test-1 input: illuminapairedend.output.fastq
options_grep|lmin: 80
options_grep|options_grep_selector: lmin
v: True
input_format_options|options_inputtype: --sanger
out_format: fastq
name: value
illuminapairedend.output.fastq
value
Test-2 input: illuminapairedend.output.fastq.gz
options_grep|predicat: mode!="joined"
options_grep|options_grep_selector: predicat
v: False
out_format: fasta
name: value
illuminapairedend.output.fastq.gz
value