@jbrowse/plugin-gtf 5.0.0-beta.1 → 5.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,7 +45,18 @@ export default class GtfTabixAdapter extends BaseFeatureDataAdapter {
45
45
  return ObservableCreate(async (observer) => {
46
46
  try {
47
47
  const { gtf, dontRedispatchSet } = await this.configure(opts);
48
- const lines = await readTabixLinesRedispatched(gtf, query, dontRedispatchSet, opts);
48
+ // The type list alone, and `opts.topLevelOnly` is deliberately not
49
+ // honoured — both for the same reason. A GTF line has no `ID`/`Parent`,
50
+ // so there is no cheap "can this have children"; and a GTF top-level
51
+ // feature is not a line at all, it is synthesized by
52
+ // `aggregateGtfFeatures` from the transcripts in the FETCHED set, whose
53
+ // span it takes from them. So the argument that lets GFF3 skip the
54
+ // flanks — a top-level feature overlapping the query is already in the
55
+ // query's own read — does not transfer, and a narrower bound could draw
56
+ // a gene short rather than merely flat. Nothing is lost by declining:
57
+ // no GTF record shape makes this bound expensive (the fixtures top out
58
+ // at 19 kb, against GFF3's chromosome-long `match`).
59
+ const lines = await readTabixLinesRedispatched(gtf, query, line => !dontRedispatchSet.has(line.type), opts);
49
60
  const feats = parseGtfToFeatures(lines, record => `${this.id}-offset-${record.offset}`);
50
61
  const aggregated = aggregateGtfFeatures({
51
62
  feats,
@@ -18,6 +18,11 @@ export declare function normalizeSnapshot(snap: Record<string, unknown>): Record
18
18
  * ```
19
19
  */
20
20
  declare const GtfTabixAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
21
+ readonly densityAdapter: {
22
+ readonly type: 'frozen';
23
+ readonly defaultValue: null;
24
+ readonly description: 'optional quantitative sub-adapter (e.g. a BigWigAdapter over a features-per-bin bigWig) drawn as a density band where the region is too large to fetch features; null disables it';
25
+ };
21
26
  /**
22
27
  * #slot
23
28
  * location of the bgzip-compressed GTF, sorted by position. Must be bgzip
@@ -43,7 +48,7 @@ declare const GtfTabixAdapter: import("@jbrowse/core/configuration/configuration
43
48
  readonly uri: '/path/to/my.gz.tbi';
44
49
  readonly locationType: 'UriLocation';
45
50
  };
46
- readonly description: 'location of the tabix index. Only needed when it is not named `<file>.tbi` (or `.csi`), which is what the `uri` shorthand assumes.';
51
+ readonly description: 'location of the tabix index. Only needed when it is not named `<file>.tbi`, which is what the `uri` shorthand assumes — a `.csi` beside the file is reached with `csi: true` rather than by spelling this out.';
47
52
  };
48
53
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
49
54
  /**
@@ -1,4 +1,5 @@
1
1
  import { ConfigurationSchema, expandTabixShorthand, tabixIndexFields, } from '@jbrowse/core/configuration';
2
+ import { densityAdapterConfigSchemaFields } from '@jbrowse/core/data_adapters/BaseAdapter';
2
3
  export function normalizeSnapshot(snap) {
3
4
  return expandTabixShorthand(snap, 'gtfGzLocation');
4
5
  }
@@ -64,6 +65,7 @@ const GtfTabixAdapter = ConfigurationSchema('GtfTabixAdapter', {
64
65
  description: 'attribute naming the parent gene that transcripts are aggregated into. transcripts are grouped by gene_id where the file has one (gene names are not unique within a reference), so this is the gene label, and the grouping key only for files with no gene_id',
65
66
  defaultValue: 'gene_name',
66
67
  },
68
+ ...densityAdapterConfigSchemaFields,
67
69
  }, {
68
70
  explicitlyTyped: true,
69
71
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-gtf",
3
- "version": "5.0.0-beta.1",
3
+ "version": "5.0.0-beta.3",
4
4
  "type": "module",
5
5
  "description": "JBrowse 2 gtf feature adapter",
6
6
  "keywords": [
@@ -24,7 +24,7 @@
24
24
  "@gmod/tabix": "^3.8.2",
25
25
  "@jbrowse/mobx-state-tree": "^6.5.1",
26
26
  "rxjs": "^7.8.2",
27
- "@jbrowse/core": "^5.0.0-beta.1"
27
+ "@jbrowse/core": "^5.0.0-beta.3"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": ">=19.0.0"