Skip to content

Commit

Permalink
Handle conditions in PHAFs that have extra details
Browse files Browse the repository at this point in the history
The cases like: FYECO:0000410(23.2ug/ml) and FYECO:0000005(32 C)

Refs #1066
  • Loading branch information
kimrutherford committed Mar 23, 2023
1 parent 23a5acd commit 14d62a0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/PomBase/Import/PhenotypeAnnotation.pm
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,22 @@ sub _store_annotation {
$long_evidence);

my @conditions = split /\s*,\s*/, $conditions;
my $condition_detail_count = 0;

for (my $i = 0; $i < @conditions; $i++) {
my $condition = $conditions[$i];
my $condition_detail = undef;

if ($condition =~ /^(\w+:\d+)(?:\((.*)\))/) {
my $condition_termid = $1;
my $condition_detail = $2;
$condition = $1;
$condition_detail = $2;
}

$condition = $condition_termid;
if (defined $condition_detail) {
$self->add_feature_cvtermprop($feature_cvterm, 'condition_detail',
"$condition($condition_detail)",
$condition_detail_count);
$condition_detail_count++;
}

$self->add_feature_cvtermprop($feature_cvterm, 'condition', $condition, $i);
Expand Down

0 comments on commit 14d62a0

Please sign in to comment.