line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Sandy::Seq::SingleEnd; |
2
|
|
|
|
|
|
|
# ABSTRACT: App::Sandy::Seq subclass for simulate single-end entries. |
3
|
|
|
|
|
|
|
|
4
|
6
|
|
|
6
|
|
2758
|
use App::Sandy::Base 'class'; |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
39
|
|
5
|
6
|
|
|
6
|
|
3205
|
use App::Sandy::Read::SingleEnd; |
|
6
|
|
|
|
|
1958
|
|
|
6
|
|
|
|
|
2812
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
extends 'App::Sandy::Seq'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.24'; # VERSION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has '_read' => ( |
12
|
|
|
|
|
|
|
is => 'ro', |
13
|
|
|
|
|
|
|
isa => 'App::Sandy::Read::SingleEnd', |
14
|
|
|
|
|
|
|
builder => '_build_read', |
15
|
|
|
|
|
|
|
lazy_build => 1, |
16
|
|
|
|
|
|
|
handles => ['gen_read'] |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub BUILD { |
20
|
25
|
|
|
25
|
0
|
55
|
my $self = shift; |
21
|
|
|
|
|
|
|
## Just to ensure that the lazy attributes are built before &new returns |
22
|
25
|
|
|
|
|
695
|
$self->_read; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _build_read { |
26
|
25
|
|
|
25
|
|
55
|
my $self = shift; |
27
|
25
|
|
|
|
|
680
|
App::Sandy::Read::SingleEnd->new( |
28
|
|
|
|
|
|
|
sequencing_error => $self->sequencing_error |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub sprint_seq { |
33
|
4570
|
|
|
4570
|
0
|
53833
|
my ($self, $id, $num, $seq_id, $seq_id_type, $ptable, $ptable_size, $is_leader, $rng, $blacklist) = @_; |
34
|
|
|
|
|
|
|
|
35
|
4570
|
|
|
|
|
159598
|
my $read_size = $self->_get_read_size($rng); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# In order to work third gen sequencing |
38
|
|
|
|
|
|
|
# simulator, it is necessary to truncate |
39
|
|
|
|
|
|
|
# the read according to the ptable size |
40
|
4570
|
50
|
|
|
|
10650
|
if ($read_size > $ptable_size) { |
41
|
0
|
|
|
|
|
0
|
$read_size = $ptable_size; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
4570
|
|
|
|
|
16691
|
my ($read_ref, $attr) = $self->gen_read($ptable, $ptable_size, $read_size, $is_leader, $rng, $blacklist); |
45
|
|
|
|
|
|
|
|
46
|
4570
|
|
|
|
|
8164
|
my $error_a = $attr->{error}; |
47
|
4570
|
50
|
|
|
|
13522
|
my $error = @$error_a |
48
|
|
|
|
|
|
|
? join ',' => @$error_a |
49
|
|
|
|
|
|
|
: 'none'; |
50
|
|
|
|
|
|
|
|
51
|
4570
|
|
|
|
|
7670
|
my $annot_a = $attr->{annot}; |
52
|
4570
|
50
|
|
|
|
8748
|
my $var = @$annot_a |
53
|
|
|
|
|
|
|
? join ',' => @$annot_a |
54
|
|
|
|
|
|
|
: 'none'; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
$self->_set_info( |
57
|
|
|
|
|
|
|
'id' => $id, |
58
|
|
|
|
|
|
|
'num' => $num, |
59
|
|
|
|
|
|
|
'seq_id' => $seq_id, |
60
|
|
|
|
|
|
|
'read' => 1, |
61
|
|
|
|
|
|
|
'error' => $error, |
62
|
|
|
|
|
|
|
'var' => $var, |
63
|
|
|
|
|
|
|
'seq_id_type' => $seq_id_type, |
64
|
|
|
|
|
|
|
'read_size' => $read_size, |
65
|
|
|
|
|
|
|
$is_leader |
66
|
|
|
|
|
|
|
? ( |
67
|
|
|
|
|
|
|
'start' => $attr->{start}, |
68
|
|
|
|
|
|
|
'end' => $attr->{end}, |
69
|
|
|
|
|
|
|
'start_ref' => $attr->{start_ref}, |
70
|
|
|
|
|
|
|
'end_ref' => $attr->{end_ref}, |
71
|
|
|
|
|
|
|
'strand' => 'P') |
72
|
|
|
|
|
|
|
: ( |
73
|
|
|
|
|
|
|
'start' => $attr->{end}, |
74
|
|
|
|
|
|
|
'end' => $attr->{start}, |
75
|
|
|
|
|
|
|
'start_ref' => $attr->{end_ref}, |
76
|
|
|
|
|
|
|
'end_ref' => $attr->{start_ref}, |
77
|
4570
|
100
|
|
|
|
164108
|
'strand' => 'M') |
78
|
|
|
|
|
|
|
); |
79
|
|
|
|
|
|
|
|
80
|
4570
|
|
|
|
|
128337
|
my $seqid = $self->_gen_id($self->_info); |
81
|
4570
|
|
|
|
|
16007
|
my $quality_ref = $self->gen_quality($read_size, $rng); |
82
|
|
|
|
|
|
|
|
83
|
4570
|
|
|
|
|
160783
|
return $self->_gen_seq(\$seqid, $read_ref, $quality_ref, 0, $read_size); |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
__END__ |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=pod |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=encoding UTF-8 |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 NAME |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
App::Sandy::Seq::SingleEnd - App::Sandy::Seq subclass for simulate single-end entries. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 VERSION |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
version 0.24 |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 AUTHORS |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=over 4 |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item * |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Thiago L. A. Miller <tmiller@mochsl.org.br> |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item * |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
J. Leonel Buzzo <lbuzzo@mochsl.org.br> |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=item * |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Felipe R. C. dos Santos <fsantos@mochsl.org.br> |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=item * |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Helena B. Conceição <hconceicao@mochsl.org.br> |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=item * |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Rodrigo Barreiro <rbarreiro@mochsl.org.br> |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=item * |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Gabriela Guardia <gguardia@mochsl.org.br> |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=item * |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Fernanda Orpinelli <forpinelli@mochsl.org.br> |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=item * |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
Rafael Mercuri <rmercuri@mochsl.org.br> |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=item * |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Rodrigo Barreiro <rbarreiro@mochsl.org.br> |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=item * |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
Pedro A. F. Galante <pgalante@mochsl.org.br> |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=back |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
This software is Copyright (c) 2023 by Teaching and Research Institute from Sírio-Libanês Hospital. |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
This is free software, licensed under: |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
The GNU General Public License, Version 3, June 2007 |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=cut |