view hicup_macros.xml @ 1:b4e7244246e2 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/hicup commit 398a2e3e845ada656b3a7e0a6542e1668a8bcf17
author bgruening
date Thu, 23 Feb 2023 18:05:02 +0000
parents f8cb84c49623
children
line wrap: on
line source

<macros>
    <token name="@VERSION@">0.9.2</token>
    <xml name="requirements_hicup">
        <requirements>
            <requirement type="package" version="@VERSION@">hicup</requirement>
            <requirement type="package" version="2.4.5">bowtie2</requirement>
            <requirement type="package" version="1.16.1">samtools</requirement>
            <!-- without this dependency, hicup_hicup could not generate the html
            The error is: /usr/local/bin/pandoc: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory -->
            <requirement type="package" version="6.2.1">gmp</requirement>
            <yield/>
        </requirements>
        <version_command>hicup --version</version_command>
    </xml>
    <xml name="citation_hicup">
        <citations>
            <citation type="doi">10.12688/f1000research.7334.1</citation>
        </citations>
    </xml>
    <xml name="reference_genome_macro">
        <conditional name="reference_genome">
            <param name="source" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options. See `Indexes` section of help below">
                <option value="indexed">Use a built-in genome index</option>
                <option value="history">Use a genome from the history and build index</option>
            </param>
            <when value="indexed">
                <param name="index" type="select" label="Select reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
                <options from_data_table="bowtie2_indexes">
                    <filter type="sort_by" column="2"/>
                    <validator type="no_options" message="No indexes are available for the selected input dataset"/>
                </options>
                </param>
            </when>
            <when value="history">
                <param name="own_file" type="data" format="fasta" label="Select reference genome" />
                <!--<param name="own_file" type="data" format="fasta" metadata_name="dbkey" label="Select reference genome" />-->
            </when>
        </conditional>
    </xml>
    <xml name="re1">
        <param argument="--re1" type="text" value="" label="Restriction enzyme recognition sequence" help="Restriction enzyme used e.g. A^GATCT,BglII. Some Hi-C protocols may use several enzymes. To specify several enzymes, use the ':' to separate them e.g. A^GATCT,BglII:A^AGCTT,HindIII:^GATC,DpnII. HiCUP accomodates N in restriction enzyme: e.g. :A^ANCTT"/>
    </xml>
    <xml name="re2">
        <param argument="--re2" type="text" value="" label="Restriction enzyme instead of sonication to shorten di-tags."
            help="To specify a restriction enzyme instead of sonication to shorten di-tags. This restriction site does NOT form a Hi-C ligation junction. 2 .g. AG^CT,AluI. Typically the sonication protocol is followed."/>
    </xml>
    <xml name="filter_longest_shortest">
        <param argument="--longest" type="text" value="" label="Max insert size" help="Maximum allowable insert size (bps)"/>
        <param argument="--shortest" type="text" value="" label="Min insert size" help="Minimum allowable insert size (bps)"/>
    </xml>
    <xml name="no_fill">
        <param argument="--nofill" type="boolean" value="false" truevalue="--nofill" falsevalue="" label="No fill"
            help="Hi-C protocol did NOT include a fill-in of sticky ends prior to re-ligation and therefore reads shall be truncated at the restriction site sequence"/>
    </xml>
    <token name="@PAIRED-END_INPUT@"><![CDATA[
    ## Taken from cutadapt except that I don't accept space in name
    #import re
    #set library_type = str($library.type)
    #if $library_type == 'paired':
        #set input_1 = $library.input_1
        #set input_2 = $library.input_2
    #else if $library_type == 'paired_collection'
        #set input_1 = $library.input_1.forward
        #set input_2 = $library.input_1.reverse
    #end if
    
    #if $input_1.is_of_type("fastq.gz", "fastqsanger.gz"):
        #set ext = ".fq.gz"
    #else:
        #set ext = ".fq"
    #end if
    #set read1 = "dataset1" + $ext
    ln -f -s '${input_1}' '$read1' &&

    #if $input_2.is_of_type("fastq.gz", "fastqsanger.gz"):
        #set ext2 = ".fq.gz"
    #else:
        #set ext2 = ".fq"
    #end if
    #set read2 = "dataset2" + $ext2
    ln -f -s '${input_2}' '$read2' &&
    ]]>
    </token>
    <xml name="input_paired">
        <conditional name="library">
            <param name="type" type="select" label="How Paired-end reads are organized">
                <option value="paired">Separately</option>
                <option value="paired_collection">Paired-end Collection</option>
            </param>

            <when value="paired">
                <param name="input_1" format="fastq,fastq.gz" type="data" label="FASTQ/A file #1" help="Should be of datatype &quot;fastq.gz&quot;or &quot;fasta&quot;" />
                <param name="input_2" format="fastq,fastq.gz" type="data" label="FASTQ/A file #2" help="Should be of datatype &quot;fastq.gz&quot;or &quot;fasta&quot;" />
            </when>

            <when value="paired_collection">
                <param name="input_1" format="fastq,fastq.gz" type="data_collection" collection_type="paired" label="Paired Collection" help="Should be of datatype &quot;fastq.gz&quot; or &quot;fastq&quot;" />
            </when>

        </conditional>
    </xml>
</macros>