Bio/Factory/FTLocationFactory.pm

filter: Statementstmt 99.1% 121 / 122 Branchbran 95.5% 65 / 68 Conditioncond 91.0% 51 / 56 MC/DCmcdc 72.4% 21 / 29 Subroutinesub 100% 9 / 9 Podpod 100% 1 / 1 totaltotal 94.0% 268 / 285 CC 58 SCAR 34.5
CC
58
Cov
96%
from_string
42.2
_parse_location
17.0
BEGIN
1.0
CRAP 31.4
« Bio/Matrix/PSM/SiteMatrix.pm ↑ Summary Bio/SearchIO/SearchResultEventBuilder.pm »
1 #
2 # BioPerl module for Bio::Factory::FTLocationFactory
3 #
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
5 #
6 # Cared for by Hilmar Lapp <hlapp at gmx.net>
7 #
8 # Copyright Hilmar Lapp
9 #
10 # You may distribute this module under the same terms as perl itself
11 #
12 # (c) Hilmar Lapp, hlapp at gnf.org, 2002.
13 # (c) GNF, Genomics Institute of the Novartis Research Foundation, 2002.
14 #
15 # You may distribute this module under the same terms as perl itself.
16 # Refer to the Perl Artistic License (see the license accompanying this
17 # software package, or see http://www.perl.com/language/misc/Artistic.html)
18 # for the terms under which you may use, modify, and redistribute this module.
19 #
20 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
21 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
22 # MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
23 #
24  
25 # POD documentation - main docs before the code
26  
27 =head1 NAME
28  
29 Bio::Factory::FTLocationFactory - A FeatureTable Location Parser
30  
31 =head1 SYNOPSIS
32  
33 # parse a string into a location object
34 $loc = Bio::Factory::FTLocationFactory->from_string("join(100..200,
35 400..500");
36  
37 =head1 DESCRIPTION
38  
39 Implementation of string-encoded location parsing for the Genbank feature
40 table encoding of locations.
41  
42 =head1 FEEDBACK
43  
44 =head2 Mailing Lists
45  
46 User feedback is an integral part of the evolution of this and other
47 Bioperl modules. Send your comments and suggestions preferably to
48 the Bioperl mailing list. Your participation is much appreciated.
49  
50 bioperl-l@bioperl.org - General discussion
51 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
52  
53 =head2 Support
54  
55 Please direct usage questions or support issues to the mailing list:
56  
57 I<bioperl-l@bioperl.org>
58  
59 rather than to the module maintainer directly. Many experienced and
60 reponsive experts will be able look at the problem and quickly
61 address it. Please include a thorough description of the problem
62 with code and data examples if at all possible.
63  
64 =head2 Reporting Bugs
65  
66 Report bugs to the Bioperl bug tracking system to help us keep track
67 of the bugs and their resolution. Bug reports can be submitted via the
68 web:
69  
70 https://github.com/bioperl/bioperl-live/issues
71  
72 =head1 AUTHOR - Hilmar Lapp
73  
74 Email hlapp at gmx.net
75  
76 =head1 CONTRIBUTORS
77  
78 Jason Stajich, jason-at-bioperl-dot-org
79 Chris Fields, cjfields-at-uiuc-dot-edu
80  
81 =head1 APPENDIX
82  
83 The rest of the documentation details each of the object methods.
84 Internal methods are usually preceded with a _
85  
86 =cut
87  
88  
89 # Let the code begin...
90  
91 package Bio::Factory::FTLocationFactory;
92 106 $Bio::Factory::FTLocationFactory::VERSION = '1.7.8';
93 106 ▶use vars qw($LOCREG);
Subroutine BEGIN: called CC=1 SCAR=0.0
94 106 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
95  
96 # Object preamble - inherits from Bio::Root::Root
97  
98 106 ▶use Bio::Location::Simple;
Subroutine BEGIN: called CC=1 SCAR=0.0
99 106 ▶use Bio::Location::Split;
Subroutine BEGIN: called CC=1 SCAR=0.0
100 106 ▶use Bio::Location::Fuzzy;
Subroutine BEGIN: called CC=1 SCAR=0.0
101  
102  
103 106 ▶use base qw(Bio::Root::Root Bio::Factory::LocationFactoryI);
Subroutine BEGIN: called CC=1 SCAR=0.0
104  
105 106 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
106 # the below is an optimized regex obj. from J. Freidl's Mastering Reg Exp.
107 $LOCREG = qr{
108 (?>
109 [^()]+
110 |
111 \(
112 (??{$LOCREG})
113 \)
114 )*
115 106 }x;
116 }
117  
118 =head2 new
119  
120 Title : new
121 Usage : my $obj = Bio::Factory::FTLocationFactory->new();
122 Function: Builds a new Bio::Factory::FTLocationFactory object
123 Returns : an instance of Bio::Factory::FTLocationFactory
124 Args :
125  
126 =cut
127  
128 =head2 from_string
129  
130 Title : from_string
131 Usage : $loc = $locfactory->from_string("100..200");
132 Function: Parses the given string and returns a Bio::LocationI implementing
133 object representing the location encoded by the string.
134  
135 This implementation parses the Genbank feature table
136 encoding of locations.
137 Example :
138 Returns : A Bio::LocationI implementing object.
139 Args : A string.
140  
141 =cut
142  
143 13496 ▶sub from_string {
Subroutine from_string: called CC=42 SCAR=37.4
Pod documented
144 13496 my ($self,$locstr,$op) = @_;
145 13496 my $loc;
146
147 #$self->debug("$locstr\n");
148
149 # $op for operator (error handling)
150
151 # run on first pass only
152 # Note : These location types are now deprecated in GenBank (Oct. 2006)
153 13496 ▶ if (!defined($op)) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $op) 9737 3759 13496
154 # convert all (X.Y) to [X.Y]
155 9737 $locstr =~ s{\((\d+\.\d+)\)}{\[$1\]}g;
156 # convert ABC123:(X..Y) to ABC123:[X..Y]
157 # we should never see the above
158 9737 $locstr =~ s{:\((\d+\.{2}\d+)\)}{:\[$1\]}g;
159 }
160
161 13496 ▶ if ($locstr =~ m{(.*?)\(($LOCREG)\)(.*)}o) { # any matching parentheses?
Branch: 1 branch
BranchTrueFalseTotal
if ($locstr =~ /(.*?)\(($Bio::Factory::FTLocationFactory::LOCREG)\)(.*)/o) { } 7336 6160 13496
162 7336 my ($beg, $mid, $end) = ($1, $2, $3);
163 7336 my (@sublocs) = (split(q(,),$beg), $mid, split(q(,),$end));
164
165 7336 my @loc_objs;
166 my $loc_obj;
167
168 SUBLOCS:
169 7336 ▶ while (@sublocs) {
Branch: 1 branch
BranchTrueFalseTotal
if (@sublocs) 7347 7336 14683
170 7347 my $subloc = shift @sublocs;
171 7347 ▶ next if !$subloc;
Branch: 1 branch
BranchTrueFalseTotal
unless $subloc 1 7346 7347
172 7346 ▶ my $oparg = ($subloc eq 'join' || $subloc eq 'bond' ||
Branch: 1 branch
BranchTrueFalseTotal
$subloc eq 'join' || $subloc eq 'bond' || $subloc eq 'order' || $subloc eq 'complement' ? : 7335 11 7346
Condition88%8/9
$subloc eq "join" or $subloc eq "bond" or $subloc eq "order" or $subloc eq "complement"
l!l&&r!l&&!r
3594374111
$subloc eq "join" or $subloc eq "bond" or $subloc eq "order"
l!l&&r!l&&!r
3559353752
$subloc eq "join" or $subloc eq "bond"
l!l&&r!l&&!r
355903787
MC/DC75%3/4
$subloc eq "join" or $subloc eq "bond" or $subloc eq "order" or $subloc eq "complement"
$subloc eq "join" $subloc eq "bond" $subloc eq "order" $subloc eq "complement"
Truth table80%4/5
A or B or C or D
A= $subloc eq "join"B= $subloc eq "bond"C= $subloc eq "order"D= $subloc eq "complement"
ABCDresult
1XXX1
01XX1
001X1
00011
00000
173 $subloc eq 'order' || $subloc eq 'complement') ? $subloc : undef;
174 # has operator, requires further work (recurse)
175 7346 ▶ if ($oparg) {
Branch: 1 branch
BranchTrueFalseTotal
if ($oparg) { } 7335 11 7346
176 7335 my $sub = shift @sublocs;
177 # simple split operators (no recursive calls needed)
178 7335 ▶ if (($oparg eq 'join' || $oparg eq 'order' || $oparg eq 'bond' )
Branch: 1 branch
BranchTrueFalseTotal
if ($oparg eq 'join' || $oparg eq 'order' || $oparg eq 'bond' and not $sub =~ /(?:join|order|bond)/) { } 3587 3748 7335
Condition88%8/9
$oparg eq "join" || $oparg eq "order" || $oparg eq "bond" and not $sub =~ /(?:join|order|bond)/
!ll&&!rl&&r
374173587
$oparg eq "join" or $oparg eq "order" or $oparg eq "bond"
l!l&&r!l&&!r
359403741
$oparg eq "join" or $oparg eq "order"
l!l&&r!l&&!r
3559353741
MC/DC75%3/4
$oparg eq "join" || $oparg eq "order" || $oparg eq "bond" and not $sub =~ /(?:join|order|bond)/
$oparg eq "join" $oparg eq "order" $oparg eq "bond" not $sub =~ /(?:join|order|bond)/
Truth table71%5/7
A or B or C and not(D)
A= $oparg eq "join"B= $oparg eq "order"C= $oparg eq "bond"D= not $sub =~ /(?:join|order|bond)/
ABCDresult
000X0
1XX00
01X00
00100
1XX11
01X11
00111
179 && $sub !~ m{(?:join|order|bond)}) {
180 3587 my @splitlocs = split(q(,), $sub);
181 3587 $loc_obj = Bio::Location::Split->new(-verbose => 1,
182 -splittype => $oparg);
183 # Store strand values for later consistency check
184 3587 my @subloc_strands;
185 my @s_objs;
186 3587 foreach my $splitloc (@splitlocs) {
187 35331 ▶ next unless $splitloc;
Branch: 1 branch
BranchTrueFalseTotal
unless $splitloc 0 35331 35331
188 35331 my $sobj;
189 35331 ▶ if ($splitloc =~ m{\(($LOCREG)\)}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($splitloc =~ /\(($Bio::Factory::FTLocationFactory::LOCREG)\)/) { } 43 35288 35331
190 43 my $comploc = $1;
191 43 $sobj = $self->_parse_location($comploc);
192 43 $sobj->strand(-1);
193 43 push @subloc_strands, -1;
194 } else {
195 35288 $sobj = $self->_parse_location($splitloc);
196 35288 push @subloc_strands, 1;
197 }
198 35331 push @s_objs, $sobj;
199 }
200  
201 # Sublocations strand values consistency check to set
202 # Guide Strand and sublocations adding order
203 3587 ▶ if (scalar @s_objs > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @s_objs > 0) 3587 0 3587
204 3587 my $identical = 0;
205  
206 3587 my $first_value = $subloc_strands[0];
207 3587 foreach my $strand (@subloc_strands) {
208 35331 ▶ $identical++ if ($strand == $first_value);
Branch: 1 branch
BranchTrueFalseTotal
if $strand == $first_value 35329 2 35331
209 }
210  
211 3587 ▶ if ($identical == scalar @subloc_strands) {
Branch: 1 branch
BranchTrueFalseTotal
if ($identical == scalar @subloc_strands) { } 3585 2 3587
212 # Set guide_strand if all sublocations have the same strand
213 3585 $loc_obj->guide_strand($first_value);
214  
215 # Reverse sublocation order for negative strand locations, e.g.:
216 # Common (CAA24672.1):
217 # join(complement(4918..5163),complement(2691..4571))
218 # Trans-splicing (NP_958375.1):
219 # join(32737..32825,complement(174205..174384),complement(69520..71506))
220 3585 ▶ if ($first_value == -1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($first_value == -1) 15 3570 3585
221 15 @s_objs = reverse @s_objs;
222 }
223 }
224 else {
225 # Mixed strand values
226 2 $loc_obj->guide_strand(undef);
227 }
228  
229 # Add sublocations
230 3587 foreach my $s_obj (@s_objs) {
231 35331 $loc_obj->add_sub_Location($s_obj);
232 }
233 }
234 } else {
235 3748 $loc_obj = $self->from_string($sub, $oparg);
236 # reinsure the operator is set correctly for this level
237 # unless it is complement
238 3748 ▶ $loc_obj->splittype($oparg) unless $oparg eq 'complement';
Branch: 1 branch
BranchTrueFalseTotal
unless $oparg eq "complement" 7 3741 3748
239 }
240 }
241 # no operator, simple or fuzzy
242 else {
243 11 $loc_obj = $self->from_string($subloc,1);
244 }
245 7346 ▶ if ($op && $op eq 'complement') {
Branch: 1 branch
BranchTrueFalseTotal
if ($op and $op eq "complement") 1652 5694 7346
Condition100%3/3
$op and $op eq "complement"
!ll&&!rl&&r
5677171652
MC/DC100%2/2
$op and $op eq "complement"
$op $op eq "complement"
Truth table100%3/3
A and B
A= $opB= $op eq "complement"
ABresult
0X0
100
111
246 1652 $loc_obj->strand(-1);
247 }
248  
249 # For Split-type $loc_obj, if guide strand is set (meaning consistent strand for
250 # all sublocs) and guide strand is the same than the last location from @loc_objs,
251 # then recover the sublocations and add them to @loc_objs. This way,
252 # "join(10..20,join(30..40,50..60))" becomes "join(10..20,30..40,50..60)"
253 7346 ▶ my $guide_strand = ($loc_obj->isa('Bio::Location::SplitLocationI')) ? ($loc_obj->guide_strand || 0) : 0;
Branch: 1 branch
BranchTrueFalseTotal
$loc_obj->isa('Bio::Location::SplitLocationI') ? : 5246 2100 7346
Condition100%2/2
$loc_obj->guide_strand or 0
l!l
52379
MC/DC100%1/1
$loc_obj->guide_strand or 0
$loc_obj->guide_strand
Truth table100%2/2
A
A= $loc_obj->guide_strand
Aresult
11
00
254 7346 ▶ my $last_strand = (scalar @loc_objs > 0) ? $loc_objs[-1]->strand : 0;
Branch: 1 branch
BranchTrueFalseTotal
scalar @loc_objs > 0 ? : 10 7336 7346
255 7346 ▶ if ( $guide_strand != 0
Branch: 1 branch
BranchTrueFalseTotal
if ($guide_strand != 0 and $guide_strand == $last_strand and $oparg eq $op) { } 2 7344 7346
Condition100%6/6
$guide_strand != 0 and $guide_strand == $last_strand and $oparg eq $op
!ll&&!rl&&r
734312
$guide_strand != 0 and $guide_strand == $last_strand
!ll&&!rl&&r
210952343
MC/DC100%3/3
$guide_strand != 0 and $guide_strand == $last_strand and $oparg eq $op
$guide_strand != 0 $guide_strand == $last_strand $oparg eq $op
Truth table100%4/4
A and B and C
A= $guide_strand != 0B= $guide_strand == $last_strandC= $oparg eq $op
ABCresult
0XX0
10X0
1100
1111
256 and $guide_strand == $last_strand
257 and $oparg eq $op # join(,join()) OK, order(join()) NOT OK
258 ) {
259 2 my @subloc_objs = $loc_obj->sub_Location(0);
260 2 foreach my $subloc_obj (@subloc_objs) {
261 5 push @loc_objs, $subloc_obj;
262 }
263 }
264 else {
265 7344 push @loc_objs, $loc_obj;
266 }
267 }
268 7336 my $ct = @loc_objs;
269 7336 ▶ if ($op && !($op eq 'join' || $op eq 'order' || $op eq 'bond')
Branch: 1 branch
BranchTrueFalseTotal
if ($op and not $op eq "join" || $op eq "order" || $op eq "bond" and $ct > 1) 0 7336 7336
Condition83%10/12
$op and not $op eq "join" || $op eq "order" || $op eq "bond" and $ct > 1
!ll&&!rl&&r
568416520
$op and not $op eq "join" || $op eq "order" || $op eq "bond"
!ll&&!rl&&r
567771652
$op eq 'join' || $op eq 'order' || $op eq 'bond'
l!l&&r!l&&!r
701652
$op eq "join" or $op eq "order"
l!l&&r!l&&!r
611652
MC/DC0%0/5
$op and not $op eq "join" || $op eq "order" || $op eq "bond" and $ct > 1
$op $op eq "join" $op eq "order" $op eq 'bond' $ct > 1
Truth table66%4/6
A and not(B or C || D) and E
A= $opB= $op eq "join"C= $op eq "order"D= $op eq 'bond'E= $ct > 1
ABCDEresult
0XXXX0
11XXX0
101XX0
1001X0
100000
100011
270 && $ct > 1 ) {
271 0 $self->throw("Bad operator $op: had multiple locations ".
272 scalar(@loc_objs).", should be SplitLocationI");
273 }
274 7336 ▶ if ($ct > 1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ct > 1) { } 7 7329 7336
275 7 $loc = Bio::Location::Split->new();
276 7 ▶ $loc->add_sub_Location(shift @loc_objs) while (@loc_objs);
Branch: 1 branch
BranchTrueFalseTotal
@loc_objs and do { $loc->add_sub_Location(shift @loc_objs) } 20 7 27
277 7 return $loc;
278 } else {
279 7329 $loc = shift @loc_objs;
280 7329 return $loc;
281 }
282 } else { # simple location(s)
283 6160 $loc = $self->_parse_location($locstr);
284 6160 ▶ $loc->strand(-1) if ($op && $op eq 'complement');
Branch: 1 branch
BranchTrueFalseTotal
if $op and $op eq "complement" 2089 4071 6160
Condition100%3/3
$op and $op eq "complement"
!ll&&!rl&&r
4060112089
MC/DC100%2/2
$op and $op eq "complement"
$op $op eq "complement"
Truth table100%3/3
A and B
A= $opB= $op eq "complement"
ABresult
0X0
100
111
285 }
286 6160 return $loc;
287 }
288  
289 =head2 _parse_location
290  
291 Title : _parse_location
292 Usage : $loc = $locfactory->_parse_location( $loc_string)
293  
294 Function: Parses the given location string and returns a location object
295 with start() and end() and strand() set appropriately.
296 Note that this method is private.
297 Returns : A Bio::LocationI implementing object or undef on failure
298 Args : location string
299  
300 =cut
301  
302 41491 ▶sub _parse_location {
Subroutine _parse_location: called CC=17 SCAR=28.3
303 41491 my ($self, $locstr) = @_;
304 41491 my ($loc, $seqid);
305 #$self->debug( "Location parse, processing $locstr\n");
306 # 'remote' location?
307 41491 ▶ if($locstr =~ m{^(\S+):(.*)$}o) {
Branch: 1 branch
BranchTrueFalseTotal
if ($locstr =~ /^(\S+):(.*)$/o) 102 41389 41491
308 # yes; memorize remote ID and strip from location string
309 102 $seqid = $1;
310 102 $locstr = $2;
311 }
312
313 # split into start and end
314 41491 my ($start, $end) = split(/\.\./, $locstr);
315 # remove enclosing parentheses if any; note that because of parentheses
316 # possibly surrounding the entire location the parentheses around start
317 # and/or may be asymmetrical
318 # Note: these are from X.Y fuzzy locations, which are deprecated!
319 41491 ▶ $start =~ s/(?:^\[+|\]+$)//g if $start;
Branch: 1 branch
BranchTrueFalseTotal
if $start 41483 8 41491
320 41491 ▶ $end =~ s/(?:^\[+|\]+$)//g if $end;
Branch: 1 branch
BranchTrueFalseTotal
if $end 40698 793 41491
321  
322 # Is this a simple (exact) or a fuzzy location? Simples have exact start
323 # and end, or is between two adjacent bases. Everything else is fuzzy.
324 41491 my $loctype = ".."; # exact with start and end as default
325  
326 41491 ▶ $loctype = '?' if ( ($locstr =~ /\?/) && ($locstr !~ /\?\d+/) );
Branch: 1 branch
BranchTrueFalseTotal
if $locstr =~ /\?/ and not $locstr =~ /\?\d+/ 35 41456 41491
Condition100%3/3
$locstr =~ /\?/ and not $locstr =~ /\?\d+/
!ll&&!rl&&r
41452435
MC/DC100%2/2
$locstr =~ /\?/ and not $locstr =~ /\?\d+/
$locstr =~ /\?/ not $locstr =~ /\?\d+/
Truth table100%3/3
A and not(B)
A= $locstr =~ /\?/B= not $locstr =~ /\?\d+/
ABresult
0X0
100
111
327  
328 41491 my $locclass = "Bio::Location::Simple";
329 41491 ▶ if(! defined($end)) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $end) 785 40706 41491
330 785 ▶ if($locstr =~ /(\d+)([\.\^])(\d+)/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($locstr =~ /(\d+)([\.\^])(\d+)/) { } 33 752 785
331 33 $start = $1;
332 33 $end = $3;
333 33 $loctype = $2;
334 33 ▶ $locclass = "Bio::Location::Fuzzy"
Branch: 1 branch
BranchTrueFalseTotal
unless abs $end - $start <= 1 and $loctype eq "^" 20 13 33
Condition66%2/3
abs $end - $start <= 1 and $loctype eq "^"
!ll&&!rl&&r
20013
MC/DC50%1/2
abs $end - $start <= 1 and $loctype eq "^"
abs $end - $start <= 1 $loctype eq "^"
Truth table66%2/3
A and B
A= abs $end - $start <= 1B= $loctype eq "^"
ABresult
0X0
100
111
335 unless (abs($end-$start) <= 1) && ($loctype eq "^");
336 } else {
337 752 $end = $start;
338 }
339 }
340 # start_num and end_num are for the numeric only versions of
341 # start and end so they can be compared
342 # in a few lines
343 41491 my ($start_num, $end_num) = ($start,$end);
344 41491 ▶ if ( ($start =~ /[\>\<\?\.\^]/) || ($end =~ /[\>\<\?\.\^]/) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($start =~ /[\>\<\?\.\^]/ or $end =~ /[\>\<\?\.\^]/) 440 41051 41491
Condition100%3/3
$start =~ /[\>\<\?\.\^]/ or $end =~ /[\>\<\?\.\^]/
l!l&&r!l&&!r
29214841051
MC/DC100%2/2
$start =~ /[\>\<\?\.\^]/ or $end =~ /[\>\<\?\.\^]/
$start =~ /[\>\<\?\.\^]/ $end =~ /[\>\<\?\.\^]/
Truth table100%3/3
A or B
A= $start =~ /[\>\<\?\.\^]/B= $end =~ /[\>\<\?\.\^]/
ABresult
1X1
011
000
345 440 $locclass = 'Bio::Location::Fuzzy';
346 440 ▶ if($start =~ /(\d+)/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($start =~ /(\d+)/) { } 422 18 440
347 422 ($start_num) = $1;
348 } else {
349 18 $start_num = 0
350 }
351 440 ▶ if ($end =~ /(\d+)/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($end =~ /(\d+)/) { } 422 18 440
352 422 ($end_num) = $1;
353 18 } else { $end_num = 0 }
354 }
355 41491 my $strand = 1;
356  
357 41491 ▶ if( $start_num > $end_num && $loctype ne '?') {
Branch: 1 branch
BranchTrueFalseTotal
if ($start_num > $end_num and $loctype ne "?") 13 41478 41491
Condition100%3/3
$start_num > $end_num and $loctype ne "?"
!ll&&!rl&&r
414611713
MC/DC100%2/2
$start_num > $end_num and $loctype ne "?"
$start_num > $end_num $loctype ne "?"
Truth table100%3/3
A and B
A= $start_num > $end_numB= $loctype ne "?"
ABresult
0X0
100
111
358 13 ($start,$end,$strand) = ($end,$start,-1);
359 }
360 # instantiate location and initialize
361 41491 $loc = $locclass->new(-verbose => $self->verbose,
362 -start => $start,
363 -end => $end,
364 -strand => $strand,
365 -location_type => $loctype);
366 # set remote ID if remote location
367 41491 ▶ if($seqid) {
Branch: 1 branch
BranchTrueFalseTotal
if ($seqid) 102 41389 41491
368 102 $loc->is_remote(1);
369 102 $loc->seq_id($seqid);
370 }
371  
372 # done (hopefully)
373 41491 return $loc;
374 }
375  
376 106 1;
« Bio/Matrix/PSM/SiteMatrix.pm ↑ Summary Bio/SearchIO/SearchResultEventBuilder.pm »