line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package BioX::Map::CLIS::Cmd::Map; |
2
|
1
|
|
|
1
|
|
2249
|
use Modern::Perl; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
3
|
1
|
|
|
1
|
|
103
|
use IO::All; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
4
|
1
|
|
|
1
|
|
42
|
use Carp "confess"; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
33
|
|
5
|
1
|
|
|
1
|
|
3
|
use Moo; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
6
|
1
|
|
|
1
|
|
219
|
use MooX::Options prefer_commandline => 1, with_config_from_file => 1; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
5
|
|
7
|
1
|
|
|
1
|
|
2083
|
use MooX::Cmd; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
9
|
|
8
|
1
|
|
|
1
|
|
1112
|
use BioX::Map; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
9
|
1
|
|
|
1
|
|
19
|
use Types::Standard qw(Int Str Bool Enum); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
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
|
|
|
|
|
|
|
option infile => ( |
20
|
|
|
|
|
|
|
is => 'ro', |
21
|
|
|
|
|
|
|
format => 's', |
22
|
|
|
|
|
|
|
short => 'i', |
23
|
|
|
|
|
|
|
doc => "path of one fastq file", |
24
|
|
|
|
|
|
|
default => '', |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
option outfile => ( |
29
|
|
|
|
|
|
|
is => 'ro', |
30
|
|
|
|
|
|
|
format => 's', |
31
|
|
|
|
|
|
|
short => 'o', |
32
|
|
|
|
|
|
|
doc => "path of outfile", |
33
|
|
|
|
|
|
|
default => '', |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
option indir => ( |
38
|
|
|
|
|
|
|
is => 'ro', |
39
|
|
|
|
|
|
|
format => 's', |
40
|
|
|
|
|
|
|
short => 'I', |
41
|
|
|
|
|
|
|
default => '', |
42
|
|
|
|
|
|
|
doc => "path of one fastq file", |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
option outdir => ( |
47
|
|
|
|
|
|
|
is => 'ro', |
48
|
|
|
|
|
|
|
format => 's', |
49
|
|
|
|
|
|
|
short => 'O', |
50
|
|
|
|
|
|
|
doc => "path of one fastq file", |
51
|
|
|
|
|
|
|
default => './', |
52
|
|
|
|
|
|
|
); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
option process_tool => ( |
56
|
|
|
|
|
|
|
is => 'ro', |
57
|
|
|
|
|
|
|
format => 'i', |
58
|
|
|
|
|
|
|
short => 'p', |
59
|
|
|
|
|
|
|
doc => "path of outfile", |
60
|
|
|
|
|
|
|
default => 1, |
61
|
|
|
|
|
|
|
); |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
option process_sample => ( |
65
|
|
|
|
|
|
|
is => 'ro', |
66
|
|
|
|
|
|
|
format => 'i', |
67
|
|
|
|
|
|
|
short => 'P', |
68
|
|
|
|
|
|
|
doc => "path of outfile", |
69
|
|
|
|
|
|
|
default => 1, |
70
|
|
|
|
|
|
|
); |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
option genome => ( |
74
|
|
|
|
|
|
|
is => 'ro', |
75
|
|
|
|
|
|
|
format => 's', |
76
|
|
|
|
|
|
|
short => 'g', |
77
|
|
|
|
|
|
|
required => 1, |
78
|
|
|
|
|
|
|
doc => "path of genome file", |
79
|
|
|
|
|
|
|
); |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
option tool => ( |
83
|
|
|
|
|
|
|
is => 'ro', |
84
|
|
|
|
|
|
|
isa => Enum['soap', 'bwa'], |
85
|
|
|
|
|
|
|
format => 's', |
86
|
|
|
|
|
|
|
short => 't', |
87
|
|
|
|
|
|
|
required => 1, |
88
|
|
|
|
|
|
|
default => 'soap', |
89
|
|
|
|
|
|
|
doc => "mapping software", |
90
|
|
|
|
|
|
|
); |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub execute { |
94
|
0
|
|
|
0
|
1
|
|
my ($self, $args_ref, $chain_ref) = @_; |
95
|
0
|
|
|
|
|
|
my $pre_message = "please input parameters, genome is required, either infile or indir is required"; |
96
|
0
|
|
|
|
|
|
my ($infile, $indir, $outfile, $outdir) = ($self->infile, $self->indir, $self->outfile, $self->outdir); |
97
|
0
|
0
|
0
|
|
|
|
$self->options_usage(1, $pre_message) unless ($infile or $indir); |
98
|
0
|
|
|
|
|
|
my ($genome, $tool, $process_tool, $process_sample) = ($self->genome, $self->tool, $self->process_tool, $self->process_sample); |
99
|
0
|
|
|
|
|
|
my $bm = BioX::Map->new( |
100
|
|
|
|
|
|
|
infile => $infile, |
101
|
|
|
|
|
|
|
indir => $indir, |
102
|
|
|
|
|
|
|
outfile => $outfile, |
103
|
|
|
|
|
|
|
outdir => $outdir, |
104
|
|
|
|
|
|
|
genome => $genome, |
105
|
|
|
|
|
|
|
tool => $tool, |
106
|
|
|
|
|
|
|
process_tool => $process_tool, |
107
|
|
|
|
|
|
|
process_sample => $process_sample, |
108
|
|
|
|
|
|
|
); |
109
|
0
|
|
|
|
|
|
$bm->map; |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
1; |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
__END__ |