view hicup_mapper.xml @ 4:99dd0efa992b draft

planemo upload for repository https://github.com/joachimwolff/galaxytools/tree/hicup/tools/hicup commit 22eec1b3b20b788e762837c02488f332f831fab3
author bgruening
date Fri, 25 May 2018 17:48:10 -0400
parents 320a2d826a00
children 396e8c4ebfee
line wrap: on
line source

<tool id="hicup_mapper" name="Hicup Mapper" version="@VERSION@.0">
    <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 fastq and fastq.gz
        #if $input_first_sequence.is_of_type("fastq.gz", "fastqsanger.gz"):
           ln -s $input_first_sequence dataset1.gz &&
           #set input1='dataset1.gz'
        #else
           ln -s $input_first_sequence dataset1 &&
           #set input1='dataset1'
        #end if

        #if $input_second_sequence.is_of_type("fastq.gz", "fastqsanger.gz"):
           ln -s $input_second_sequence dataset2.gz &&
           #set input2='dataset2.gz'
        #else
           ln -s $input_second_sequence dataset2 &&
           #set input2='dataset2'
        #end if


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

    ]]></command>
    <inputs>
        <expand macro="input_files" />
        <expand macro="reference_genome_macro" />
    </inputs>
    <outputs>
        <data name="hicup_mapper_summary" format="txt" 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"/>
        <data name="dataset1_mapper_barchart" format="svg" from_work_dir="dataset1*.mapper_barchart.svg" label="Mapper Dataset1 Barchart.svg" />
        <data name="dataset2_mapper_barchart" format="svg" from_work_dir="dataset2*.mapper_barchart.svg" label="Mapper Dataset2 Barchart.svg" />
    </outputs>
     <tests>
        <test>
            <param name="input_first_sequence" value="dataset1.trunc.fastq.gz" ftype="fastq.gz"/>
            <param name="input_second_sequence" value="dataset2.trunc.fastq.gz" ftype="fastq.gz"/>
            <conditional name="reference_genome">
                <param name="source" value="history" />
                <param name="own_file" value="chr21And22FromHg38.fasta"/>
            </conditional>
            <output name="hicup_mapper_summary" file="hicup_mapper_summary.txt" lines_diff="4"/>
            <output name="result_pair" file="dataset1_2.pair.bam" lines_diff="8" ftype="qname_sorted.bam" />
            <output name="dataset1_mapper_barchart" file="dataset1.mapper_barchart.svg" ftype="svg" lines_diff="1000"/>
            <output name="dataset2_mapper_barchart" file="dataset2.mapper_barchart.svg" ftype="svg" lines_diff="1000"/>
        </test>
    </tests>
    <help><![CDATA[

    For help please consult the documentation of HiCUP: http://www.bioinformatics.babraham.ac.uk/projects/hicup/overview/

    To get more information about the mapper visit: http://www.bioinformatics.babraham.ac.uk/projects/hicup/scripts_description/#Mapper
    ]]></help>
    <expand macro="citation_hicup" />
</tool>