Mercurial > repos > yutaka-saito > commet
comparison ComMet_wrapper.pl @ 0:dfdfbdd47b32 default tip
migrate from GitHub
author | yutaka-saito |
---|---|
date | Sun, 19 Apr 2015 20:55:17 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:dfdfbdd47b32 |
---|---|
1 #!/usr/bin/perl | |
2 | |
3 use strict; | |
4 use warnings; | |
5 | |
6 use FindBin; | |
7 | |
8 print STDOUT "The tool script is called with:\n", join(" ", ($0, @ARGV)), "\n\n"; | |
9 | |
10 my ($in, $outdmc, $outdmr) = ("", "", ""); | |
11 my $default_option = ""; | |
12 #my $default_option = "--nobeta --nodual"; | |
13 | |
14 my $tooldir = shift(@ARGV); | |
15 $tooldir = $FindBin::Bin; | |
16 my $intype_mapper = shift(@ARGV); | |
17 | |
18 if ($intype_mapper eq "bsf-call") { | |
19 my $in1 = shift(@ARGV); | |
20 my $in2 = shift(@ARGV); | |
21 my $tmp = "ComMet.tmp.$$"; | |
22 ($outdmc, $outdmr) = @ARGV; | |
23 &invoke_command("$tooldir/bin/Bsf2ComMetIn.pl $in1 $in2 > $tmp"); | |
24 &invoke_command("$tooldir/bin/ComMet $default_option $tmp $outdmc $outdmr"); | |
25 } | |
26 elsif ($intype_mapper eq "commet") { | |
27 ($in, $outdmc, $outdmr) = @ARGV; | |
28 &invoke_command("$tooldir/bin/ComMet $default_option $in $outdmc $outdmr"); | |
29 } | |
30 else { | |
31 die "never reach here\n"; | |
32 } | |
33 | |
34 sub invoke_command { | |
35 my ($command) = @_; | |
36 print "invoking: $command\n"; | |
37 system($command); | |
38 } | |
39 | |
40 =pod | |
41 <!-- | |
42 <conditional name="advancedset"> | |
43 <param name="advancedset_use" type="select" label="use advanced setting"> | |
44 <option value="No" selected="true">No</option> | |
45 <option value="Yes">Yes</option> | |
46 </param> | |
47 <when value="No"> | |
48 </when> | |
49 <when value="Yes"> | |
50 <param name="beta" type="boolean" falsevalue="--nobeta" label="use beta mixture distributions"/> | |
51 <param name="dual" type="boolean" falsevalue="--nodual" label="use dual HMM architectures"/> | |
52 <param name="cpg" type="boolean" falsevalue="--noncpg" label="input files contain cytosine sites only in CpG context"/> | |
53 </when> | |
54 </conditional> | |
55 --> | |
56 =cut |