view hicup_mapper.xml @ 7:be104dee2833 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:07:06 +0000
parents 396e8c4ebfee
children
line wrap: on
line source

<tool id="hicup_mapper" name="Hicup Mapper" version="@VERSION@+galaxy0">
    <description>aligns paired reads independently to a reference genome and retains reads where both partners align.</description>
    <macros>
        <import>hicup_macros.xml</import>
    </macros>
    <expand macro="requirements_hicup"/>
    <command detect_errors="exit_code"><![CDATA[
        BOWTIE_PATH_BASH="\$(which bowtie2)" &&
        #set index_path = ''
        #if str($reference_genome.source) == "history":
           bowtie2-build '$reference_genome.own_file' genome &&
           ln -s '$reference_genome.own_file' genome.fa &&
           #set index_path = 'genome'
        #else:
           #set index_path = $reference_genome.index.fields.path
        #end if

        ##Dealing with inputs
        @PAIRED-END_INPUT@

        hicup_mapper
            --zip
            --threads \${GALAXY_SLOTS:-1}
            --index '$index_path'
            --bowtie2 \$BOWTIE_PATH_BASH
            '$read1'
            '$read2'

    ]]></command>
    <inputs>
        <expand macro="input_paired"/>
        <expand macro="reference_genome_macro"/>
    </inputs>
    <outputs>
        <data name="hicup_mapper_summary" format="tabular" from_work_dir="hicup_mapper_summary*" label="hicup_mapper_summary.txt"/>
        <data name="result_pair" format="qname_sorted.bam" from_work_dir="*pair.bam" label="pair.bam"/>
        <collection type="list" name="mapper_barchart" label="Mapper Barchart.svg">
            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.mapper_barchart\.svg$" directory="./" ext="svg"/>
        </collection>
    </outputs>
    <tests>
        <test>
            <conditional name="library">
                <param name="type" value="paired"/>
                <param name="input_1" value="dataset1.trunc.fastq.gz" ftype="fastq.gz"/>
                <param name="input_2" value="dataset2.trunc.fastq.gz" ftype="fastq.gz"/>
            </conditional>
            <conditional name="reference_genome">
                <param name="source" value="history"/>
                <param name="own_file" value="chr21And22FromHg38.fasta"/>
            </conditional>
            <output name="hicup_mapper_summary">
                <assert_contents>
                    <has_text_matching expression="\s+99742\s+2658\s+2.7\s+3885\s+3.9\s+12437\s+12.5\s+80762\s+81.0\s+1143\s+1.1"/>
                    <has_text_matching expression="\s+99742\s+2476\s+2.5\s+3725\s+3.7\s+12679\s+12.7\s+80862\s+81.1\s+1143\s+1.1"/>
                </assert_contents>
            </output>
            <output name="result_pair" file="dataset1_2.pair.bam" lines_diff="5" ftype="qname_sorted.bam"/>
            <output_collection name="mapper_barchart" count="2">
                <element name="dataset1.fq.gz" file="dataset1.trunc.fastq.gz.mapper_barchart.svg" ftype="svg" compare="sim_size"/>
                <element name="dataset2.fq.gz" file="dataset2.trunc.fastq.gz.mapper_barchart.svg" ftype="svg" compare="sim_size"/>
            </output_collection>
        </test>
        <test>
            <conditional name="library">
                <param name="type" value="paired_collection"/>
                <param name="input_1">
                    <collection type="paired">
                        <element name="forward" ftype="fastq.gz" value="dataset1.trunc.fastq.gz"/>
                        <element name="reverse" ftype="fastq.gz" value="dataset2.trunc.fastq.gz"/>
                    </collection>
                </param>
            </conditional>
            <conditional name="reference_genome">
                <param name="source" value="history"/>
                <param name="own_file" value="chr21And22FromHg38.fasta"/>
            </conditional>
            <output name="hicup_mapper_summary">
                <assert_contents>
                    <has_text_matching expression="\s+99742\s+2658\s+2.7\s+3885\s+3.9\s+12437\s+12.5\s+80762\s+81.0\s+1143\s+1.1"/>
                    <has_text_matching expression="\s+99742\s+2476\s+2.5\s+3725\s+3.7\s+12679\s+12.7\s+80862\s+81.1\s+1143\s+1.1"/>
                </assert_contents>
            </output>
            <output name="result_pair" file="dataset1_2.pair.bam" lines_diff="5" ftype="qname_sorted.bam"/>
            <output_collection name="mapper_barchart" count="2">
                <element name="dataset1.fq.gz" file="dataset1.trunc.fastq.gz.mapper_barchart.svg" ftype="svg" compare="sim_size"/>
                <element name="dataset2.fq.gz" file="dataset2.trunc.fastq.gz.mapper_barchart.svg" ftype="svg" compare="sim_size"/>
            </output_collection>
        </test>
    </tests>
    <help><![CDATA[

    For help please consult the documentation of HiCUP: https://www.bioinformatics.babraham.ac.uk/projects/hicup/read_the_docs/html/index.html

    To get more information about the mapper visit: https://www.bioinformatics.babraham.ac.uk/projects/hicup/read_the_docs/html/index.html#hicup-mapper
    ]]></help>
    <expand macro="citation_hicup"/>
</tool>