Skip to content

Commit

Permalink
Handle case insensitive UTR
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Feb 20, 2025
1 parent b362a9f commit 11cb0d2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions plugins/gtf/src/GtfAdapter/GtfAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export default class GtfAdapter extends BaseFeatureDataAdapter {
}
}

Object.entries(parentAggregation).map(([name, subfeatures]) => {
for (const [name, subfeatures] of Object.entries(parentAggregation)) {
const s = min(subfeatures.map(f => f.start))
const e = max(subfeatures.map(f => f.end))
if (doesIntersect2(s, e, originalQuery.start, originalQuery.end)) {
Expand All @@ -232,7 +232,7 @@ export default class GtfAdapter extends BaseFeatureDataAdapter {
}),
)
}
})
}
}
observer.complete()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { SimpleFeature } from '@jbrowse/core/util'
import { observer } from 'mobx-react'

import Segments from './Segments'
import { layOutFeature, layOutSubfeatures } from './util'
import { isUTR, layOutFeature, layOutSubfeatures } from './util'

import type { ExtraGlyphValidator } from './util'
import type { AnyConfigurationModel } from '@jbrowse/core/configuration'
Expand All @@ -29,12 +29,6 @@ function filterSubpart(feature: Feature, config: AnyConfigurationModel) {
return makeSubpartsFilter('subParts', config)(feature)
}

function isUTR(feature: Feature) {
return /(\bUTR|_UTR|untranslated[_\s]region)\b/.test(
feature.get('type') || '',
)
}

function makeUTRs(parent: Feature, subs: Feature[]) {
// based on Lincoln's UTR-making code in
// Bio::Graphics::Glyph::processed_transcript
Expand Down
2 changes: 1 addition & 1 deletion plugins/svg/src/SvgFeatureRenderer/components/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export function layOutSubfeatures(args: SubfeatureLayOutArgs) {
}

export function isUTR(feature: Feature) {
return /(\bUTR|_UTR|untranslated[_\s]region)\b/.test(
return /(\bUTR|_UTR|untranslated[_\s]region)\b/i.test(
feature.get('type') || '',
)
}

0 comments on commit 11cb0d2

Please sign in to comment.