File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -623,9 +623,9 @@ sub vcf_attributes {
623
623
unless ($self -> {data }-> name(7) eq ' INFO' ) {
624
624
croak " VCF column INFO is missing or improperly formatted!" ;
625
625
}
626
- my %info = map {$_ [0] => defined $_ [1] ? $_ [1] : 1}
627
- map { [ split /=/ ] }
628
- ( split /;/, $self -> value(7) );
626
+ my %info = map {$_ -> [0] => defined $_ -> [1] ? $_ -> [1] : 1}
627
+ map { [split ( / =/ , $_ ) ] }
628
+ split ( / ;/ , $self -> value(7));
629
629
$self -> {attributes }-> {INFO } = \%info ;
630
630
$self -> {attributes }-> {7 } = \%info ;
631
631
@@ -637,7 +637,9 @@ sub vcf_attributes {
637
637
foreach my $i (9 .. $self -> {data }-> number_columns - 1) {
638
638
my $name = $self -> {data }-> name($i );
639
639
my @sampleVals = split /:/, $self -> value($i );
640
- my %sample = map { $formatKeys [$_ ] => $sampleVals [$_ ] } (0 .. $#formatKeys );
640
+ my %sample = map {
641
+ $formatKeys [$_ ] => defined $sampleVals [$_ ] ? $sampleVals [$_ ] : undef }
642
+ (0 .. $#formatKeys );
641
643
$self -> {attributes }-> {$name } = \%sample ;
642
644
$self -> {attributes }-> {$i } = \%sample ;
643
645
}
You can’t perform that action at this time.
0 commit comments