diff --git a/lib/AGAT/OmniscientTool.pm b/lib/AGAT/OmniscientTool.pm index 9e383cb..097920c 100644 --- a/lib/AGAT/OmniscientTool.pm +++ b/lib/AGAT/OmniscientTool.pm @@ -1314,7 +1314,8 @@ 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'}; @@ -1322,6 +1323,12 @@ sub clean_clone{ $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;