Skip to content

Commit

Permalink
skip lc for empty check. comment why hash lookup is separate
Browse files Browse the repository at this point in the history
  • Loading branch information
akotlar committed Aug 7, 2018
1 parent a7d3aa2 commit 7883b7f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions lib/Seq/Tracks/Build.pm
Original file line number Diff line number Diff line change
Expand Up @@ -457,14 +457,21 @@ sub _stripAndCoerceUndef {
# This modifies the caller's version
StripLTSpace($_[1]);

if($_[1] eq '') {
$_[1] = undef;
return $_[1];
}

my $v = lc($_[1]);

# These always get coerced to undef
if($v eq '' || $v eq '.' || $v eq 'na' || $v eq $_[0]->{_missChar}){
# These will always get coerced to undef
# TODO: we may want to force only the missChar comparison
if($v eq '.' || $v eq 'na' || $v eq $_[0]->{_missChar}){
$_[1] = undef;
return $_[1];
}

# This will be configurable
if(exists $cl->{$v}) {
$_[1] = undef;
return $_[1];
Expand Down
2 changes: 1 addition & 1 deletion t/utils/filterCadd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ tracks:
- chr22
- chr1
- chr2
filterCadd_completed: 2018-08-07T21:24:00
filterCadd_completed: 2018-08-07T21:28:00
filterCadd_date: 2017-09-12T19:18:00
local_files:
- test.filterCadd.cadd.chr22.chr22.filtered.txt
Expand Down

0 comments on commit 7883b7f

Please sign in to comment.