@@ -206,7 +206,7 @@ function draw(
206206 x : topLevelFeatureStartPx ,
207207 y : topLevelFeatureTop ,
208208 h : topLevelFeatureHeight ,
209- text : attributes . get ( 'gff_id' ) ?. toString ( ) ,
209+ text : topLevelFeature . featureId ,
210210 color : textColor ,
211211 isSelected,
212212 }
@@ -262,9 +262,7 @@ function draw(
262262 if ( ! childrenOfmRNA ) {
263263 continue
264264 }
265- const childID : string | undefined = child . attributes
266- . get ( 'gff_id' )
267- ?. toString ( )
265+ const childID : string | undefined = child . featureId ?. toString ( )
268266 if ( childID && filteredTranscripts . includes ( childID ) ) {
269267 continue
270268 }
@@ -311,7 +309,7 @@ function draw(
311309 x : startPx ,
312310 y : exonTop ,
313311 h : exonHeight ,
314- text : exon . attributes . get ( 'gff_id' ) ?. toString ( ) ,
312+ text : exon . featureId ,
315313 color : textColor ,
316314 isSelected,
317315 }
@@ -424,7 +422,7 @@ function draw(
424422 x : cdsStartPx ,
425423 y : cdsTop ,
426424 h : cdsHeight ,
427- text : child . attributes . get ( 'gff_id' ) ?. toString ( ) ,
425+ text : child . featureId ?. toString ( ) ,
428426 color : textColor ,
429427 isSelected,
430428 }
@@ -493,9 +491,7 @@ function drawHover(
493491 if ( ! featureTypeOntology . isTypeOf ( feature . type , 'transcript' ) ) {
494492 return
495493 }
496- const featureID : string | undefined = feature . attributes
497- . get ( 'gff_id' )
498- ?. toString ( )
494+ const featureID : string | undefined = feature . featureId ?. toString ( )
499495 if ( featureID && filteredTranscripts . includes ( featureID ) ) {
500496 return
501497 }
@@ -656,9 +652,7 @@ function getDraggableFeatureInfo(
656652 throw new Error ( 'featureTypeOntology is undefined' )
657653 }
658654 const isTranscript = featureTypeOntology . isTypeOf ( feature . type , 'transcript' )
659- const featureID : string | undefined = feature . attributes
660- . get ( 'gff_id' )
661- ?. toString ( )
655+ const featureID : string | undefined = feature . featureId ?. toString ( )
662656 if ( featureID && filteredTranscripts . includes ( featureID ) ) {
663657 return
664658 }
@@ -750,7 +744,7 @@ function drawTooltip(
750744 if ( ! position ) {
751745 return
752746 }
753- const featureID : string | undefined = attributes . get ( 'gff_id' ) ?. toString ( )
747+ const featureID : string | undefined = feature . featureId ?. toString ( )
754748 if ( featureID && filteredTranscripts . includes ( featureID ) ) {
755749 return
756750 }
@@ -862,9 +856,7 @@ function getContextMenuItems(
862856 }
863857
864858 for ( const feature of featuresUnderClick ) {
865- const featureID : string | undefined = feature . attributes
866- . get ( 'gff_id' )
867- ?. toString ( )
859+ const featureID : string | undefined = feature . featureId ?. toString ( )
868860 if ( featureID && filteredTranscripts . includes ( featureID ) ) {
869861 continue
870862 }
0 commit comments