view freqmethcalculate.xml @ 1:f08dfdcefdbd draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/nanopolishcomp commit fc685e81241eb196e57669961a42d03c60e7c9b6
author iuc
date Wed, 13 Mar 2024 11:52:05 +0000
parents 80b6e23cb70d
children
line wrap: on
line source

<?xml version="1.0"?>
<tool id="nanopolishcomp_freqmethcalculate" name="NanopolishComp: FreqMethCalculate" version="@TOOL_VERSION@+@WRAPPER_VERSION@">
    <description>calculates methylation frequency at genomic CpG sites</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="xrefs"/>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="exit_code"><![CDATA[
        NanopolishComp Freq_meth_calculate
            ## required
            -i '$i'
            ## optional
            -d $d
            #if $f
                -f '$f'
            #end if
            #if $s
                -s '$s'
            #end if
            $strand_specific
            --min_llr $min_llr
            -b 'result.bed'
            -t 'result.tsv'
            -v
        ]]></command>
    <inputs>
        <param argument="-i" type="data" format="tabular" label="Select nanopolish call methylation file"/>
        <param argument="-d" type="integer" value="10" min="0" label="Set minimal number of reads covering a site to be reported"/>
        <param argument="-f" type="data" format="fai" optional="true" label="Select fasta index file" help="Obtained with samtools faidx. Required for coordinate sorting"/>
        <param argument="-s" type="text" value="" optional="true" label="Set sample ID" help="Used for bed track header."/>
        <param argument="--strand_specific" type="boolean" truevalue="--strand_specific" falsevalue="" label="Are sites strand specific?"/>
        <param argument="--min_llr" type="integer" value="2" min="0" label="Set minimal log likelyhood ratio" help="To consider a site significantly methylated or unmethylated."/>
        <param name="out" type="select" multiple="true" optional="false" label="Select output file(s)">
            <option value="bed" selected="true">Methylation frequency (BED)</option>
            <option value="tsv" selected="true">Methylation frequency (Tabular)</option>
        </param>
    </inputs>
    <outputs>
        <data name="out_bed" format="bed" from_work_dir="result.bed" label="${tool.name} on ${on_string}: Methylation frequency (BED)">
            <filter>'bed' in out</filter>
        </data>
        <data name="out_tsv" format="tabular" from_work_dir="result.tsv" label="${tool.name} on ${on_string}: Methylation frequency (Tabular)">
            <filter>'tsv' in out</filter>
        </data>
    </outputs>
    <tests>
        <!-- #1 default -->
        <test expect_num_outputs="2">
            <param name="i" value="sample_meth.tsv"/>
            <output name="out_bed">
                <assert_contents>
                    <has_n_lines n="56"/>
                    <has_line line="track name=Methylation_ itemRgb=On"/>
                    <has_text_matching expression="tig00000001&#009;201961.+"/>
                </assert_contents>
            </output>
            <output name="out_tsv">
                <assert_contents>
                    <has_n_lines n="56"/>
                    <has_text_matching expression="chromosome&#009;start.+"/>
                    <has_text_matching expression="tig00000001&#009;201961.+"/>
                </assert_contents>
            </output>
        </test>
        <!-- #2 -->
        <test expect_num_outputs="2">
            <param name="i" value="sample_meth.tsv"/>
            <param name="d" value="11"/>
            <param name="s" value="test"/>
            <param name="strand_specific" value="true"/>
            <param name="min_llr" value="3"/>
            <param name="out" value="bed,tsv"/>
            <output name="out_bed">
                <assert_contents>
                    <has_n_lines n="111"/>
                    <has_line line="track name=Methylation_test itemRgb=On"/>
                    <has_text_matching expression="tig00000001&#009;200009.+"/>
                </assert_contents>
            </output>
            <output name="out_tsv">
                <assert_contents>
                    <has_n_lines n="111"/>
                    <has_text_matching expression="chromosome&#009;start.+"/>
                    <has_text_matching expression="tig00000001&#009;201961.+"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
.. class:: infomark

**What it does**

@WID@

Freq_meth_calculate calculates methylation frequency at genomic CpG sites from the output of nanopolish call-methylation.

**Input**

A nanopolish call methylation tabular output file.

**Output**

*BED file*

Standard genomic BED6. The score correspond to the methylation frequency multiplied by 1000. The file is sorted by coordinates and can be rendered with a genome browser such as IGV

*Tabulated TSV file*

Contrary to the bed file, in the tabulated report, positions are ordered by decreasing methylation frequency.

The file contains the following fields:

- chrom / start / end / strand: Genomic coordinates of the motif or group of motifs in case split_group was not selected.
- site_id: Unique integer identifier of the genomic position.
- methylated_reads / unmethylated_reads / ambiguous_reads: Number of reads at a given genomic location with a higher likelyhood of being methylated or unmethylated or with an ambiguous methylation call.
- sequence: -5 to +5 sequence of the motif or group of motifs in case split_group was not selected.
- num_motifs: Number of motif in the group.
- meth_freq: Methylation frequency (out of non anbiguous calls).

.. class:: infomark

**References**

@REFERENCES@
    ]]></help>
    <expand macro="citations"/>
</tool>