view nanopore_qc.xml @ 2:5c7848b91964 draft default tip

planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/nanopore_qc commit efc73adf2038b9c6504c60f35202e91dbc7f4d48-dirty
author jvolkening
date Sat, 02 Mar 2024 05:33:33 +0000
parents 73bc3179799c
children
line wrap: on
line source

<tool id="nanopore_qc" name="NanoporeQC" version="0.003">

    <description>Quality report for nanopore data</description>

    <requirements>
        <requirement type="package" version="3.5.0">r-ggplot2</requirement>
        <requirement type="package" version="1.1.4">r-dplyr</requirement>
        <requirement type="package" version="1.3.1">r-tidyr</requirement>
        <requirement type="package" version="2.1.5">r-readr</requirement>
        <requirement type="package" version="2.3.8">r-yaml</requirement>
        <requirement type="package" version="1.3.0">r-scales</requirement>
        <requirement type="package" version="1.4.3">r-futile.logger</requirement>
        <requirement type="package" version="1.14.10">r-data.table</requirement>
        <requirement type="package" version="1.7.4">r-optparse</requirement>
        <requirement type="package" version="1.2.7">r-ragg</requirement>
        <requirement type="package" version="0.88">perl-yaml-libyaml</requirement>
    </requirements>

    <stdio>
        <exit_code range="1:" level="fatal" description="Unknown error" />
        <exit_code range=":-1" level="fatal" description="Unknown error" />
    </stdio>

    <version_command>
    <![CDATA[
        echo '0.003'
    ]]>
    </version_command>

    <command>
    <![CDATA[

        mkdir -p '${html_file.files_path}'

        &&

        Rscript '${__tool_directory__}/nanopore_qc.R'
            -i '$input'
            -o '${html_file.files_path}'
            -q '$q_cutoff'
            $discard_failed

        &&

        perl '${__tool_directory__}/yaml_to_html.pl'

            '${html_file.files_path}/summary.yaml'
            '${html_file.files_path}'
            '$html_file'

    ]]>
    </command>

    <inputs>
        <param name="input" type="data" format="tabular" label="Basecall summary file from Albacore"/>
        <param name="q_cutoff" type="float" value="10" min="0" label="Quality cutoff for QC calculations" />
        <param name="discard_failed" type="boolean" checked="false" truevalue="--discard_failed T" falsevalue="" label="Ignore reads failing quality filter" />
    </inputs>
    <outputs>
        <data format="html" name="html_file" label="NanoporeQC on ${on_string}" />
    </outputs>
    <tests>
        <!-- binary image blobs can differ, which is why we use line matching
        instead of file matching -->

        <!-- quality cutoff 10 -->
        <test>
            <param name="input" value="sequencing_summary.txt.small" ftype="tabular" />
            <param name="q_cutoff" value="10" />
            <output name="html_file">
                <assert_contents>
                    <has_text_matching expression="&lt;td&gt;Total Reads&lt;/td&gt;\s*&lt;td&gt;9990&lt;/td&gt;" />
                    <has_text_matching expression="&lt;td&gt;Total Reads&lt;/td&gt;\s*&lt;td&gt;7952&lt;/td&gt;" />
                </assert_contents>
            </output>
        </test>

        <!-- quality cutoff 6 -->
        <test>
            <param name="input" value="sequencing_summary.txt.small" ftype="tabular" />
            <param name="q_cutoff" value="6" />
            <output name="html_file">
                <assert_contents>
                    <has_text_matching expression="&lt;td&gt;Total Reads&lt;/td&gt;\s*&lt;td&gt;9990&lt;/td&gt;" />
                    <has_text_matching expression="&lt;td&gt;Total Reads&lt;/td&gt;\s*&lt;td&gt;9254&lt;/td&gt;" />
                </assert_contents>
            </output>
        </test>

        <!-- quality cutoff 6, discard filtered -->
        <test>
            <param name="input" value="sequencing_summary.txt.small" ftype="tabular" />
            <param name="q_cutoff" value="6" />
            <param name="discard_failed" value="true" />
            <output name="html_file">
                <assert_contents>
                    <has_text_matching expression="&lt;td&gt;Total Reads&lt;/td&gt;\s*&lt;td&gt;9107&lt;/td&gt;" />
                    <has_text_matching expression="&lt;td&gt;Total Reads&lt;/td&gt;\s*&lt;td&gt;9107&lt;/td&gt;" />
                </assert_contents>
            </output>
        </test>

        <!-- Dorado output -->
        <test>
            <param name="input" value="dorado.txt.small" ftype="tabular" />
            <param name="q_cutoff" value="6" />
            <output name="html_file">
                <assert_contents>
                    <has_text_matching expression="&lt;td&gt;Total Reads&lt;/td&gt;\s*&lt;td&gt;31&lt;/td&gt;" />
                    <has_text_matching expression="&lt;td&gt;Total Reads&lt;/td&gt;\s*&lt;td&gt;29&lt;/td&gt;" />
                </assert_contents>
            </output>
        </test>

    </tests>
    <help>
<![CDATA[
    `NanoporeQC` produces a QC report for nanopore sequencing data. It utilizes
    the summary table produced by Albacore, which saves time by avoiding the
    need to re-parse the FAST5 read data. `NanoporeQC` was originally forked
    from the `minion_qc` codebase (https://github.com/roblanf/minion_qc).

    There are only two tuneable parameters. The 'quality cutoff' sets a
    threshold for plotting: two summaries are produced for each table and plot
    -- one for all reads (with length >= 0) and one for reads with a quality
    value greater than the cutoff. 'Ignore reads failing quality filter'
    indicates whether to include or exclude failing reads from the QC plots.
]]>
    </help>
    <citations>
        <citation type='doi'>10.1093/bioinformatics/bty654</citation>
    </citations>
</tool>