view rmarkdown_report.xml @ 6:afa1774dc49b draft default tip

planemo upload commit 841d8b22bf9f1aaed6bfe8344b60617f45b275b2-dirty
author mingchen0919
date Sun, 30 Dec 2018 10:26:31 -0500
parents 1148bc3d4e7b
children
line wrap: on
line source

<tool name="aurora_htseq" id='aurora_htseq_report' version="2.0.2">
    <description>
        counting reads in features
    </description>
    <requirements>
        <requirement type="package" version="2.5">pandoc</requirement>
        <requirement type="package" version="1.20.2">r-getopt</requirement>
        <requirement type="package" version="1.10">r-rmarkdown</requirement>
        <requirement type="package" version="0.4">r-dt</requirement>
        <requirement type="package" version="0.11.0">htseq</requirement>    
    </requirements>
    <command><![CDATA[

        ######### each aurora tool generates a html file and have an files path directory associated with it.
        mkdir -p $report.files_path &&

        ######### three important paths:
        #########   1. path to tool installation directory
        #########   2. path to report html
        #########   3. path to files_path directory associated with the report output.
        export TOOL_INSTALL_DIR='${__tool_directory__}' &&
        export REPORT='$report' &&
        export REPORT_FILES_PATH='$report.files_path' &&

        ############ create a hidden file to store r markdown rendering log
        touch $report.files_path/.r_rendering.log.txt &&

        ############ finally run the render.R script
        Rscript '${__tool_directory__}/rmarkdown_report_render.R'
        
            -o $report
            -d $report.files_path

            -A '$alignment_files'
			-B '$sample_names'
			-G $gff
			-f $format
			-r $order
			-S $stranded
			-a $minaqual
			-T $feature_type
			-i $idattr
			-m $mode
			-c $count


    ]]></command>
    <inputs>
        <param type="data" name="alignment_files" label="Alignment file (SAM/BAM)" optional="False" format="sam,bam"
               multiple="True"/>
        <param type="text" name="sample_names" label="Sample names"
               help="sample names for each input SAM/BAM file. Use comma to separate multiple names, for example, sample_1, sample_2, sample_3. The number of sample names should be the same as the number of input SAM/BAM files."
               optional="False" size="5x25"/>
        <param type="select" name="format" argument="-f" label="Input data format" optional="False" multiple="False">
            <option value="sam" selected="false">SAM</option>
            <option value="bam" selected="true">BAM</option>
        </param>
        <param type="data" name="gff" label="GFF file" optional="False" format="gff,gff3"/>
        <param type="select" name="order" argument="-r" label="Order"
               help="Use this option to indicate how the input data has been sorted. The default is name.&#13;&#10;&#13;&#10;"
               optional="False" multiple="False">
            <option value="name" selected="false">Name</option>
            <option value="pos" selected="false">Position</option>
        </param>
        <param type="select" name="stranded" argument="-s" label="Stranded" optional="False" multiple="False">
            <option value="yes" selected="true">Yes</option>
            <option value="no" selected="false">No</option>
            <option value="reverse" selected="false">Reverse</option>
        </param>
        <param type="integer" name="minaqual" argument="-a" label="Alignment quality "
               help="Skip all reads with alignment quality lower than the given minimum value (default: 10)"
               optional="False" value="10" min="0"/>
        <param type="text" name="feature_type" argument="-t" label="Feature type"
               help="Feature type (3rd column in GFF file) to be used, all features of other type are ignored (default, suitable for RNA-Seq analysis using an Ensembl GTF file: exon)"
               optional="False" value="exon"/>
        <param type="text" name="idattr" argument="-i" label="ID attribute"
               help="GFF attribute to be used as feature ID. Several GFF lines with the same feature ID will be considered as parts of the same feature. The feature ID is used to identity the counts in the output table. The default, suitable for RNA-Seq analysis using an Ensembl GTF file, is gene_id."
               optional="False" value="gene_id"/>
        <param type="select" name="mode" argument="-m" label="Mode"
               help="Mode to handle reads overlapping more than one feature. Possible values for &lt;mode&gt; are union, intersection-strict and intersection-nonempty (default: union)"
               optional="False" multiple="False">
            <option value="union" selected="true">Union</option>
            <option value="intersection-strict" selected="false">Intersection (strict)</option>
            <option value="intersection-nonempty" selected="false">Intersection (nonempty)</option>
        </param>
    </inputs>
    <outputs>
        <data name="report" format="html" label="${tool.name} report on ${on_string}" hidden="false"/>
        <data name="count" format="csv" label="${tool.name} txt count on ${on_string}" hidden="false"/>
    </outputs>
    <citations>
        <citation type="bibtex"><![CDATA[
            @article{allaire2016rmarkdown,
            title={rmarkdown: Dynamic Documents for R, 2016},
            author={Allaire, J and Cheng, Joe and Xie, Yihui and McPherson, Jonathan and Chang, Winston and Allen, Jeff
            and Wickham, Hadley and Atkins, Aron and Hyndman, Rob},
            journal={R package version 0.9},
            volume={6},
            year={2016}
            }
        ]]></citation>
        <citation type="bibtex"><![CDATA[
            @book{xie2015dynamic,
            title={Dynamic Documents with R and knitr},
            author={Xie, Yihui},
            volume={29},
            year={2015},
            publisher={CRC Press}
            }
        ]]></citation>
        <citation type="bibtex"><![CDATA[
            @online{jstree,
            author={Bozhanov, Ivan},
            year = 2018,
            url = {https://www.jstree.com/}
            }
        ]]></citation>
        <citation type="bibtex"><![CDATA[
            @article{anders2015htseq,
            title={HTSeq—a Python framework to work with high-throughput sequencing data},
            author={Anders, Simon and Pyl, Paul Theodor and Huber, Wolfgang},
            journal={Bioinformatics},
            volume={31},
            number={2},
            pages={166--169},
            year={2015},
            publisher={Oxford University Press}
            }
        ]]></citation>
    </citations>
</tool>