Repository 'pileometh'
hg clone https://toolshed.g2.bx.psu.edu/repos/bgruening/pileometh

Changeset 3:f112bf3dd5ff (2017-02-13)
Previous changeset 2:cda51d96a9bc (2017-02-13) Next changeset 4:b327b539ec58 (2017-03-12)
Commit message:
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pileometh commit 5468fb89708be679e4e580074734e671f60a9648
modified:
tool_dependencies.xml
added:
MethylDackel.xml
test-data/test_3.bedGraph
test-data/test_4.bedGraph
test-data/test_5.methylKit
removed:
PileOMeth.xml
b
diff -r cda51d96a9bc -r f112bf3dd5ff MethylDackel.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/MethylDackel.xml Mon Feb 13 22:44:01 2017 -0500
[
b'@@ -0,0 +1,453 @@\n+<tool id="pileometh" name="MethylDackel" version="0.2.1">\n+    <description>A tool for processing bisulfite sequencing alignments</description>\n+    <requirements>\n+        <requirement type="package" version="0.2.1">methyldackel</requirement>\n+    </requirements>\n+    <stdio>\n+        <!-- Anything other than zero is an error -->\n+        <exit_code range="1:" />\n+        <exit_code range=":-1" />\n+        <!-- In case the return code has not been set propery check stderr too -->\n+        <regex match="Error:" />\n+        <regex match="Exception:" />\n+    </stdio>\n+    <version_command><![CDATA[MethylDackel --version]]></version_command>\n+    <command><![CDATA[\n+        #if $reference_source.reference_source_selector == "cached":\n+            ln -s $reference_source.ref_file.fields.path reference.fasta &&\n+        #else:\n+            ln -s $reference_source.ref_file reference.fasta &&\n+        #end if\n+\n+        MethylDackel\n+            $main_task.task\n+\n+            #if $main_task.task == "extract":\n+                -o output\n+                $main_task.mergeContext\n+                #if str($main_task.OT).strip() != "":\n+                    --OT $main_task.OT\n+                #end if\n+                #if str($main_task.OB).strip() != "":\n+                    --OB $main_task.OB\n+                #end if\n+                #if str($main_task.CTOT).strip() != "":\n+                    --CTOT $main_task.CTOT\n+                #end if\n+                #if str($main_task.CTOB).strip() != "":\n+                    --CTOB $main_task.CTOB\n+                #end if\n+            #end if\n+\n+            #if $advanced_options.options=="yes":\n+                #if $advanced_options.mbias_regionString:\n+                    -r $advanced_options.mbias_regionString\n+                #end if\n+                $advanced_options.keepDupes\n+                $advanced_options.keepSingleton\n+                $advanced_options.keepDiscordant\n+                -q $advanced_options.min_mapq\n+                -p $advanced_options.min_phred\n+                -D $advanced_options.max_pbdepth\n+                #if $main_task.task == "extract":\n+                    -d $advanced_options.min_pbdepth\n+                    --ignoreFlags $advanced_options.ignoreFlags\n+                    --requireFlags $advanced_options.requireFlags\n+                    $advanced_options.fraction\n+                    $advanced_options.counts\n+                    $advanced_options.methylKit\n+                    $advanced_options.logit\n+                    #if str($advanced_options.nOT).strip() != "":\n+                        --nOT $advanced_options.nOT\n+                    #end if\n+                    #if str($advanced_options.nOB).strip() != "":\n+                        --nOB $advanced_options.nOB\n+                    #end if\n+                    #if str($advanced_options.nCTOT).strip() != "":\n+                        --nCTOT $advanced_options.nCTOT\n+                    #end if\n+                    #if str($advanced_options.nCTOB).strip() != "":\n+                        --nCTOB $advanced_options.nCTOB\n+                    #end if\n+                #end if\n+                $advanced_options.CHG\n+                $advanced_options.CHH\n+            #end if\n+\n+            reference.fasta\n+\n+            $input_sortedAlignBAM\n+\n+            #if $main_task.task == "mbias":\n+                out_mbias &&\n+                touch out_mbias_OT.svg &&\n+                touch out_mbias_OB.svg &&\n+                touch out_mbias_CTOT.svg &&\n+                touch out_mbias_CTOB.svg\n+            #end if\n+    ]]></command>\n+    <inputs>\n+        <conditional name="reference_source">\n+            <param name="reference_source_selector" type="select" label="Load reference genome from">\n+                <option value="cached">Local cache</option>\n+                <option value="history">History</option>\n+            </param>\n+            <when value="cached">\n+                <param name="ref_file"'..b'uch regions in the extracted methylation metrics will result in noisier and less accurate data. For this reason, users are strongly encouraged to make a methylation bias plot.\n+\n+That command will create a methylation bias (mbias for short) plot for each of the strands for which there are valid alignments.\n+The resulting mbias graphs are in SVG format and can be viewed in most modern web browsers:\n+\n+.. image:: $PATH_TO_IMAGES/example.svg\n+\n+\n+If you have paired-end data, both reads in the pair will be shown separately, as is the case above. The program will suggest regions for inclusion ("--OT 2,0,0,98" above) and mark them on the plot, if applicable. The format of this output is described in MethylDackel extract -h. These suggestions should not be accepted blindly; users are strongly encouraged to have a look for themselves and tweak the actual bounds as appropriate. The lines indicate the average methylation percentage at a given position and the shaded regions the 99.9% confidence interval around it. This is useful in gauging how many methylation calls a given position has relative to its neighbors. Note the spike in methylation at the end of read #2 and the corresponding dip at the beginning of read #1. This is common and these regions can be ignored with the suggested trimming bounds. Note also that the numbers refer to the first and last base that should be included during methylation extraction, not the last and first base to ignore!.\n+\n+**Excluding low-coverage regions**\n+\n+If your downstream analysis requires an absolute minimum coverage (here, defined as the number of methylation calls kept after filtering for MAPQ, phred score, etc.), you can use the `--minDepth` option to achieve this. By default, `MethylDackel extract` will output all methylation metrics as long as the coverage is at least 1. If you use `--minDepth 10`, then only sites covered at least 10x will be output. This works in conjunction with the `--mergeContext` option, above. So if you request per-CpG context output (i.e., with `--mergeContext`) and `--minDepth 10` then only CpGs with a minimum coverage of 10 will be output.\n+\n+**Logit, fraction, and counts only output**\n+\n+The standard output described above can be modified if you supply the `--fraction`, `--counts`, or `--logit` options to `MethylDackel extract`.\n+\n+The `--fraction` option essentially produces the first 4 columns of the standard output described above. The only other difference is that the range of the 4th column is now between 0 and 1, instead of 0 and 100. Instead of producing a file ending simply in `.bedGraph`, one ending in `.meth.bedGraph` will instead be produced.\n+\n+The `--counts` option produces the first three columns of the standard output followed by a column of total coverage counts. This last column is equivalent to the sum of the 5th and 6th columns of the standard output. The resulting file ends in `.counts.bedGraph` rather than simply `.bedGraph`.\n+\n+The `--logit` option produces the first three columns of the standard output followed by the logit transformed methylation fraction. The logit transformation is log(Methylation fraction/(1-Methylation fraction)). Note that log uses base e. Logit transformed methylation values range between +/- infinity, rather than [0,1]. The resulting file ends in `.logit.bedGraph` rather than simply `.bedGraph`.\n+\n+Note that these options may be combined with `--mergeContext`. However, `MethylDackel mergeContext` can not be used after the fact to combine these.\n+\n+**methylKit-compatible output**\n+\n+methylKit has its own format, which can be produced with the `--methylKit` option. Merging Cs into CpGs or CHGs is forbidden in this format. Likewise, this option is mutually exclusive with `--logit` et al.\n+\n+\n+-----\n+\n+**MethylDackel** is a Free and Open Source Software, see more details on the MethylDackel_ Website.\n+\n+.. _MethylDackel: https://github.com/dpryan79/MethylDackel\n+    ]]></help>\n+    <citations>\n+    </citations>\n+</tool>\n'
b
diff -r cda51d96a9bc -r f112bf3dd5ff PileOMeth.xml
--- a/PileOMeth.xml Mon Feb 13 07:09:59 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,289 +0,0 @@\n-<tool id="pileometh" name="PileOMeth" version="0.1.13">\n-    <description>A tool for processing bisulfite sequencing alignments</description>\n-    <requirements>\n-        <requirement type="package" version="0.1.13">pileometh</requirement>\n-    </requirements>\n-    <stdio>\n-        <!-- Anything other than zero is an error -->\n-        <exit_code range="1:" />\n-        <exit_code range=":-1" />\n-        <!-- In case the return code has not been set propery check stderr too -->\n-        <regex match="Error:" />\n-        <regex match="Exception:" />\n-    </stdio>\n-    <version_command><![CDATA[PileOMeth --version]]></version_command>\n-    <command><![CDATA[\n-        #if $reference_source.reference_source_selector == "cached":\n-            ln -s $reference_source.ref_file.fields.path reference.fasta &&\n-        #else:\n-            ln -s $reference_source.ref_file reference.fasta &&\n-        #end if\n-\n-        PileOMeth\n-            $main_task.task\n-\n-            #if $main_task.task == "extract":\n-                -o output\n-                $main_task.mergeContext\n-                #if str($main_task.OT).strip() != "":\n-                    --OT $main_task.OT\n-                #end if\n-                #if str($main_task.OB).strip() != "":\n-                    --OB $main_task.OB\n-                #end if\n-                #if str($main_task.CTOT).strip() != "":\n-                    --CTOT $main_task.CTOT\n-                #end if\n-                #if str($main_task.CTOB).strip() != "":\n-                    --CTOB $main_task.CTOB\n-                #end if\n-                $main_task.keepSingleton\n-                $main_task.keepDiscordant\n-                $main_task.fraction\n-            #end if\n-\n-            #if $advanced_options.options=="yes":\n-                #if $advanced_options.mbias_regionString:\n-                    -r $advanced_options.mbias_regionString\n-                #end if\n-                $advanced_options.keepDupes\n-                $advanced_options.keepSingleton\n-                -q $advanced_options.min_mapq\n-                -p $advanced_options.min_phred\n-                -D $advanced_options.max_pbdepth\n-                #if $main_task.task == "extract":\n-                    -d $advanced_options.min_pbdepth\n-                #end if\n-                $advanced_options.CHG\n-                $advanced_options.CHH\n-            #end if\n-\n-            reference.fasta\n-\n-            $input_sortedAlignBAM\n-\n-            #if $main_task.task == "mbias":\n-                $main_task.keepSingleton_mbias\n-                $main_task.keepDiscordant_mbias\n-                out_mbias &&\n-                touch out_mbias_OT.svg &&\n-                touch out_mbias_OB.svg &&\n-                touch out_mbias_CTOT.svg &&\n-                touch out_mbias_CTOB.svg\n-            #end if\n-    ]]></command>\n-    <inputs>\n-        <conditional name="reference_source">\n-            <param name="reference_source_selector" type="select" label="Load reference genome from">\n-                <option value="cached">Local cache</option>\n-                <option value="history">History</option>\n-            </param>\n-            <when value="cached">\n-                <param name="ref_file" type="select" label="Using reference genome" help="Reference sequence">\n-                    <options from_data_table="all_fasta"/>\n-                    <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>\n-                </param>\n-            </when>\n-            <when value="history">\n-                <param name="ref_file" type="data" format="fasta" label="Use the folloing dataset as the reference sequence" help="REFERENCE_SEQUENCE; You can upload a FASTA sequence to the history and use it as reference" />\n-            </when>\n-        </conditional>\n-\n-        <param name="input_sortedAlignBAM" multiple="False" type="data" format="bam" label="sorted_alignments.bam"/>\n'..b'ate\n-3. The end coordinate\n-4. The methylation percentage rounded to an integer\n-5. The number of alignments/pairs reporting methylated bases\n-6. The number of alignments/pairs reporting unmethylated bases\n-\n-All coordinates are 0-based half open, which conforms to the bedGraph definition. When paired-end reads are aligned, it can often occur that their alignments overlap. In such cases, PileOMeth will not count both reads of the pair in its output, as doing so would lead to incorrect downstream statistical results.\n-\n-An example of the output is below::\n-\n-#track type="bedGraph" description="SRR1182519.sorted CpG methylation levels"\n-#1   25115   25116   100 3   0\n-#1   29336   29337   50  1   1\n-\n-Note the header line, which starts with "track". The "description" field is used as a label in programs such as IGV. Each of the subsequent lines describe single Cytosines, the 25116th and 29337th base on chromosome 1, respectively. The first position has 3 alignments (or pairs of alignments) indicating methylation and 0 indicating unmethylation (100% methylation) and the second position has 1 alignment each supporting methylation and unmethylation (50% methylation).\n-\n-**Per-CpG/CHG metrics**\n-\n-In many circumstances, it\'s desireable for metrics from individual Cytosines in a CpG to be merged, producing per-CpG metrics rather than per-Cytosine metrics. This can be accomplished with the **Merge per-Cytosine** parameter. If this is used, then this output::\n-\n-#track type="bedGraph" description="SRR1182519.sorted CpG methylation levels"\n-#1   25114   25115   100 2   1\n-#1   25115   25116   100 3   0\n-\n-is changed to this::\n-\n-#track type="bedGraph" description="SRR1182519.sorted merged CpG methylation levels"\n-#1   25114   25116   100 5   1\n-\n-This also works for CHG-level metrics. If bedGraph files containing per-Cytosine metrics already exist, they can be converted to instead contain per-CpG/CHG metrics with PileOMeth mergeContext.\n-\n-**Methylation bias plotting and correction**\n-\n-In an ideal experiment, we expect that the probability of observing a methylated C is constant across the length of any given read. In practice, however, there are often increases/decreases in observed methylation rate at the ends of reads and/or more global changes. These are termed methylation bias and including such regions in the extracted methylation metrics will result in noisier and less accurate data. For this reason, users are strongly encouraged to make a methylation bias plot.\n-\n-That command will create a methylation bias (mbias for short) plot for each of the strands for which there are valid alignments.\n-The resulting mbias graphs are in SVG format and can be viewed in most modern web browsers:\n-\n-.. image:: example.svg\n-\n-\n-If you have paired-end data, both reads in the pair will be shown separately, as is the case above. The program will suggest regions for inclusion ("--OT 2,0,0,98" above) and mark them on the plot, if applicable. The format of this output is described in PileOMeth extract -h. These suggestions should not be accepted blindly; users are strongly encouraged to have a look for themselves and tweak the actual bounds as appropriate. The lines indicate the average methylation percentage at a given position and the shaded regions the 99.9% confidence interval around it. This is useful in gauging how many methylation calls a given position has relative to its neighbors. Note the spike in methylation at the end of read #2 and the corresponding dip at the beginning of read #1. This is common and these regions can be ignored with the suggested trimming bounds. Note also that the numbers refer to the first and last base that should be included during methylation extraction, not the last and first base to ignore!.\n-\n------\n-\n-**PileOMeth** is a Free and Open Source Software, see more details on the PileOMeth_ Website.\n-\n-.. _PileOMeth: https://github.com/dpryan79/PileOMeth\n-    ]]></help>\n-    <citations>\n-    </citations>\n-</tool>\n'
b
diff -r cda51d96a9bc -r f112bf3dd5ff test-data/test_3.bedGraph
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_3.bedGraph Mon Feb 13 22:44:01 2017 -0500
b
@@ -0,0 +1,49 @@
+track type="bedGraph" description="output CpG methylation fractions"
+chrCG 0 1 1.000000
+chrCG 2 3 1.000000
+chrCG 4 5 1.000000
+chrCG 6 7 1.000000
+chrCG 8 9 1.000000
+chrCG 10 11 1.000000
+chrCG 12 13 1.000000
+chrCG 14 15 1.000000
+chrCG 18 19 1.000000
+chrCG 20 21 1.000000
+chrCG 22 23 1.000000
+chrCG 24 25 1.000000
+chrCG 26 27 1.000000
+chrCG 28 29 1.000000
+chrCG 30 31 1.000000
+chrCG 32 33 1.000000
+chrCG 34 35 1.000000
+chrCG 36 37 1.000000
+chrCG 38 39 1.000000
+chrCG 40 41 1.000000
+chrCG 42 43 1.000000
+chrCG 44 45 1.000000
+chrCG 46 47 1.000000
+chrCG 48 49 1.000000
+chrCG 50 51 1.000000
+chrCG 52 53 1.000000
+chrCG 54 55 1.000000
+chrCG 56 57 1.000000
+chrCG 58 59 1.000000
+chrCG 60 61 1.000000
+chrCG 62 63 1.000000
+chrCG 64 65 1.000000
+chrCG 66 67 1.000000
+chrCG 68 69 1.000000
+chrCG 70 71 1.000000
+chrCG 72 73 1.000000
+chrCG 74 75 1.000000
+chrCG 76 77 1.000000
+chrCG 78 79 1.000000
+chrCG 80 81 1.000000
+chrCG 82 83 1.000000
+chrCG 84 85 1.000000
+chrCG 86 87 1.000000
+chrCG 88 89 1.000000
+chrCG 90 91 1.000000
+chrCG 92 93 1.000000
+chrCG 94 95 1.000000
+chrCG 96 97 1.000000
b
diff -r cda51d96a9bc -r f112bf3dd5ff test-data/test_4.bedGraph
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_4.bedGraph Mon Feb 13 22:44:01 2017 -0500
b
@@ -0,0 +1,49 @@
+track type="bedGraph" description="output CpG logit transformed methylation fractions"
+chrCG 0 1 inf
+chrCG 2 3 inf
+chrCG 4 5 inf
+chrCG 6 7 inf
+chrCG 8 9 inf
+chrCG 10 11 inf
+chrCG 12 13 inf
+chrCG 14 15 inf
+chrCG 18 19 inf
+chrCG 20 21 inf
+chrCG 22 23 inf
+chrCG 24 25 inf
+chrCG 26 27 inf
+chrCG 28 29 inf
+chrCG 30 31 inf
+chrCG 32 33 inf
+chrCG 34 35 inf
+chrCG 36 37 inf
+chrCG 38 39 inf
+chrCG 40 41 inf
+chrCG 42 43 inf
+chrCG 44 45 inf
+chrCG 46 47 inf
+chrCG 48 49 inf
+chrCG 50 51 inf
+chrCG 52 53 inf
+chrCG 54 55 inf
+chrCG 56 57 inf
+chrCG 58 59 inf
+chrCG 60 61 inf
+chrCG 62 63 inf
+chrCG 64 65 inf
+chrCG 66 67 inf
+chrCG 68 69 inf
+chrCG 70 71 inf
+chrCG 72 73 inf
+chrCG 74 75 inf
+chrCG 76 77 inf
+chrCG 78 79 inf
+chrCG 80 81 inf
+chrCG 82 83 inf
+chrCG 84 85 inf
+chrCG 86 87 inf
+chrCG 88 89 inf
+chrCG 90 91 inf
+chrCG 92 93 inf
+chrCG 94 95 inf
+chrCG 96 97 inf
b
diff -r cda51d96a9bc -r f112bf3dd5ff test-data/test_5.methylKit
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_5.methylKit Mon Feb 13 22:44:01 2017 -0500
b
@@ -0,0 +1,49 @@
+chrBase chr base strand coverage freqC freqT
+chrCG.1 chrCG 1 F 1 100.00   0.00
+chrCG.3 chrCG 3 F 1 100.00   0.00
+chrCG.5 chrCG 5 F 1 100.00   0.00
+chrCG.7 chrCG 7 F 1 100.00   0.00
+chrCG.9 chrCG 9 F 1 100.00   0.00
+chrCG.11 chrCG 11 F 1 100.00   0.00
+chrCG.13 chrCG 13 F 1 100.00   0.00
+chrCG.15 chrCG 15 F 1 100.00   0.00
+chrCG.19 chrCG 19 F 1 100.00   0.00
+chrCG.21 chrCG 21 F 1 100.00   0.00
+chrCG.23 chrCG 23 F 1 100.00   0.00
+chrCG.25 chrCG 25 F 1 100.00   0.00
+chrCG.27 chrCG 27 F 1 100.00   0.00
+chrCG.29 chrCG 29 F 1 100.00   0.00
+chrCG.31 chrCG 31 F 1 100.00   0.00
+chrCG.33 chrCG 33 F 1 100.00   0.00
+chrCG.35 chrCG 35 F 1 100.00   0.00
+chrCG.37 chrCG 37 F 1 100.00   0.00
+chrCG.39 chrCG 39 F 1 100.00   0.00
+chrCG.41 chrCG 41 F 1 100.00   0.00
+chrCG.43 chrCG 43 F 1 100.00   0.00
+chrCG.45 chrCG 45 F 1 100.00   0.00
+chrCG.47 chrCG 47 F 1 100.00   0.00
+chrCG.49 chrCG 49 F 1 100.00   0.00
+chrCG.51 chrCG 51 F 1 100.00   0.00
+chrCG.53 chrCG 53 F 1 100.00   0.00
+chrCG.55 chrCG 55 F 1 100.00   0.00
+chrCG.57 chrCG 57 F 1 100.00   0.00
+chrCG.59 chrCG 59 F 1 100.00   0.00
+chrCG.61 chrCG 61 F 1 100.00   0.00
+chrCG.63 chrCG 63 F 1 100.00   0.00
+chrCG.65 chrCG 65 F 1 100.00   0.00
+chrCG.67 chrCG 67 F 1 100.00   0.00
+chrCG.69 chrCG 69 F 1 100.00   0.00
+chrCG.71 chrCG 71 F 1 100.00   0.00
+chrCG.73 chrCG 73 F 1 100.00   0.00
+chrCG.75 chrCG 75 F 1 100.00   0.00
+chrCG.77 chrCG 77 F 1 100.00   0.00
+chrCG.79 chrCG 79 F 1 100.00   0.00
+chrCG.81 chrCG 81 F 1 100.00   0.00
+chrCG.83 chrCG 83 F 1 100.00   0.00
+chrCG.85 chrCG 85 F 1 100.00   0.00
+chrCG.87 chrCG 87 F 1 100.00   0.00
+chrCG.89 chrCG 89 F 1 100.00   0.00
+chrCG.91 chrCG 91 F 1 100.00   0.00
+chrCG.93 chrCG 93 F 1 100.00   0.00
+chrCG.95 chrCG 95 F 1 100.00   0.00
+chrCG.97 chrCG 97 F 1 100.00   0.00
b
diff -r cda51d96a9bc -r f112bf3dd5ff tool_dependencies.xml
--- a/tool_dependencies.xml Mon Feb 13 07:09:59 2017 -0500
+++ b/tool_dependencies.xml Mon Feb 13 22:44:01 2017 -0500
[
@@ -1,21 +1,21 @@
 <?xml version="1.0"?>
 <tool_dependency>
-    <package name="pileometh" version="0.1.13">
+    <package name="methyldackel" version="0.2.1">
         <install version="1.0">
             <actions>
-                <action target_filename="PileOMeth-0.1.13.tar.gz" type="download_by_url">https://github.com/dpryan79/PileOMeth/archive/0.1.13.tar.gz</action>
+                <action target_filename="MethylDackel-0.2.1.tar.gz" type="download_by_url">https://github.com/dpryan79/MethylDackel/archive/0.2.1.tar.gz</action>
                 <action type="shell_command">make</action>
                 <action type="shell_command">make install prefix=$INSTALL_DIR/bin</action>
                 <action type="set_environment">
                     <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
-                    <environment_variable name="PILEOMETH_ROOT_PATH" action="set_to">$INSTALL_DIR</environment_variable>
+                    <environment_variable name="METHYLDACKEL_ROOT_PATH" action="set_to">$INSTALL_DIR</environment_variable>
                 </action>
             </actions>
         </install>
             <readme>
         <![CDATA[
-            PileOMeth: A tool for processing bisulfite sequencing alignments.
-            See https://github.com/dpryan79/PileOMeth/
+            MethylDackel: A tool for processing bisulfite sequencing alignments.
+            See https://github.com/dpryan79/MethylDackel/
         ]]>
         </readme>
     </package>