diff freqmethcalculate.xml @ 0:80b6e23cb70d draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ commit cc7e6263fdb9e59f992aee41fc9d62425f39bf38"
author iuc
date Tue, 12 May 2020 17:08:21 -0400
parents
children f08dfdcefdbd
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/freqmethcalculate.xml	Tue May 12 17:08:21 2020 -0400
@@ -0,0 +1,129 @@
+<?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="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>
\ No newline at end of file