diff --git a/NEWS b/NEWS index 77cfd62a..149dc881 100644 --- a/NEWS +++ b/NEWS @@ -18,7 +18,8 @@ Changes affecting specific commands: * bcftools csq - - Check the input GFF for features outside transcript boundaries (#2323) + - Check the input GFF for features outside transcript boundaries and extend the transcript + to contain the feature fully (#2323) * bcftools query diff --git a/gff.c b/gff.c index b3b01d01..a29a91c9 100644 --- a/gff.c +++ b/gff.c @@ -1017,9 +1017,9 @@ int gff_parse(gff_t *gff) if ( !gff->warned.ftr_out_of_bounds || gff->verbosity > 1 ) fprintf(stderr,"Warning: The GFF contains features outside the transcript boundaries .. %s\n",gff_id2string(gff,transcript,tr->id)); gff->warned.ftr_out_of_bounds++; - continue; + if ( ftr->beg < tr->beg ) tr->beg = ftr->beg; + if ( ftr->end > tr->end ) tr->end = ftr->end; } - tr->used = 1; tr->gene->used = 1;