Skip to content

Commit

Permalink
Fix 445 buggit add lib/AGAT/OmniscientI.pm Few gene in output due to… (
Browse files Browse the repository at this point in the history
…#447)

* Fix 445 bug introduced in version 1.3.2 in lib/AGAT/OmniscientI.pm : Few gene in output due to a remaining last that quit early in a loop.  remove useless print

* increment version
  • Loading branch information
Juke34 authored Mar 27, 2024
1 parent 40418f9 commit a23b8ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion lib/AGAT/AGAT.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use AGAT::Utilities;
use AGAT::PlotR;
use Bio::Tools::GFF;

our $VERSION = "v1.3.2";
our $VERSION = "v1.3.3";
our @ISA = qw(Exporter);
our @EXPORT = qw(get_agat_header print_agat_version get_agat_config handle_levels);
sub import {
Expand Down
5 changes: 0 additions & 5 deletions lib/AGAT/OmniscientI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1731,18 +1731,14 @@ sub _check_l2_linked_to_l3{
#check if we have the tag

foreach my $l3_feature (@{$hash_omniscient->{'level3'}{$tag_l3}{$id_l2}}){
print "fefe ".$l3_feature->gff_string()."\n";
if($l3_feature->has_tag($tag) ) {
print "has_tag $tag\n";
# case where it's linked by comon_tag attribute
if (exists_keys($common_tag_in_l1,( $tag, lc($l3_feature->_tag_value($tag)) ) ) ){
print "exists_keys\n";
if($#{$common_tag_in_l1->{$tag}{lc($l3_feature->_tag_value($tag))}} == 0){
my $id = $common_tag_in_l1->{$tag}{lc($l3_feature->_tag_value($tag))}[0]->{'id'};
my $ptag = $common_tag_in_l1->{$tag}{lc($l3_feature->_tag_value($tag))}[0]->{'ptag'};
$has_l1_feature = $hash_omniscient->{'level1'}{$ptag}{$id};
$id_l2_to_replace = $l3_feature->_tag_value('Parent');
print "goes into it !!!! $id_l2_to_replace \n";
last;
}
else{
Expand Down Expand Up @@ -1827,7 +1823,6 @@ sub _check_l2_linked_to_l3{
push(@{$hash_omniscient->{"level2"}{lc($l2_feature->primary_tag)}{lc($l1_ID)}}, $l2_feature);
}
dual_print($log, "L3 had a L1 feature but no L2 feature. Corrected by creating the intermediate L2 feature:\n".$l2_feature->gff_string()."\nUsing this feature template:\n".$hash_omniscient->{"level3"}{$tag_l3}{$id_l2}[0]->gff_string()."\n", $verbose);
last
}


Expand Down

0 comments on commit a23b8ea

Please sign in to comment.