view hisat2_macros.xml @ 10:da8d655e2154 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hisat2 commit d3803bf87eb04a8c2a239e270c8c5c0596277890
author iuc
date Mon, 10 Apr 2017 17:40:42 -0400
parents 5ba8e317529a
children e926afbd9e10
line wrap: on
line source

<?xml version="1.0"?>
<macros>
    <xml name="function" tokens="helptext">
        <param display="radio" help="@HELPTEXT@" label="Function type" name="function_type" type="select">
            <option value="C">Constant</option>
            <option value="L">Linear [f(x) = y + z * x]</option>
            <option value="S">Square root [f(x) = y + z * x&#178;]</option>
            <option value="G">Natural logarithm [f(x) = y + z * log(x)]</option>
        </param>
        <param help="@HELPTEXT@" label="Constant term (y)" name="constant_term" type="integer" value="0" />
        <param help="@HELPTEXT@" label="Coefficient (z)" name="coefficient" type="integer" value="0" />
    </xml>
    <xml name="single_paired_selector">
        <param label="Single end or paired reads?" name="paired_selector" type="select">
            <option value="paired_collection">Collection of paired reads</option>
            <option value="paired">Individual paired reads</option>
            <option value="single">Individual unpaired reads</option>
        </param>
    </xml>
    <xml name="paired_input_conditional" tokens="ftype">
        <conditional name="paired">
            <expand macro="single_paired_selector" />
            <when value="paired_collection">
                <param collection_type="paired" format="@FTYPE@" label="Paired reads" name="reads" type="data_collection" />
                <expand macro="paired_end_conditional" />
                <expand macro="paired_end_output" />
            </when>
            <when value="paired">
                <param format="@FTYPE@" label="Forward reads" name="reads_f" type="data" />
                <param format="@FTYPE@" label="Reverse reads" name="reads_r" type="data" />
                <expand macro="paired_end_conditional" />
                <expand macro="paired_end_output" />
            </when>
            <when value="single">
                <param format="@FTYPE@" label="Reads" name="reads" type="data" />
                <param name="unaligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write unaligned reads (in fastq format) to separate file(s)" argument="--un / --un-gz" />
                <param name="aligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write aligned reads (in fastq format) to separate file(s)" argument="--al / --al-gz" />
            </when>
        </conditional>
    </xml>
    <xml name="paired_end_conditional">
        <conditional name="paired_end_options">
            <param label="Paired-end options" name="paired_end_options_selector" type="select">
                <option value="defaults">Use default values</option>
                <option value="advanced">Specify paired-end parameters</option>
            </param>
            <when value="defaults" />
            <when value="advanced">
                <param name="no_mixed" label="Disable alignments of individual mates" type="boolean" truevalue="--no-mixed" falsevalue=""
                    help="By default, when hisat cannot find a concordant or discordant alignment for a pair, it then tries to find alignments for the individual mates. This option disables that behavior. (--no-mixed)" />
                <param name="no_discordant" label="Disable discordant alignments" type="boolean" truevalue="--no-discordant" falsevalue=""
                    help="By default, hisat looks for discordant alignments if it cannot find any concordant alignments. A discordant alignment is an alignment where both mates align uniquely, but that does not satisfy the paired-end constraints (--fr/--rf/--ff, -I, -X). This option disables that behavior. (--no-discordant)" />
                <param name="skip_reverse" label="Skip reference strand of reference" type="boolean" truevalue="--norc" falsevalue="" help="(--norc) If --norc is specified, hisat will not attempt to align unpaired reads against the reverse-complement (Crick) reference strand. In paired-end mode, --nofw and --norc pertain to the fragments; i.e. specifying --nofw causes hisat to explore only those paired-end configurations corresponding to fragments from the reverse-complement (Crick) strand." />
            </when>
        </conditional>
    </xml>
    <xml name="paired_end_output">
        <param name="unaligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write unaligned reads (in fastq format) to separate file(s)" argument="--un-conc / --un-conc-gz" />
        <param name="aligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write aligned reads (in fastq format) to separate file(s)" argument="--al-conc / --al-conc-gz" />
    </xml>
    <token name="@paired_end_options@">
        #if str( $input_format.paired.unaligned_file ) == "true":
            #if $compressed == "GZ":
                --un-conc-gz '${output_unaligned_reads_l}'
            #else:
                --un-conc '${output_unaligned_reads_l}'
            #end if
        #end if
        #if str( $input_format.paired.aligned_file ) == "true":
            #if $compressed == "GZ":
                --al-conc '${output_aligned_reads_l}'
            #else:
                --al-conc '${output_aligned_reads_l}'
            #end if
        #end if  
        #if str($input_format.paired.paired_end_options.paired_end_options_selector) == 'advanced':
            ${input_format.paired.paired_end_options.no_mixed}
            ${input_format.paired.paired_end_options.no_discordant}
        #end if
    </token>
    <token name="@strandedness_parameters@">
        #if str($spliced_options.spliced_options_selector) == "advanced":
            #if str($spliced_options.rna_strandness).strip() != '':
                --rna-strandness $spliced_options.rna_strandness
            #end if
        #end if
    </token>
    <token name="@FASTQGZ_SETUP@">
<![CDATA[
        #set compressed="False"
        #if str($input_format.paired.paired_selector) == 'paired':
            #if $input_format.paired.reads_f.is_of_type("fastq.gz", "fastqsanger.gz"):
                #set read1 = "input_f.fastq.gz"
                #set compressed = "GZ"
            #else if $input_format.paired.reads_f.is_of_type("fastq.bz2", "fastqsanger.bz2"):
                #set read1 = "input_f.fastq.bz2"
                #set compressed = "BZ2"
            #else:
                #set read1 = "input_f.fastq"
            #end if
            ln -f -s "${input_format.paired.reads_f}" "${read1}" &&

            #if $input_format.paired.reads_r.is_of_type("fastq.gz", "fastqsanger.gz"):
                #set read2 = "input_r.fastq.gz"
                #set compressed = "GZ"
            #else if $input_format.paired.reads_r.is_of_type("fastq.bz2", "fastqsanger.bz2"):
                #set read2 = "input_r.fastq.bz2"
                #set compressed = "BZ2"
            #else:
                #set read2 = "input_r.fastq"
            #end if
            ln -f -s "${input_format.paired.reads_r}" "${read2}" &&
        #else if str($input_format.paired.paired_selector) == 'paired_collection':
            #if $input_format.paired.reads.forward.is_of_type("fastq.gz", "fastqsanger.gz"):
                #set read1 = "input_f.fastq.gz"
                #set compressed = "GZ"
            #else if $input_format.paired.reads.forward.is_of_type("fastq.bz2", "fastqsanger.bz2"):
                #set read1 = "input_f.fastq.bz2"
                #set compressed = "BZ2"
            #else:
                #set read1 = "input_f.fastq"
            #end if
            ln -s "${input_format.paired.reads.forward}" "${read1}" &&

            #if $input_format.paired.reads.reverse.is_of_type("fastq.gz", "fastqsanger.gz"):
                #set read2 = "input_r.fastq.gz"
                #set compressed = "GZ"
            #else if $input_format.paired.reads.reverse.is_of_type("fastq.bz2", "fastqsanger.bz2"):
                #set read2 = "input_r.fastq.bz2"
                #set compressed = "BZ2"
            #else:
                #set read2 = "input_r.fastq"
            #end if
            ln -s "${input_format.paired.reads.reverse}" "${read2}" &&
        #else:
            #if $input_format.paired.reads.is_of_type("fastq.gz", "fastqsanger.gz"):
                #set read1 = "input_f.fastq.gz"
                #set compressed = "GZ"
            #else if $input_format.paired.reads.is_of_type("fastq.bz2", "fastqsanger.bz2"):
                #set read1 = "input_f.fastq.bz2"
                #set compressed = "BZ2"
            #else:
                #set read1 = "input_f.fastq"
            #end if
            ln -s "${input_format.paired.reads}" "${read1}" &&
        #end if
]]>
    </token>
</macros>