@jbrowse/plugin-bed 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.
@@ -42,7 +42,7 @@ declare const BedGraphTabixAdapter: import("@jbrowse/core/configuration/configur
42
42
  readonly uri: '/path/to/my.gz.tbi';
43
43
  readonly locationType: 'UriLocation';
44
44
  };
45
- 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.';
45
+ 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.';
46
46
  };
47
47
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
48
48
  /**
@@ -16,6 +16,11 @@ export declare function normalizeSnapshot(snap: Record<string, unknown>): Record
16
16
  * ```
17
17
  */
18
18
  declare const BedTabixAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
19
+ readonly densityAdapter: {
20
+ readonly type: 'frozen';
21
+ readonly defaultValue: null;
22
+ 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';
23
+ };
19
24
  /**
20
25
  * #slot
21
26
  * location of the bgzip-compressed BED, sorted by position. Must be bgzip
@@ -41,7 +46,7 @@ declare const BedTabixAdapter: import("@jbrowse/core/configuration/configuration
41
46
  readonly uri: '/path/to/my.gz.tbi';
42
47
  readonly locationType: 'UriLocation';
43
48
  };
44
- 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.';
49
+ 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.';
45
50
  };
46
51
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
47
52
  /**
@@ -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, 'bedGzLocation');
4
5
  }
@@ -63,6 +64,7 @@ const BedTabixAdapter = ConfigurationSchema('BedTabixAdapter', {
63
64
  description: 'Disable the heuristic that auto-detects BED12 features as gene/transcript structures. Useful for files that have BED12-like structure but are not genes (e.g. tandem duplications)',
64
65
  defaultValue: false,
65
66
  },
67
+ ...densityAdapterConfigSchemaFields,
66
68
  }, {
67
69
  explicitlyTyped: true,
68
70
  /**
@@ -14,6 +14,11 @@ export declare function normalizeSnapshot(snap: Record<string, unknown>): Record
14
14
  * ```
15
15
  */
16
16
  declare const BigBedAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
17
+ readonly densityAdapter: {
18
+ readonly type: 'frozen';
19
+ readonly defaultValue: null;
20
+ 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';
21
+ };
17
22
  /**
18
23
  * #slot
19
24
  * location of the BigBed file. It carries its own index and summary zoom
@@ -1,4 +1,5 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
+ import { densityAdapterConfigSchemaFields } from '@jbrowse/core/data_adapters/BaseAdapter';
2
3
  export function normalizeSnapshot(snap) {
3
4
  return snap.uri
4
5
  ? {
@@ -60,6 +61,7 @@ const BigBedAdapter = ConfigurationSchema('BigBedAdapter', {
60
61
  description: 'Disable the heuristic that auto-detects BED12 features as gene/transcript structures. Useful for files that have BED12-like structure but are not genes (e.g. tandem duplications)',
61
62
  defaultValue: false,
62
63
  },
64
+ ...densityAdapterConfigSchemaFields,
63
65
  }, {
64
66
  explicitlyTyped: true,
65
67
  /**
@@ -1,9 +1,23 @@
1
- // type guard: narrows input fields to required + non-zero when true
1
+ // type guard: narrows input fields to required when true
2
2
  // strand===0 means unstranded — likely not a gene
3
+ //
4
+ // Blocks are what make a transcript, and UCSC's own format definition calls
5
+ // them exons. Thickness says whether the transcript CODES, which is a separate
6
+ // axis: an lncRNA, a spliced EST and any other 12-column feature with
7
+ // thickStart===thickEnd is a transcript by every structural measure, so it is
8
+ // not tested here. `generateUcscTranscript` reads the same equality to emit
9
+ // exons and no CDS.
10
+ //
11
+ // This does conflate a spliced alignment with a transcript, deliberately: a
12
+ // bigPsl track (`est`, `intronEst`, `mrna`, `xenoMrna`, IsoSeq) has an empty
13
+ // thick range too, so it promotes where the same alignment as GFF3
14
+ // `cDNA_match` does not. BED12 carries no column that separates one from an
15
+ // lncRNA, and the promotion stays honest without one — no CDS children, so the
16
+ // sequence panel withholds CDS and protein and HGVS stays `n.`, and the type
17
+ // is `transcript` rather than `mRNA`.
3
18
  export function isUcscTranscript(input) {
4
19
  return (input.thickStart !== undefined &&
5
20
  input.thickEnd !== undefined &&
6
- input.thickStart !== input.thickEnd &&
7
21
  input.blockCount !== undefined &&
8
22
  input.blockCount > 0 &&
9
23
  input.strand !== undefined &&
@@ -43,8 +57,13 @@ export function generateUcscTranscript(data) {
43
57
  .sort((a, b) => a.start - b.start);
44
58
  const fiveUTR = strand > 0 ? 'five_prime_UTR' : 'three_prime_UTR';
45
59
  const threeUTR = strand > 0 ? 'three_prime_UTR' : 'five_prime_UTR';
60
+ // thickStart===thickEnd is UCSC for no coding region, and the block walk
61
+ // below cannot express that: a thick point inside a block would emit a
62
+ // zero-length CDS carrying a phase, and one outside every block would make
63
+ // the whole transcript UTR.
46
64
  const { cdsEndStat, cdsStartStat } = rest;
47
- if (cdsStartStat === 'none' && cdsEndStat === 'none') {
65
+ if (thickStart === thickEnd ||
66
+ (cdsStartStat === 'none' && cdsEndStat === 'none')) {
48
67
  return {
49
68
  ...rest,
50
69
  uniqueId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-bed",
3
- "version": "5.0.0-beta.1",
3
+ "version": "5.0.0-beta.3",
4
4
  "type": "module",
5
5
  "description": "JBrowse 2 bed adapters, tracks, etc.",
6
6
  "keywords": [
@@ -27,7 +27,7 @@
27
27
  "@jbrowse/mobx-state-tree": "^6.5.1",
28
28
  "mobx": "^7.0.3",
29
29
  "rxjs": "^7.8.2",
30
- "@jbrowse/core": "^5.0.0-beta.1"
30
+ "@jbrowse/core": "^5.0.0-beta.3"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"