view hicup_mapper.xml @ 0:9ba09ebeb5aa draft

planemo upload for repository https://github.com/joachimwolff/galaxytools/tree/hicup/tools/hicup commit b77cbc104261f8aa1524922f41c2a9a23052f5da
author bgruening
date Thu, 09 Mar 2017 09:32:26 -0500
parents
children 320a2d826a00
line wrap: on
line source

<tool id="hicup_mapper" name="Hicup Mapper" version="0.1.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" />
    <expand macro="stdio" />

    <command><![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
        hicup_mapper
        --index '$index_path' 
        --bowtie2 \$BOWTIE_PATH_BASH

        $input_first_sequence $input_second_sequence

        ## output handling
        && mv hicup_mapper_summary* hicup_mapper_summary.txt
        && mv *.pair.sam result.pair.sam
        && trunc_result_1=\$(echo '$input_first_sequence' | rev | cut -d'/' -f1 | rev)
        && trunc_result_2=\$(echo '$input_second_sequence' | rev | cut -d'/' -f1 | rev)
        && mv \$trunc_result_1*.mapper_barchart.svg dataset1.mapper_barchart.svg
        && mv \$trunc_result_2*.mapper_barchart.svg dataset2.mapper_barchart.svg
        && echo \$trunc_result_1.mapper_barchart.svg
        && echo \$trunc_result_2.mapper_barchart.svg
    ]]></command>
    <inputs>
        <expand macro="input_files" />
        <expand macro="reference_genome_macro" />
    </inputs>
    <outputs>
        <expand macro="mapper_output" />
    </outputs>
     <tests>
        <test>
            <param name="input_first_sequence" value="dataset1.trunc.fastq" ftype="fastq"/>
            <param name="input_second_sequence" value="dataset2.trunc.fastq" ftype="fastq"/>
            
            <conditional name="reference_genome">
                <param name="source" value="history" />
                <param name="own_file" value="chr1.fa"/>
            </conditional>
            <output name="hicup_mapper_summary" file="hicup_mapper_summary.txt" lines_diff="4"/>
            <output name="result_pair" file="result.pair.sam" lines_diff="8"/>
            <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>