| 1 | #------------------------------------------------ | ||||||||||||||||||||
| 2 | # Version 3.2 specific functions | ||||||||||||||||||||
| 3 | |||||||||||||||||||||
| 4 | package VCF::V3_2; | ||||||||||||||||||||
| 5 | 1 | $VCF::V3_2::VERSION = '1.0'; | |||||||||||||||||||
| 6 | 1 | ▶ | use base qw(VCF::Reader); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | sub new | ||||||||||||||||||||
| 9 | { | ||||||||||||||||||||
| 10 | 0 | ▶ | my ($class,@args) = @_; | ||||||||||||||||||
|
Subroutine
new: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||
| 11 | 0 | my $self = $class->SUPER::new(@args); | |||||||||||||||||||
| 12 | 0 | ▶ | bless $self, ref($class) || $class; | ||||||||||||||||||
|
Condition0%0/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table0%0/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | $$self{_defaults} = | ||||||||||||||||||||
| 15 | { | ||||||||||||||||||||
| 16 | 0 | version => '3.2', | |||||||||||||||||||
| 17 | drop_trailings => 1, | ||||||||||||||||||||
| 18 | filter_passed => 0, | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | defaults => | ||||||||||||||||||||
| 21 | { | ||||||||||||||||||||
| 22 | QUAL => '-1', | ||||||||||||||||||||
| 23 | default => '.', | ||||||||||||||||||||
| 24 | Flag => undef, | ||||||||||||||||||||
| 25 | GT => '.', | ||||||||||||||||||||
| 26 | }, | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | handlers => | ||||||||||||||||||||
| 29 | { | ||||||||||||||||||||
| 30 | Integer => \&VCF::Reader::validate_int, | ||||||||||||||||||||
| 31 | Float => \&VCF::Reader::validate_float, | ||||||||||||||||||||
| 32 | Character => \&VCF::Reader::validate_char, | ||||||||||||||||||||
| 33 | String => undef, | ||||||||||||||||||||
| 34 | Flag => undef, | ||||||||||||||||||||
| 35 | }, | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | regex_snp => qr/^[ACGTN]$/i, | ||||||||||||||||||||
| 38 | regex_ins => qr/^I[ACGTN]+$/, | ||||||||||||||||||||
| 39 | regex_del => qr/^D\d+$/, | ||||||||||||||||||||
| 40 | regex_gtsep => qr{[\\|/]}, | ||||||||||||||||||||
| 41 | regex_gt => qr{^(\.|\d+)([\\|/]?)(\.?|\d*)$}, | ||||||||||||||||||||
| 42 | regex_gt2 => qr{^(\.|[0-9ACGTNIDacgtn]+)([\\|/]?)}, | ||||||||||||||||||||
| 43 | }; | ||||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | 0 | for my $key (keys %{$$self{_defaults}}) | |||||||||||||||||||
| 46 | { | ||||||||||||||||||||
| 47 | 0 | $$self{$key}=$$self{_defaults}{$key}; | |||||||||||||||||||
| 48 | } | ||||||||||||||||||||
| 49 | |||||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | 0 | return $self; | |||||||||||||||||||
| 52 | } | ||||||||||||||||||||