Closed Juke34 closed 1 year ago
Since we know we're dealing with a string, can we just evaluate it's length instead?
You mean replacing
$name = 'SEQ' if (! $name and $name ne "0");
by
$name = 'SEQ' if ! length($name);
?
Yes. I think it's shorter and clearer. $name
is a string and we only use SEQ
when the string is empty. It's nice when we can just evaluate the truthiness of the variable, but we're already not doing that because we need to check for the specific "0"
case. At that point, the whole abstraction is gone, so we might as well just check the string length.
Thank you for the fix. I squashed your two commits and remove the trailing whitespace before merging by fast forward. Because of the change for trailing whitespace, github does not recognize as it being merged (but it is). Closing as fixed. Thank you again.
seq_id replaced by SEQ when the name is 0 because perl see 0 as FALSE
BUG reported here: https://github.com/NBISweden/AGAT/issues/368