line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package BioX::Map::CLIS::Cmd::MapCompare; |
2
|
1
|
|
|
1
|
|
2072
|
use Modern::Perl; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
3
|
1
|
|
|
1
|
|
84
|
use IO::All; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
4
|
1
|
|
|
1
|
|
37
|
use Carp "confess"; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
5
|
1
|
|
|
1
|
|
3
|
use Moo; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
3
|
|
6
|
1
|
|
|
1
|
|
192
|
use MooX::Options prefer_commandline => 1, with_config_from_file => 1; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
7
|
1
|
|
|
1
|
|
1997
|
use MooX::Cmd; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
8
|
1
|
|
|
1
|
|
1187
|
use BioX::Map; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
9
|
1
|
|
|
1
|
|
20
|
use Types::Standard qw(Int Str Bool Enum); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '0.0.6'; # VERSION: |
12
|
|
|
|
|
|
|
# ABSTRACT: a wrapper for mapping software |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
around _build_config_identifier => sub { 'berry' }; |
16
|
|
|
|
|
|
|
around _build_config_prefix => sub { 'biox_map' }; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
option indir => ( |
21
|
|
|
|
|
|
|
is => 'ro', |
22
|
|
|
|
|
|
|
format => 's', |
23
|
|
|
|
|
|
|
short => 'i', |
24
|
|
|
|
|
|
|
default => '', |
25
|
|
|
|
|
|
|
doc => "path of one fastq file", |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
option outdir => ( |
30
|
|
|
|
|
|
|
is => 'ro', |
31
|
|
|
|
|
|
|
format => 's', |
32
|
|
|
|
|
|
|
short => 'o', |
33
|
|
|
|
|
|
|
doc => "path of one fastq file", |
34
|
|
|
|
|
|
|
default => './', |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
option summary_file => ( |
39
|
|
|
|
|
|
|
is => 'ro', |
40
|
|
|
|
|
|
|
format => 's', |
41
|
|
|
|
|
|
|
short => 's', |
42
|
|
|
|
|
|
|
doc => 'path of output file', |
43
|
|
|
|
|
|
|
default => "summary.txt", |
44
|
|
|
|
|
|
|
); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
option process_tool => ( |
48
|
|
|
|
|
|
|
is => 'ro', |
49
|
|
|
|
|
|
|
format => 'i', |
50
|
|
|
|
|
|
|
short => 'p', |
51
|
|
|
|
|
|
|
doc => "path of outfile", |
52
|
|
|
|
|
|
|
default => 1, |
53
|
|
|
|
|
|
|
); |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
option process_sample => ( |
57
|
|
|
|
|
|
|
is => 'ro', |
58
|
|
|
|
|
|
|
format => 'i', |
59
|
|
|
|
|
|
|
short => 'P', |
60
|
|
|
|
|
|
|
doc => "path of outfile", |
61
|
|
|
|
|
|
|
default => 1, |
62
|
|
|
|
|
|
|
); |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
option genome => ( |
66
|
|
|
|
|
|
|
is => 'ro', |
67
|
|
|
|
|
|
|
format => 's', |
68
|
|
|
|
|
|
|
short => 'g', |
69
|
|
|
|
|
|
|
doc => "path of genome file", |
70
|
|
|
|
|
|
|
required => 1, |
71
|
|
|
|
|
|
|
); |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
option tool => ( |
75
|
|
|
|
|
|
|
is => 'ro', |
76
|
|
|
|
|
|
|
isa => Enum['soap', 'bwa'], |
77
|
|
|
|
|
|
|
format => 's', |
78
|
|
|
|
|
|
|
short => 't', |
79
|
|
|
|
|
|
|
required => 1, |
80
|
|
|
|
|
|
|
default => 'soap', |
81
|
|
|
|
|
|
|
doc => "mapping software", |
82
|
|
|
|
|
|
|
); |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub execute { |
86
|
0
|
|
|
0
|
1
|
|
my ($self, $args_ref, $chain_ref) = @_; |
87
|
0
|
|
|
|
|
|
my $pre_message = "please input parameters, indir is required"; |
88
|
0
|
|
|
|
|
|
my ($indir, $outdir) = ($self->indir, $self->outdir); |
89
|
0
|
0
|
|
|
|
|
$self->options_usage(1, $pre_message) unless ( $indir); |
90
|
0
|
|
|
|
|
|
my ($genome, $tool, $process_tool, $process_sample) = ($self->genome, $self->tool, $self->process_tool, $self->process_sample); |
91
|
0
|
|
|
|
|
|
my $bm = BioX::Map->new( |
92
|
|
|
|
|
|
|
indir => $indir, |
93
|
|
|
|
|
|
|
outdir => $outdir, |
94
|
|
|
|
|
|
|
genome => $genome, |
95
|
|
|
|
|
|
|
tool => $tool, |
96
|
|
|
|
|
|
|
process_tool => $process_tool, |
97
|
|
|
|
|
|
|
process_sample => $process_sample, |
98
|
|
|
|
|
|
|
); |
99
|
0
|
|
|
|
|
|
$bm->map; |
100
|
0
|
|
|
|
|
|
$bm->tool('bwa'); |
101
|
0
|
|
|
|
|
|
$bm->map; |
102
|
0
|
|
|
|
|
|
my $summary = $self->summary_file; |
103
|
0
|
|
|
|
|
|
system("biox-map compare -i $outdir -o $summary -s soap -b bwa"); |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
1; |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
__END__ |