Skip to content

Commit f952b8d

Browse files
committed
add galaxy wrappers for methtools
1 parent cf2c025 commit f952b8d

File tree

6 files changed

+328
-0
lines changed

6 files changed

+328
-0
lines changed

methtools/calling.xml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<tool id="methtools_calling" name="Methylation calling" version="0.1.1">
2+
<description></description>
3+
<requirements>
4+
<requirement type="package" version="0.1_602edc990c6a36e2930f88f3ae5585430164d643">methtools</requirement>
5+
</requirements>
6+
<command>
7+
calling
8+
--processors 4
9+
-i $infile
10+
#if $infile.ext == "bam":
11+
--bam
12+
#end if
13+
14+
#if $cpg == 'true':
15+
--CpG $cpg_output
16+
#end if
17+
18+
#if $chh == 'true':
19+
--CHH $chh_output
20+
#end if
21+
22+
#if $chg == 'true':
23+
--CHG $chg_output
24+
#end if
25+
26+
#if $params.settingsType == "custom":
27+
$params.phred
28+
## default 10
29+
--mincov $params.mincov
30+
## default 20
31+
--minqual $params.minqual
32+
## default 100
33+
--readlen $params.readlen
34+
$params.methylkit
35+
$params.header
36+
#end if
37+
38+
</command>
39+
<inputs>
40+
41+
<param name="infile" type="data" format="sam,bam" label="SAM or BAM file" help="SAM or BAM file." />
42+
<param name="cpg" type="boolean" truevalue="true" falsevalue="false" checked="True" label="Calculate CpG methylation scores" help="" />
43+
<param name="chh" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Calculate CHH methylation scores" help="" />
44+
<param name="chg" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Calculate CHG methylation scores" help="" />
45+
46+
<conditional name="params">
47+
<param name="settingsType" type="select" label="Meythylation calling - advanced settings" help="You can use the default settings or set custom values for any parameter.">
48+
<option value="default">Use Defaults</option>
49+
<option value="custom">Full parameter list</option>
50+
</param>
51+
<when value="default" />
52+
<!-- Full/advanced params. -->
53+
<when value="custom">
54+
<param name="phred" type="boolean" truevalue="--phred64" falsevalue="" checked="False" label="Run FastQC in the default mode on the FastQ file once trimming is complete" help="" />
55+
<param name="mincov" type="integer" value="10" label="min coverage" help="For more information please see below." />
56+
<param name="minqual" type="integer" value="20" label="min quality" help="For more information please see below." />
57+
<param name="readlen" type="integer" value="100" label="Read length" />
58+
<param name="methylkit" type="boolean" truevalue="--methylkit" falsevalue="" checked="False" label="The generated output files are in methylkit format" help="" />
59+
<param name="header" type="boolean" truevalue="--header" falsevalue="" checked="False" label="Print header line in output files" help="" />
60+
</when> <!-- full -->
61+
</conditional> <!-- params -->
62+
63+
</inputs>
64+
<outputs>
65+
66+
<data format="bed" name="cpg_output" label="${tool.name} on ${on_string}: CpG">
67+
<filter>cpg is True</filter>
68+
<change_format>
69+
<when input="params.methylkit" value="--methylkit" format="tabular" />
70+
</change_format>
71+
</data>
72+
73+
<data format="bed" name="chh_output" label="${tool.name} on ${on_string}: CHH">
74+
<filter>chh is True</filter>
75+
<change_format>
76+
<when input="params.methylkit" value="--methylkit" format="tabular" />
77+
</change_format>
78+
</data>
79+
80+
<data format="bed" name="chg_output" label="${tool.name} on ${on_string}: CHG">
81+
<filter>chg is True</filter>
82+
<change_format>
83+
<when input="params.methylkit" value="--methylkit" format="tabular" />
84+
</change_format>
85+
</data>
86+
87+
</outputs>
88+
<tests>
89+
</tests>
90+
91+
<help>
92+
93+
**What it does**
94+
95+
Methylation calling of SAM or BAM files produced with bismark. BAM files can be processed in parallel and should be much faster.
96+
97+
</help>
98+
</tool>

methtools/destrand.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<tool id="methtools_destrand" name="destrand" version="0.1.1">
2+
<description></description>
3+
<requirements>
4+
<requirement type="package" version="0.1_602edc990c6a36e2930f88f3ae5585430164d643">methtools</requirement>
5+
</requirements>
6+
<command>
7+
destrand
8+
-i $infile
9+
-o $outfile
10+
</command>
11+
<inputs>
12+
<param name="infile" type="data" format="bed" label="BED file." help="" />
13+
</inputs>
14+
<outputs>
15+
<data name="outfile" format="bed" label="${tool.name} on ${on_string}: merged" />
16+
</outputs>
17+
<tests>
18+
</tests>
19+
20+
<help>
21+
22+
**What it does**
23+
24+
Merge CpGs together that are located next to each other. Methylation is symetric, so we can use that trick to enhance the coverage.
25+
26+
27+
</help>
28+
</tool>

methtools/dmr.xml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<tool id="methtools_dmr" name="Find differentially methylated region (DMR)" version="0.1.1">
2+
<description></description>
3+
<requirements>
4+
<requirement type="package" version="0.1_602edc990c6a36e2930f88f3ae5585430164d643">methtools</requirement>
5+
</requirements>
6+
<command>
7+
dmr
8+
--control $infile_control
9+
--affected $infile_affected
10+
--o $outfile
11+
12+
$fisher
13+
14+
#if $min_cov != 0:
15+
--min-coverage $min_cov
16+
#end if
17+
#if $max_cov != 0:
18+
--max-coverage $max_cov
19+
#end if
20+
#if $quantil != 0:
21+
--filter-quantil $quantil
22+
#end if
23+
24+
--min-window-length $min_window_length
25+
--min-delta-methylation $min_delta_methylation
26+
--check-last-n $check_last_n
27+
#if $allow_failed != -1:
28+
--allow-failed $allow_failed
29+
#end if
30+
#if $allow_failed != -1:
31+
--max-cpg-distance $max_cpg_distance
32+
#end if
33+
34+
</command>
35+
<inputs>
36+
<param name="infile_control" type="data" format="bed" label="BED file from control sample" help="" />
37+
<param name="infile_affected" type="data" format="bed" label="BED file from affected sample" help="" />
38+
39+
<param name="min_cov" type="integer" value="0" label="Minimal allowed coverage" help="0 means no filtering at all" />
40+
<param name="max_cov" type="integer" value="50" label="Maximal allowed coverage" help="0 means no filtering at all" />
41+
<param name="quantil" type="float" value="0" label="Filter all site with a greater coverage than the specified quantil (e.g. 0.999)" help="0 means no filtering at all" />
42+
43+
<param name="fisher" type="boolean" truevalue="--fisher" falsevalue="" checked="False" label="print the fisher-exact-test pvalue for each calculated windoe" help="" />
44+
45+
<param name="min_window_length" type="integer" value="4" label="minimal window length" />
46+
<param name="min_delta_methylation" type="integer" value="25" label="minimal delta between the two mehylation states" />
47+
<param name="check_last_n" type="integer" value="4" label="check last N CpG sites if they fullfill all constraints" />
48+
<param name="allow_failed" type="integer" value="-1" label="how many sites are allowed to fail in a row" help="-1 means no check at all" />
49+
<param name="max_cpg_distance" type="integer" value="-1" label="maximal CpG distance" help="-1 means no check at all"/>
50+
51+
</inputs>
52+
<outputs>
53+
<data format="bed" name="outfile" label="${tool.name} on ${on_string}: tiling regions" />
54+
</outputs>
55+
<tests>
56+
</tests>
57+
58+
<help>
59+
60+
**What it does**
61+
62+
Extract differential methylated regions.
63+
64+
</help>
65+
</tool>

methtools/filter.xml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<tool id="methtools_filter" name="filter BED files" version="0.1.1">
2+
<description></description>
3+
<requirements>
4+
<requirement type="package" version="0.1_602edc990c6a36e2930f88f3ae5585430164d643">methtools</requirement>
5+
</requirements>
6+
<command>
7+
filter
8+
--control $infile_control
9+
--affected $infile_affected
10+
--oaffected $oaffected
11+
--ocontrol $ocontrol
12+
13+
#if $pvalue != 0:
14+
--pvalue $pvalue
15+
#end if
16+
#if $min_cov != 0:
17+
--min-coverage $min_cov
18+
#end if
19+
#if $max_cov != 0:
20+
--max-coverage $max_cov
21+
#end if
22+
#if $min_delta_methylation != 0:
23+
--min-delta-methylation $min_delta_methylation
24+
#end if
25+
26+
</command>
27+
<inputs>
28+
<param name="infile_control" type="data" format="bed" label="BED file from control sample" help="" />
29+
<param name="infile_affected" type="data" format="bed" label="BED file from affected sample" help="" />
30+
31+
<param name="pvalue" type="integer" value="0" label="Fisher Exact Test per methylation site" help="maximal pvalue to classify a site as differential methylated. (0 means no test)" />
32+
<param name="min_cov" type="integer" value="0" label="Minimal allowed coverage" help="0 means no filtering at all" />
33+
<param name="max_cov" type="integer" value="0" label="Maximal allowed coverage" help="0 means no filtering at all" />
34+
<param name="min_delta_methylation" type="integer" value="0" label="minimal delta between the two mehylation states" help="0 means no filtering at all" />
35+
36+
</inputs>
37+
<outputs>
38+
<data format="bed" name="ocontrol" label="${tool.name} on ${on_string}: control" />
39+
<data format="bed" name="oaffected" label="${tool.name} on ${on_string}: affected" />
40+
</outputs>
41+
<tests>
42+
</tests>
43+
44+
<help>
45+
46+
**What it does**
47+
48+
</help>
49+
</tool>

methtools/plot.xml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<tool id="methtools_plot" name="Plotting" version="0.1.1">
2+
<description>of methylated regions</description>
3+
<requirements>
4+
<requirement type="package" version="0.1_602edc990c6a36e2930f88f3ae5585430164d643">methtools</requirement>
5+
</requirements>
6+
<command>
7+
#import tempfile, os
8+
#set $temp_dir = os.path.abspath(tempfile.mkdtemp())
9+
#os.chdir( $temp_dir )
10+
11+
plot
12+
--processors 4
13+
--coordinatefile $coordinatefile
14+
-i $infile_control $infile_affected
15+
$overlay_only
16+
17+
;
18+
#if $overlay_only == '--overlay-only':
19+
#cp ./merged.txt $bed_outfile
20+
#cp ./merged.svg $svg_outfile
21+
#else:
22+
#tar -czf $compressed_outfile $temp_dir
23+
#end if
24+
25+
##clean tempdir
26+
#rm $temp_dir -rf
27+
</command>
28+
<inputs>
29+
<param name="infile_control" type="data" format="bed" label="BED file from control sample" help="" />
30+
<param name="infile_affected" type="data" format="bed" label="BED file from affected sample" help="" />
31+
<param name="coordinatefile" type="data" format="bed" label="BED file with methylated regions" help="" />
32+
33+
<param name="overlay_only" type="boolean" truevalue="--overlay-only" falsevalue="" checked="True" label="only create the overlay image" help="" />
34+
35+
</inputs>
36+
<outputs>
37+
<data format="bed" name="bed_outfile" label="${tool.name} on ${on_string}: all plotted regions">
38+
<filter>overlay_only == "--overlay-only"</filter>
39+
</data>
40+
<data format="svg" name="svg_outfile" label="${tool.name} on ${on_string}: overlay image">
41+
<filter>overlay_only == "--overlay-only"</filter>
42+
</data>
43+
<data format="gzipped" name="compressed_outfile" label="${tool.name} on ${on_string}: archive">
44+
<filter>overlay_only == ""</filter>
45+
</data>
46+
</outputs>
47+
<tests>
48+
</tests>
49+
50+
<help>
51+
52+
**What it does**
53+
54+
Extract differential methylated regions.
55+
56+
</help>
57+
</tool>

methtools/tool_dependencies.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0"?>
2+
<tool_dependency>
3+
<package name="methtools" version="0.1_602edc990c6a36e2930f88f3ae5585430164d643">
4+
<install version="1.0">
5+
<actions>
6+
<action type="shell_command">git clone --recursive git://github.com/bgruening/methtools.git</action>
7+
<action type="shell_command">git checkout 602edc990c6a36e2930f88f3ae5585430164d643</action>
8+
<action type="shell_command">git submodule update --recursive</action>
9+
<!--<action type="download_by_url">https://github.com/bgruening/methtools/archive/master.zip</action>-->
10+
<action type="move_directory_files">
11+
<source_directory>methtools/</source_directory>
12+
<destination_directory>$INSTALL_DIR/</destination_directory>
13+
</action>
14+
<action type="shell_command">mv $INSTALL_DIR/calling.py $INSTALL_DIR/calling</action>
15+
<action type="shell_command">mv $INSTALL_DIR/filter.py $INSTALL_DIR/filter</action>
16+
<action type="shell_command">mv $INSTALL_DIR/destrand.py $INSTALL_DIR/destrand</action>
17+
<action type="shell_command">mv $INSTALL_DIR/plot.py $INSTALL_DIR/plot</action>
18+
<action type="shell_command">mv $INSTALL_DIR/dmr.py $INSTALL_DIR/dmr</action>
19+
<action type="shell_command">chmod +x $INSTALL_DIR/*</action>
20+
<action type="set_environment">
21+
<environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/</environment_variable>
22+
</action>
23+
</actions>
24+
</install>
25+
<readme>
26+
</readme>
27+
</package>
28+
</tool_dependency>
29+
30+
<!--fisher_exact-->
31+

0 commit comments

Comments
 (0)