Skip to content

Commit

Permalink
remive transcript ID in Leve1 feature when using L2 as template by cl…
Browse files Browse the repository at this point in the history
…ean_clone
  • Loading branch information
Juke34 committed Sep 17, 2024
1 parent 00893a7 commit 6b13268
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/AGAT/OmniscientTool.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1314,14 +1314,21 @@ sub clean_clone{
}
}

# remove Parent attribute if level1
# remove Parent and transcript_id attributes if level1.
# We check is Level1 using the primary_tag of the feature
if ($omniscient){
if ($cloned_feature->has_tag("Parent")){
my $hash_level = $omniscient->{'other'}{'level'};
if( exists_keys($hash_level,'level1',lc($cloned_feature->primary_tag)) ){
$cloned_feature->remove_tag("Parent");
}
}
if ($cloned_feature->has_tag("transcript_id")){
my $hash_level = $omniscient->{'other'}{'level'};
if( exists_keys($hash_level,'level1',lc($cloned_feature->primary_tag)) ){
$cloned_feature->remove_tag("transcript_id");
}
}
}
# new id
create_or_replace_tag($cloned_feature,'ID',$new_id) if $new_id;
Expand Down

0 comments on commit 6b13268

Please sign in to comment.