VCF/V4_1.pm

filter: Statementstmt 17.8% 43 / 241 Branchbran 12.8% 17 / 132 Conditioncond 15.3% 12 / 78 MC/DCmcdc 8.3% 4 / 48 Subroutinesub 26.6% 4 / 15 Podpod 100% 14 / 14 totaltotal 17.8% 94 / 528 CC 97 SCAR 52.6
CC
97
Cov
16%
validate_alt_field
462.0
validate_alt_field
462.0
event_type
41.5
CRAP 191.9
« VCF/V4_0.pm ↑ Summary VCF.pm »
1 #------------------------------------------------
2 # Version 4.1 specific functions
3  
4 =head1 VCFv4.1
5  
6 VCFv4.1 specific functions
7  
8 =cut
9  
10 package VCF::V4_1;
11 1 $VCF::V4_1::VERSION = '1.003';
12 1 ▶use base qw(VCF::V4_0);
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 sub new
15 4 ▶{
Subroutine new: called CC=3 SCAR=15.7
Pod documented
16 0 ▶ my ($class,@args) = @_;
Subroutine new: not called CC=3 SCAR=15.7
Pod documented
17 0 my $self = $class->SUPER::new(@args);
18 0 ▶ bless $self, ref($class) || $class;
Condition16%1/6
ref $class || $class
l!l&&r!l&&!r
000
ref $class || $class
l!l&&r!l&&!r
040
MC/DC0%0/2
ref $class || $class
ref $class $class
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table0%0/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
19  
20 $$self{_defaults} =
21 {
22 0 version => '4.1',
23 drop_trailings => 1,
24 filter_passed => 'PASS',
25  
26 defaults =>
27 {
28 QUAL => '.',
29 Flag => undef,
30 GT => '.',
31 default => '.',
32 },
33 reserved =>
34 {
35 FILTER => { 0=>1 },
36 },
37  
38 handlers =>
39 {
40 Integer => \&VCF::Reader::validate_int,
41 Float => \&VCF::Reader::validate_float,
42 Character => \&VCF::Reader::validate_char,
43 String => undef,
44 Flag => undef,
45 },
46  
47 regex_snp => qr/^[ACGTN]$|^<[\w:.]+>$/i,
48 regex_ins => qr/^[ACGTN]+$/i,
49 regex_del => qr/^[ACGTN]+$/i,
50 regex_gtsep => qr{[|/]}, # | /
51 regex_gt => qr{^(\.|\d+)([|/]?)(\.?|\d*)$}, # . ./. 0/1 0|1
52 regex_gt2 => qr{^(\.|[0-9ACGTNacgtn]+|<[\w:.]+>)([|/]?)}, # . ./. 0/1 0|1 A/A A|A 0|<DEL:ME:ALU>
53 gt_sep => [qw(| /)],
54 };
55  
56 0 $$self{ignore_missing_GT} = 1;
57  
58 0 for my $key (keys %{$$self{_defaults}})
59 {
60 0 $$self{$key}=$$self{_defaults}{$key};
61 }
62  
63 0 return $self;
64 }
65  
66 sub validate_header
67 0 ▶{
Subroutine validate_header: not called CC=2 SCAR=17.9
Pod documented
68 0 ▶ my ($self) = @_;
Subroutine validate_header: not called CC=2 SCAR=17.9
Pod documented
69 0 my $lines = $self->get_header_line(key=>'reference');
70 0 ▶ if ( !@$lines ) { $self->warn("The header tag 'reference' not present. (Not required but highly recommended.)\n"); }
Branch: 2 branches
BranchTrueFalseTotal
if (not @$lines) 0 0 0
if (not @$lines) 0 0 0
71 }
72  
73 sub validate_line
74 0 ▶{
Subroutine validate_line: not called CC=5 SCAR=34.0
Pod documented
75 0 ▶ my ($self,$line) = @_;
Subroutine validate_line: not called CC=5 SCAR=34.0
Pod documented
76  
77 0 ▶ if ( !$$self{_contig_validated}{$$line{CHROM}} )
Branch: 2 branches
BranchTrueFalseTotal
unless ($self->{"_contig_validated"}{$line->{"CHROM"}}) 0 0 0
unless ($self->{"_contig_validated"}{$line->{"CHROM"}}) 0 0 0
78 {
79 0 my $lines = $self->get_header_line(key=>'contig',ID=>$$line{CHROM});
80 0 ▶ if ( !@$lines ) { $self->warn("The header tag 'contig' not present for CHROM=$$line{CHROM}. (Not required but highly recommended.)\n"); }
Branch: 2 branches
BranchTrueFalseTotal
unless (@$lines) 0 0 0
unless (@$lines) 0 0 0
81 0 $$self{_contig_validated}{$$line{CHROM}} = 1;
82 }
83  
84 0 ▶ if ( index($$line{CHROM},':')!=-1 ) { $self->warn("Colons not allowed in chromosome names: $$line{CHROM}\n"); }
Branch: 2 branches
BranchTrueFalseTotal
if (index($line->{"CHROM"}, ":") != -1) 0 0 0
if (index($line->{"CHROM"}, ":") != -1) 0 0 0
85  
86 # Is the ID composed of alphanumeric chars
87 0 ▶ if ( !($$line{ID}=~/^\S+$/) ) { $self->warn("Expected non-whitespace ID at $$line{CHROM}:$$line{POS}, but got [$$line{ID}]\n"); }
Branch: 2 branches
BranchTrueFalseTotal
if (not $line->{"ID"} =~ /^\S+$/) 0 0 0
if (not $line->{"ID"} =~ /^\S+$/) 0 0 0
88 }
89  
90 sub validate_alt_field
91 0 ▶{
Subroutine validate_alt_field: not called CC=21 SCAR=61.4
Pod documented
92 0 ▶ my ($self,$values,$ref) = @_;
Subroutine validate_alt_field: not called CC=21 SCAR=61.4
Pod documented
93  
94 0 ▶ if ( @$values == 1 && $$values[0] eq '.' ) { return undef; }
Branch: 2 branches
BranchTrueFalseTotal
if (@$values == 1 and $values->[0] eq ".") 0 0 0
if (@$values == 1 and $values->[0] eq ".") 0 0 0
Condition0%0/6
@$values == 1 and $values->[0] eq "."
!ll&&!rl&&r
000
@$values == 1 and $values->[0] eq "."
!ll&&!rl&&r
000
MC/DC0%0/2
@$values == 1 and $values->[0] eq "."
@$values == 1 $values->[0] eq "."
MC/DC0%0/2
@$values == 1 and $values->[0] eq "."
@$values == 1 $values->[0] eq "."
Truth table0%0/3
A and B
A= @$values == 1B= $values->[0] eq "."
ABresult
0X0
100
111
Truth table0%0/3
A and B
A= @$values == 1B= $values->[0] eq "."
ABresult
0X0
100
111
95  
96 0 my $ret = $self->_validate_alt_field($values,$ref);
97 0 ▶ if ( $ret ) { return $ret; }
Branch: 2 branches
BranchTrueFalseTotal
if ($ret) 0 0 0
if ($ret) 0 0 0
98  
99 0 my $ref_len = length($ref);
100 0 my $ref1 = substr($ref,0,1);
101  
102 0 my @err;
103 0 my $msg = '';
104 0 for my $item (@$values)
105 {
106 0 ▶ if ( $item=~/^(.*)\[(.+)\[(.*)$/ or $item=~/^(.*)\](.+)\](.*)$/ )
Branch: 2 branches
BranchTrueFalseTotal
if ($item =~ /^(.*)\[(.+)\[(.*)$/ or $item =~ /^(.*)\](.+)\](.*)$/) 0 0 0
if ($item =~ /^(.*)\[(.+)\[(.*)$/ or $item =~ /^(.*)\](.+)\](.*)$/) 0 0 0
Condition0%0/6
$item =~ /^(.*)\[(.+)\[(.*)$/ or $item =~ /^(.*)\](.+)\](.*)$/
l!l&&r!l&&!r
000
$item =~ /^(.*)\[(.+)\[(.*)$/ or $item =~ /^(.*)\](.+)\](.*)$/
l!l&&r!l&&!r
000
MC/DC0%0/2
$item =~ /^(.*)\[(.+)\[(.*)$/ or $item =~ /^(.*)\](.+)\](.*)$/
$item =~ /^(.*)\[(.+)\[(.*)$/ $item =~ /^(.*)\](.+)\](.*)$/
MC/DC0%0/2
$item =~ /^(.*)\[(.+)\[(.*)$/ or $item =~ /^(.*)\](.+)\](.*)$/
$item =~ /^(.*)\[(.+)\[(.*)$/ $item =~ /^(.*)\](.+)\](.*)$/
Truth table0%0/3
A or B
A= $item =~ /^(.*)\[(.+)\[(.*)$/B= $item =~ /^(.*)\](.+)\](.*)$/
ABresult
1X1
011
000
Truth table0%0/3
A or B
A= $item =~ /^(.*)\[(.+)\[(.*)$/B= $item =~ /^(.*)\](.+)\](.*)$/
ABresult
1X1
011
000
107 {
108 0 ▶ if ( $1 ne '' && $3 ne '' ) { $msg=', two replacement strings given (expected one)'; push @err,$item; next; }
Branch: 2 branches
BranchTrueFalseTotal
if ($1 ne "" and $3 ne "") 0 0 0
if ($1 ne "" and $3 ne "") 0 0 0
Condition0%0/6
$1 ne "" and $3 ne ""
!ll&&!rl&&r
000
$1 ne "" and $3 ne ""
!ll&&!rl&&r
000
MC/DC0%0/2
$1 ne "" and $3 ne ""
$1 ne "" $3 ne ""
MC/DC0%0/2
$1 ne "" and $3 ne ""
$1 ne "" $3 ne ""
Truth table0%0/3
A and B
A= $1 ne ""B= $3 ne ""
ABresult
0X0
100
111
Truth table0%0/3
A and B
A= $1 ne ""B= $3 ne ""
ABresult
0X0
100
111
109 0 my $rpl;
110 0 ▶ if ( $1 ne '' )
Branch: 2 branches
BranchTrueFalseTotal
if ($1 ne '') { } 0 0 0
if ($1 ne '') { } 0 0 0
111 {
112 0 $rpl = $1;
113 0 ▶ if ( $rpl ne '.' )
Branch: 2 branches
BranchTrueFalseTotal
if ($rpl ne ".") 0 0 0
if ($rpl ne ".") 0 0 0
114 {
115 0 my $rref = substr($rpl,0,1);
116 0 ▶ if ( $rref ne $ref1 ) { $msg=', the first base of the replacement string does not match the reference'; push @err,$item; next; }
Branch: 2 branches
BranchTrueFalseTotal
if ($rref ne $ref1) 0 0 0
if ($rref ne $ref1) 0 0 0
117 }
118 }
119 else
120 {
121 0 $rpl = $3;
122 0 ▶ if ( $rpl ne '.' )
Branch: 2 branches
BranchTrueFalseTotal
if ($rpl ne ".") 0 0 0
if ($rpl ne ".") 0 0 0
123 {
124 0 my $rref = substr($rpl,-1,1);
125 0 ▶ if ( $rref ne $ref1 ) { $msg=', the last base of the replacement string does not match the reference'; push @err,$item; next; }
Branch: 2 branches
BranchTrueFalseTotal
if ($rref ne $ref1) 0 0 0
if ($rref ne $ref1) 0 0 0
126 }
127 }
128 0 my $pos = $2;
129 0 ▶ if ( !($rpl=~/^[ACTGNacgtn]+$/) && $rpl ne '.' ) { $msg=', replacement string not valid (expected [ACTGNacgtn]+)'; push @err,$item; next; }
Branch: 2 branches
BranchTrueFalseTotal
if (not $rpl =~ /^[ACTGNacgtn]+$/ and $rpl ne ".") 0 0 0
if (not $rpl =~ /^[ACTGNacgtn]+$/ and $rpl ne ".") 0 0 0
Condition0%0/6
not $rpl =~ /^[ACTGNacgtn]+$/ and $rpl ne "."
!ll&&!rl&&r
000
not $rpl =~ /^[ACTGNacgtn]+$/ and $rpl ne "."
!ll&&!rl&&r
000
MC/DC0%0/2
not $rpl =~ /^[ACTGNacgtn]+$/ and $rpl ne "."
not $rpl =~ /^[ACTGNacgtn]+$/ $rpl ne "."
MC/DC0%0/2
not $rpl =~ /^[ACTGNacgtn]+$/ and $rpl ne "."
not $rpl =~ /^[ACTGNacgtn]+$/ $rpl ne "."
Truth table0%0/3
not(A) and B
A= not $rpl =~ /^[ACTGNacgtn]+$/B= $rpl ne "."
ABresult
0X0
100
111
Truth table0%0/3
not(A) and B
A= not $rpl =~ /^[ACTGNacgtn]+$/B= $rpl ne "."
ABresult
0X0
100
111
130 0 ▶ if ( !($pos=~/^\S+:\d+$/) ) { $msg=', cannot parse sequence:position'; push @err,$item; next; }
Branch: 2 branches
BranchTrueFalseTotal
unless ($pos =~ /^\S+:\d+$/) 0 0 0
unless ($pos =~ /^\S+:\d+$/) 0 0 0
131 0 next;
132 }
133 0 ▶ if ( $item=~/^\.[ACTGNactgn]*([ACTGNactgn])$/ ) { next; }
Branch: 4 branches
BranchTrueFalseTotal
if ($item =~ /^\.[ACTGNactgn]*([ACTGNactgn])$/) { } 0 0 0
elsif ($item =~ /^([ACTGNactgn])[ACTGNactgn]*\.$/) { } 0 0 0
if ($item =~ /^\.[ACTGNactgn]*([ACTGNactgn])$/) { } 0 0 0
elsif ($item =~ /^([ACTGNactgn])[ACTGNactgn]*\.$/) { } 0 0 0
134 0 elsif ( $item=~/^([ACTGNactgn])[ACTGNactgn]*\.$/ ) { next; }
135 0 ▶ if ( !($item=~/^[ACTGNactgn]+$|^<[^<>\s]+>$/) ) { push @err,$item; next; }
Branch: 2 branches
BranchTrueFalseTotal
unless ($item =~ /^[ACTGNactgn]+$|^<[^<>\s]+>$/) 0 0 0
unless ($item =~ /^[ACTGNactgn]+$|^<[^<>\s]+>$/) 0 0 0
136 }
137 0 ▶ if ( !@err ) { return undef; }
Branch: 2 branches
BranchTrueFalseTotal
unless (@err) 0 0 0
unless (@err) 0 0 0
138 0 return 'Could not parse the allele(s) [' .join(',',@err). ']' . $msg;
139 }
140  
141 sub next_data_hash
142 0 ▶{
Subroutine next_data_hash: not called CC=5 SCAR=34.0
Pod documented
143 0 ▶ my ($self,@args) = @_;
Subroutine next_data_hash: not called CC=5 SCAR=34.0
Pod documented
144  
145 0 my $out = $self->SUPER::next_data_hash(@args);
146 0 ▶ if ( !defined $out or $$self{assume_uppercase} ) { return $out; }
Branch: 2 branches
BranchTrueFalseTotal
if (not defined $out or $self->{"assume_uppercase"}) 0 0 0
if (not defined $out or $self->{"assume_uppercase"}) 0 0 0
Condition0%0/6
not defined $out or $self->{"assume_uppercase"}
l!l&&r!l&&!r
000
not defined $out or $self->{"assume_uppercase"}
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $out or $self->{"assume_uppercase"}
not defined $out $self->{"assume_uppercase"}
MC/DC0%0/2
not defined $out or $self->{"assume_uppercase"}
not defined $out $self->{"assume_uppercase"}
Truth table0%0/3
not(A) or B
A= not defined $outB= $self->{"assume_uppercase"}
ABresult
1X1
011
000
Truth table0%0/3
not(A) or B
A= not defined $outB= $self->{"assume_uppercase"}
ABresult
1X1
011
000
147  
148 # Case-insensitive ALT and REF bases
149 0 $$out{REF} = uc($$out{REF});
150 0 my $nalt = @{$$out{ALT}};
151 0 ▶ for (my $i=0; $i<$nalt; $i++)
Branch: 2 branches
BranchTrueFalseTotal
if ($i < $nalt) 0 0 0
if ($i < $nalt) 0 0 0
152 {
153 0 ▶ if ( $$out{ALT}[$i]=~/^</ ) { next; }
Branch: 2 branches
BranchTrueFalseTotal
if ($out->{"ALT"}[$i] =~ /^</) 0 0 0
if ($out->{"ALT"}[$i] =~ /^</) 0 0 0
154 0 $$out{ALT}[$i] = uc($$out{ALT}[$i]);
155 }
156  
157 0 return $out;
158 }
159  
160 sub next_data_array
161 4 ▶{
Subroutine next_data_array: called CC=8 SCAR=30.4
Pod documented
162 0 ▶ my ($self,@args) = @_;
Subroutine next_data_array: not called CC=8 SCAR=30.4
Pod documented
163  
164 0 my $out = $self->SUPER::next_data_array(@args);
165 0 ▶ if ( !defined $out or $$self{assume_uppercase} ) { return $out; }
Branch: 2 branches
BranchTrueFalseTotal
if (not defined $out or $self->{"assume_uppercase"}) 0 0 0
if (not defined $out or $self->{"assume_uppercase"}) 0 4 4
Condition16%1/6
not defined $out or $self->{"assume_uppercase"}
l!l&&r!l&&!r
000
not defined $out or $self->{"assume_uppercase"}
l!l&&r!l&&!r
004
MC/DC0%0/2
not defined $out or $self->{"assume_uppercase"}
not defined $out $self->{"assume_uppercase"}
MC/DC0%0/2
not defined $out or $self->{"assume_uppercase"}
not defined $out $self->{"assume_uppercase"}
Truth table0%0/3
not(A) or B
A= not defined $outB= $self->{"assume_uppercase"}
ABresult
1X1
011
000
Truth table33%1/3
not(A) or B
A= not defined $outB= $self->{"assume_uppercase"}
ABresult
1X1
011
000
166  
167 # Case-insensitive ALT and REF bases
168 0 $$out[3] = uc($$out[3]);
169 0 my $alt = $$out[4];
170 0 $$out[4] = '';
171 0 my $pos = 0;
172 0 ▶ while ( $pos<length($alt) && (my $start=index($alt,'<',$pos))!=-1 )
Branch: 2 branches
BranchTrueFalseTotal
if ($pos < length $alt and (my $start = index($alt, "<", $pos)) != -1) 0 0 0
if ($pos < length $alt and (my $start = index($alt, "<", $pos)) != -1) 7 4 11
Condition50%3/6
$pos < length $alt and (my $start = index($alt, "<", $pos)) != -1
!ll&&!rl&&r
000
$pos < length $alt and (my $start = index($alt, "<", $pos)) != -1
!ll&&!rl&&r
227
MC/DC0%0/2
$pos < length $alt and (my $start = index($alt, "<", $pos)) != -1
$pos < length $alt (my $start = index($alt, "<", $pos)) != -1
MC/DC100%2/2
$pos < length $alt and (my $start = index($alt, "<", $pos)) != -1
$pos < length $alt (my $start = index($alt, "<", $pos)) != -1
Truth table0%0/3
A and B
A= $pos < length $altB= (my $start = index($alt, "<", $pos)) != -1
ABresult
0X0
100
111
Truth table100%3/3
A and B
A= $pos < length $altB= (my $start = index($alt, "<", $pos)) != -1
ABresult
0X0
100
111
173 {
174 0 my $end = index($alt,'>',$start+1);
175 0 ▶ if ( $end==-1 ) { $self->throw("Could not parse ALT [$alt]\n") }
Branch: 2 branches
BranchTrueFalseTotal
if ($end == -1) 0 0 0
if ($end == -1) 0 7 7
176 0 ▶ if ( $start>$pos )
Branch: 2 branches
BranchTrueFalseTotal
if ($start > $pos) 0 0 0
if ($start > $pos) 5 2 7
177 {
178 0 $$out[4] .= uc(substr($alt,$pos,$start-$pos));
179 }
180 0 $$out[4] .= substr($alt,$start,$end-$start+1);
181 0 $pos = $end+1;
182 }
183 0 ▶ if ( $pos<length($alt) )
Branch: 2 branches
BranchTrueFalseTotal
if ($pos < length $alt) 0 0 0
if ($pos < length $alt) 2 2 4
184 {
185 0 $$out[4] .= uc(substr($alt,$pos));
186 }
187 0 return $out;
188 }
189  
190 sub event_type
191 10 ▶{
Subroutine event_type: called CC=11 SCAR=37.3
Pod documented
192 0 ▶ my ($self,$rec,$allele) = @_;
Subroutine event_type: not called CC=11 SCAR=37.3
Pod documented
193  
194 0 my $len = length($allele);
195 0 ▶ if ( $len==1 ) { return $self->SUPER::event_type($rec,$allele); }
Branch: 2 branches
BranchTrueFalseTotal
if ($len == 1) 0 0 0
if ($len == 1) 3 7 10
196  
197 0 my $c = substr($allele,0,1);
198 0 ▶ if ( $c eq '<' ) { return ('u',0,$allele); }
Branch: 4 branches
BranchTrueFalseTotal
if ($c eq '<') { } 0 0 0
elsif ($c eq '[' or $c eq ']' or $c eq '.') { } 0 0 0
if ($c eq '<') { } 1 6 7
elsif ($c eq '[' or $c eq ']' or $c eq '.') { } 1 5 6
199 0 ▶ elsif ( $c eq '[' or $c eq ']' or $c eq '.' ) { return 'b'; }
Condition25%3/12
$c eq "[" or $c eq "]" or $c eq "."
l!l&&r!l&&!r
000
$c eq "[" or $c eq "]"
l!l&&r!l&&!r
000
$c eq "[" or $c eq "]" or $c eq "."
l!l&&r!l&&!r
015
$c eq "[" or $c eq "]"
l!l&&r!l&&!r
006
MC/DC0%0/3
$c eq "[" or $c eq "]" or $c eq "."
$c eq "[" $c eq "]" $c eq "."
MC/DC33%1/3
$c eq "[" or $c eq "]" or $c eq "."
$c eq "[" $c eq "]" $c eq "."
Truth table0%0/4
A or B or C
A= $c eq "["B= $c eq "]"C= $c eq "."
ABCresult
1XX1
01X1
0011
0000
Truth table50%2/4
A or B or C
A= $c eq "["B= $c eq "]"C= $c eq "."
ABCresult
1XX1
01X1
0011
0000
200  
201 0 $c = substr($allele,-1,1);
202 0 ▶ if ( $c eq '[' or $c eq ']' or $c eq '.' ) { return 'b'; }
Branch: 4 branches
BranchTrueFalseTotal
if ($c eq '[' or $c eq ']' or $c eq '.') { } 0 0 0
elsif (index($allele, '[') != -1 or index($allele, ']') != -1) { } 0 0 0
if ($c eq '[' or $c eq ']' or $c eq '.') { } 1 4 5
elsif (index($allele, '[') != -1 or index($allele, ']') != -1) { } 0 4 4
Condition25%3/12
$c eq "[" or $c eq "]" or $c eq "."
l!l&&r!l&&!r
000
$c eq "[" or $c eq "]"
l!l&&r!l&&!r
000
$c eq "[" or $c eq "]" or $c eq "."
l!l&&r!l&&!r
014
$c eq "[" or $c eq "]"
l!l&&r!l&&!r
005
MC/DC0%0/3
$c eq "[" or $c eq "]" or $c eq "."
$c eq "[" $c eq "]" $c eq "."
MC/DC33%1/3
$c eq "[" or $c eq "]" or $c eq "."
$c eq "[" $c eq "]" $c eq "."
Truth table0%0/4
A or B or C
A= $c eq "["B= $c eq "]"C= $c eq "."
ABCresult
1XX1
01X1
0011
0000
Truth table50%2/4
A or B or C
A= $c eq "["B= $c eq "]"C= $c eq "."
ABCresult
1XX1
01X1
0011
0000
203 0 ▶ elsif ( index($allele,'[')!=-1 or index($allele,']')!=-1 ) { return 'b'; }
Condition16%1/6
index($allele, "[") != -1 or index($allele, "]") != -1
l!l&&r!l&&!r
000
index($allele, "[") != -1 or index($allele, "]") != -1
l!l&&r!l&&!r
004
MC/DC0%0/2
index($allele, "[") != -1 or index($allele, "]") != -1
index($allele, "[") != -1 index($allele, "]") != -1
MC/DC0%0/2
index($allele, "[") != -1 or index($allele, "]") != -1
index($allele, "[") != -1 index($allele, "]") != -1
Truth table0%0/3
A or B
A= index($allele, "[") != -1B= index($allele, "]") != -1
ABresult
1X1
011
000
Truth table33%1/3
A or B
A= index($allele, "[") != -1B= index($allele, "]") != -1
ABresult
1X1
011
000
204  
205 0 return $self->SUPER::event_type($rec,$allele);
206 }
207  
208 1 1;
« VCF/V4_0.pm ↑ Summary VCF.pm »