File Coverage

lib/App/Sandy/Read/SingleEnd.pm
Criterion Covered Total %
statement 10 11 90.9
branch 3 4 75.0
condition n/a
subroutine 2 2 100.0
pod 0 1 0.0
total 15 18 83.3


line stmt bran cond sub pod time code
1             package App::Sandy::Read::SingleEnd;
2             # ABSTRACT: App::Sandy::Read subclass for simulate single-end reads.
3              
4 6     6   47 use App::Sandy::Base 'class';
  6         12  
  6         41  
5              
6             extends 'App::Sandy::Read';
7              
8             our $VERSION = '0.22'; # VERSION
9              
10             sub gen_read {
11 1250     1250 0 12546 my ($self, $ptable, $ptable_size, $read_size, $is_leader) = @_;
12              
13 1250 50       2849 if ($ptable_size < $read_size) {
14 0         0 croak sprintf "ptable_size (%d) must be greater or equal to read_size (%d)"
15             => $ptable_size, $read_size;
16             }
17              
18 1250         4027 my ($read_ref, $attr) = $self->subseq_rand_ptable($ptable,
19             $ptable_size, $read_size, $read_size);
20              
21 1250 100       3250 unless ($is_leader) {
22 648         2251 $self->reverse_complement($read_ref);
23             }
24              
25 1250         3516 $attr->{error} = $self->insert_sequencing_error($read_ref, $read_size);
26              
27 1250         5488 return ($read_ref, $attr);
28             }
29              
30             __END__
31              
32             =pod
33              
34             =encoding UTF-8
35              
36             =head1 NAME
37              
38             App::Sandy::Read::SingleEnd - App::Sandy::Read subclass for simulate single-end reads.
39              
40             =head1 VERSION
41              
42             version 0.22
43              
44             =head1 AUTHORS
45              
46             =over 4
47              
48             =item *
49              
50             Thiago L. A. Miller <tmiller@mochsl.org.br>
51              
52             =item *
53              
54             J. Leonel Buzzo <lbuzzo@mochsl.org.br>
55              
56             =item *
57              
58             Felipe R. C. dos Santos <fsantos@mochsl.org.br>
59              
60             =item *
61              
62             Helena B. Conceição <hconceicao@mochsl.org.br>
63              
64             =item *
65              
66             Gabriela Guardia <gguardia@mochsl.org.br>
67              
68             =item *
69              
70             Fernanda Orpinelli <forpinelli@mochsl.org.br>
71              
72             =item *
73              
74             Pedro A. F. Galante <pgalante@mochsl.org.br>
75              
76             =back
77              
78             =head1 COPYRIGHT AND LICENSE
79              
80             This software is Copyright (c) 2018 by Teaching and Research Institute from Sírio-Libanês Hospital.
81              
82             This is free software, licensed under:
83              
84             The GNU General Public License, Version 3, June 2007
85              
86             =cut