@jbrowse/launch-args 5.0.0-beta.17 → 5.0.0-beta.18

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.
@@ -0,0 +1,23 @@
1
+ // Generated by scripts/generateDisplaySlots.ts from the committed config
2
+ // schema — do not edit by hand. Regenerate with `pnpm autogen`.
3
+ /** Each display type's config slot paths, three segments deep, a list's members under its name. */
4
+ export const displaySlotPaths = {
5
+ ChordSyntenyDisplay: ["displayId", "mark", "mark.depth", "type"],
6
+ ChordVariantDisplay: ["displayId", "encoding", "encoding.color", "encoding.color.field", "encoding.color.legend", "encoding.color.scale", "encoding.color.value", "encoding.opacity", "encoding.opacity.value", "mark", "mark.depth", "onChordClick", "renderer", "strokeColor", "strokeColorHover", "strokeColorSelected", "type"],
7
+ DotplotDisplay: ["displayId", "renderer", "type"],
8
+ LDTrackDisplay: ["callRateFilter", "colorScheme", "displayId", "encoding", "encoding.color", "encoding.color.field", "encoding.color.legend", "encoding.color.scale", "fetchSizeLimit", "fitToHeight", "guides", "guides.show", "height", "heightMode", "hweFilterThreshold", "jexlFilters", "labels", "labels.name", "labels.name.show", "ldMetric", "legend", "legend.show", "lengthCutoffFilter", "lineZoneHeight", "maxDisplayedBpPerPx", "maxFeatureScreenDensity", "maxHeight", "minorAlleleFrequencyFilter", "mouseover", "recombinationZoneHeight", "showLDTriangle", "showLabels", "showLegend", "showRecombination", "showVerticalGuides", "signedLD", "tickHeight", "type", "useGenomicPositions", "variantLayout"],
9
+ LGVSyntenyDisplay: ["autoscale", "collapseSections", "colorBy", "colorScheme", "coverage", "coverage.alleles", "coverage.alleles.filter", "coverage.alleles.show", "coverage.encoding", "coverage.encoding.y", "coverage.height", "coverage.interbase", "coverage.interbase.filter", "coverage.interbase.show", "coverage.show", "data", "data.resolution", "defaultRendering", "displayId", "encoding", "encoding.color", "encoding.color.field", "encoding.color.legend", "encoding.color.scale", "encoding.color.value", "facet", "facet.field", "facet.hidden", "facet.sort", "featureHeight", "fetchSizeLimit", "filter", "filter.equal", "filter.field", "filter.gt", "filter.gte", "filter.lt", "filter.lte", "filter.oneOf", "filter.range", "filter.valid", "forceLoad", "growMaxHeight", "height", "heightMode", "hideLargeIndels", "hideMismatches", "hideSmallIndels", "inverted", "jexlFilters", "jitter", "legend", "legend.show", "lineWidth", "maxDisplayedBpPerPx", "maxFeatureScreenDensity", "maxHeight", "maxScore", "minScore", "minSubfeatureWidth", "mismatchAlpha", "mouseover", "multiTicks", "numStdDev", "pileup", "pileup.connectors", "pileup.connectors.show", "pileup.fadeLowFrequency", "pileup.mark", "pileup.mark.height", "pileup.maxLayoutHeight", "pileup.mismatches", "pileup.mismatches.encoding", "pileup.mismatches.show", "pileup.show", "pileup.softClips", "pileup.softClips.show", "pileupDisplay", "readConnections", "readConnections.encoding", "readConnections.encoding.color", "readConnections.encoding.strokeWidth", "readConnections.height", "readConnections.mark", "readConnections.mark.type", "readConnections.ordinaryPairs", "readConnections.ordinaryPairs.show", "readConnections.placement", "readConnections.show", "renderers", "scaleType", "snpCoverageDisplay", "sort", "sort.field", "sort.pos", "sort.refName", "sort.within", "type", "unit"],
10
+ LinearAlignmentsDisplay: ["autoscale", "collapseSections", "colorBy", "colorScheme", "coverage", "coverage.alleles", "coverage.alleles.filter", "coverage.alleles.show", "coverage.encoding", "coverage.encoding.y", "coverage.height", "coverage.interbase", "coverage.interbase.filter", "coverage.interbase.show", "coverage.show", "defaultRendering", "displayId", "encoding", "encoding.color", "encoding.color.field", "encoding.color.legend", "encoding.color.scale", "encoding.color.value", "facet", "facet.field", "facet.hidden", "facet.sort", "featureHeight", "fetchSizeLimit", "filter", "filter.equal", "filter.field", "filter.gt", "filter.gte", "filter.lt", "filter.lte", "filter.oneOf", "filter.range", "filter.valid", "forceLoad", "growMaxHeight", "height", "heightMode", "hideLargeIndels", "hideMismatches", "hideSmallIndels", "inverted", "jexlFilters", "jitter", "legend", "legend.show", "lineWidth", "maxDisplayedBpPerPx", "maxFeatureScreenDensity", "maxHeight", "maxScore", "minScore", "minSubfeatureWidth", "mismatchAlpha", "mouseover", "multiTicks", "numStdDev", "pileup", "pileup.bases", "pileup.bases.encoding", "pileup.bases.filter", "pileup.bases.show", "pileup.bases.unmodified", "pileup.connectors", "pileup.connectors.show", "pileup.fadeLowFrequency", "pileup.mark", "pileup.mark.height", "pileup.maxLayoutHeight", "pileup.mismatches", "pileup.mismatches.encoding", "pileup.mismatches.show", "pileup.show", "pileup.softClips", "pileup.softClips.show", "pileupDisplay", "readConnections", "readConnections.encoding", "readConnections.encoding.color", "readConnections.encoding.strokeWidth", "readConnections.height", "readConnections.mark", "readConnections.mark.type", "readConnections.ordinaryPairs", "readConnections.ordinaryPairs.show", "readConnections.placement", "readConnections.show", "renderers", "sashimi", "sashimi.height", "sashimi.labels", "sashimi.labels.show", "sashimi.placement", "sashimi.show", "scaleType", "snpCoverageDisplay", "sort", "sort.field", "sort.pos", "sort.refName", "sort.within", "type", "unit"],
11
+ LinearBasicDisplay: ["chevrons", "chevrons.show", "color1", "color2", "color3", "containerTypes", "containers", "containers.types", "displayId", "displayMode", "encoding", "encoding.color", "encoding.color.field", "encoding.color.legend", "encoding.color.scale", "encoding.color.value", "facet", "facet.field", "facet.hidden", "facet.sort", "featureHeight", "fetchSizeLimit", "filter", "filter.equal", "filter.field", "filter.gt", "filter.gte", "filter.lt", "filter.lte", "filter.oneOf", "filter.range", "filter.valid", "forceLoad", "geneGlyphMode", "growMaxHeight", "height", "heightMode", "impliedUTRs", "jexlFilters", "labels", "labels.description", "labels.description.field", "labels.description.show", "labels.name", "labels.name.field", "labels.name.show", "labels.subfeatures", "labels.subfeatures.placement", "labels.subfeatures.show", "legend", "legend.show", "mark", "mark.height", "maxDisplayedBpPerPx", "maxFeatureScreenDensity", "maxHeight", "mouseover", "outline", "renderer", "showDescriptions", "showLabels", "subfeatureLabels", "tooltip", "tooltip.field", "tooltip.show", "transcriptTypes", "transcripts", "transcripts.field", "transcripts.sort", "transcripts.types", "type", "utrs", "utrs.encoding", "utrs.encoding.color"],
12
+ LinearHicDisplay: ["data", "data.normalization", "data.resolution", "displayId", "encoding", "encoding.color", "encoding.color.field", "encoding.color.legend", "encoding.color.scale", "fetchSizeLimit", "filter", "filter.equal", "filter.field", "filter.gt", "filter.gte", "filter.lt", "filter.lte", "filter.oneOf", "filter.range", "filter.valid", "height", "heightMode", "jexlFilters", "legend", "legend.show", "maxDisplayedBpPerPx", "maxFeatureScreenDensity", "mouseover", "renderer", "type"],
13
+ LinearMafDisplay: ["alignments", "alignments.bases", "alignments.bases.encoding", "alignments.bases.show", "alignments.frames", "alignments.frames.show", "alignments.inversions", "alignments.inversions.show", "alignments.mismatches", "alignments.mismatches.show", "alignments.reference", "alignments.reference.show", "alignments.rowProportion", "alignments.show", "axis", "axis.branchLength", "axis.labels", "axis.tree", "axis.width", "conservation", "conservation.height", "conservation.show", "conservation.unit", "coverage", "coverage.alleles", "coverage.alleles.filter", "coverage.alleles.show", "coverage.encoding", "coverage.encoding.y", "coverage.height", "coverage.interbase", "coverage.interbase.filter", "coverage.interbase.show", "coverage.show", "displayId", "encoding", "encoding.color", "encoding.color.field", "encoding.color.legend", "encoding.color.scale", "encoding.color.value", "encoding.y", "encoding.y.field", "fetchSizeLimit", "forceLoad", "height", "jexlFilters", "legend", "legend.show", "maxDisplayedBpPerPx", "maxFeatureScreenDensity", "mouseover", "rowColor", "rowColor.field", "rowColor.scale", "rowColor.scale.domain", "rowColor.scale.range", "rowColor.scale.unknown", "rowHeight", "rows", "rows.field", "rows.kept", "rows.labels", "rows.sort", "rows.tree", "rows.treeProvenance", "type"],
14
+ LinearManhattanDisplay: ["axis", "axis.branchLength", "axis.grid", "axis.labels", "axis.tree", "axis.width", "displayId", "encoding", "encoding.color", "encoding.color.field", "encoding.color.legend", "encoding.color.scale", "encoding.color.value", "encoding.y", "encoding.y.axis", "encoding.y.rules", "encoding.y.scale", "facet", "facet.field", "facet.hidden", "facet.sort", "facet.transform", "facet.transform.as", "facet.transform.expr", "facet.transform.field", "facet.transform.fields", "facet.transform.frame", "facet.transform.groupby", "facet.transform.index", "facet.transform.keepEmpty", "facet.transform.key", "facet.transform.ops", "facet.transform.padding", "facet.transform.step", "facet.transform.type", "fetchSizeLimit", "filter", "filter.equal", "filter.field", "filter.gt", "filter.gte", "filter.lt", "filter.lte", "filter.oneOf", "filter.range", "filter.valid", "forceLoad", "height", "jexlFilters", "legend", "legend.show", "marks", "marks.encoding", "marks.encoding.color", "marks.encoding.row", "marks.encoding.shape", "marks.encoding.size", "marks.encoding.strokeWidth", "marks.encoding.text", "marks.encoding.x", "marks.encoding.x2", "marks.encoding.y", "marks.mark", "marks.mark.gapBp", "marks.mark.height", "marks.mark.interpolate", "marks.mark.type", "marks.maxBpPerPx", "marks.minBpPerPx", "marks.transform", "marks.transform.as", "marks.transform.expr", "marks.transform.field", "marks.transform.fields", "marks.transform.frame", "marks.transform.groupby", "marks.transform.index", "marks.transform.keepEmpty", "marks.transform.key", "marks.transform.ops", "marks.transform.padding", "marks.transform.step", "marks.transform.type", "maxDisplayedBpPerPx", "maxFeatureScreenDensity", "mouseover", "origin", "rowColor", "rowColor.field", "rowColor.scale", "rowColor.scale.domain", "rowColor.scale.range", "rowColor.scale.unknown", "rowGroups", "rowGroups.group", "rowGroups.match", "rowHeight", "rows", "rows.field", "rows.kept", "rows.labels", "rows.sort", "rows.tree", "rows.treeProvenance", "transform", "transform.as", "transform.expr", "transform.field", "transform.fields", "transform.frame", "transform.groupby", "transform.index", "transform.keepEmpty", "transform.key", "transform.ops", "transform.ops.as", "transform.ops.field", "transform.ops.op", "transform.ops.weight", "transform.padding", "transform.step", "transform.type", "type"],
15
+ LinearMarkDisplay: ["axis", "axis.branchLength", "axis.grid", "axis.labels", "axis.tree", "axis.width", "color", "displayId", "encoding", "encoding.color", "encoding.color.field", "encoding.color.legend", "encoding.color.scale", "encoding.color.value", "encoding.y", "encoding.y.axis", "encoding.y.rules", "encoding.y.scale", "facet", "facet.field", "facet.hidden", "facet.sort", "facet.transform", "facet.transform.as", "facet.transform.expr", "facet.transform.field", "facet.transform.fields", "facet.transform.frame", "facet.transform.groupby", "facet.transform.index", "facet.transform.keepEmpty", "facet.transform.key", "facet.transform.ops", "facet.transform.padding", "facet.transform.step", "facet.transform.type", "fetchSizeLimit", "filter", "filter.equal", "filter.field", "filter.gt", "filter.gte", "filter.lt", "filter.lte", "filter.oneOf", "filter.range", "filter.valid", "forceLoad", "height", "jexlFilters", "legend", "legend.show", "marks", "marks.encoding", "marks.encoding.color", "marks.encoding.row", "marks.encoding.shape", "marks.encoding.size", "marks.encoding.strokeWidth", "marks.encoding.text", "marks.encoding.x", "marks.encoding.x2", "marks.encoding.y", "marks.mark", "marks.mark.gapBp", "marks.mark.height", "marks.mark.interpolate", "marks.mark.type", "marks.maxBpPerPx", "marks.minBpPerPx", "marks.transform", "marks.transform.as", "marks.transform.expr", "marks.transform.field", "marks.transform.fields", "marks.transform.frame", "marks.transform.groupby", "marks.transform.index", "marks.transform.keepEmpty", "marks.transform.key", "marks.transform.ops", "marks.transform.padding", "marks.transform.step", "marks.transform.type", "maxDisplayedBpPerPx", "maxFeatureScreenDensity", "mouseover", "origin", "renderer", "rowColor", "rowColor.field", "rowColor.scale", "rowColor.scale.domain", "rowColor.scale.range", "rowColor.scale.unknown", "rowGroups", "rowGroups.group", "rowGroups.match", "rowHeight", "rows", "rows.field", "rows.kept", "rows.labels", "rows.sort", "rows.tree", "rows.treeProvenance", "transform", "transform.as", "transform.expr", "transform.field", "transform.fields", "transform.frame", "transform.groupby", "transform.index", "transform.keepEmpty", "transform.key", "transform.ops", "transform.ops.as", "transform.ops.field", "transform.ops.op", "transform.ops.weight", "transform.padding", "transform.step", "transform.type", "type"],
16
+ LinearMultiRowFeatureDisplay: ["axis", "axis.branchLength", "axis.grid", "axis.labels", "axis.tree", "axis.width", "displayId", "encoding", "encoding.color", "encoding.color.field", "encoding.color.legend", "encoding.color.scale", "encoding.color.value", "encoding.y", "encoding.y.axis", "encoding.y.rules", "encoding.y.scale", "facet", "facet.field", "facet.hidden", "facet.sort", "facet.transform", "facet.transform.as", "facet.transform.expr", "facet.transform.field", "facet.transform.fields", "facet.transform.frame", "facet.transform.groupby", "facet.transform.index", "facet.transform.keepEmpty", "facet.transform.key", "facet.transform.ops", "facet.transform.padding", "facet.transform.step", "facet.transform.type", "fetchSizeLimit", "filter", "filter.equal", "filter.field", "filter.gt", "filter.gte", "filter.lt", "filter.lte", "filter.oneOf", "filter.range", "filter.valid", "forceLoad", "height", "jexlFilters", "legend", "legend.show", "marks", "marks.encoding", "marks.encoding.color", "marks.encoding.row", "marks.encoding.shape", "marks.encoding.size", "marks.encoding.strokeWidth", "marks.encoding.text", "marks.encoding.x", "marks.encoding.x2", "marks.encoding.y", "marks.mark", "marks.mark.gapBp", "marks.mark.height", "marks.mark.interpolate", "marks.mark.type", "marks.maxBpPerPx", "marks.minBpPerPx", "marks.transform", "marks.transform.as", "marks.transform.expr", "marks.transform.field", "marks.transform.fields", "marks.transform.frame", "marks.transform.groupby", "marks.transform.index", "marks.transform.keepEmpty", "marks.transform.key", "marks.transform.ops", "marks.transform.padding", "marks.transform.step", "marks.transform.type", "maxDisplayedBpPerPx", "maxFeatureScreenDensity", "mouseover", "origin", "rowColor", "rowColor.field", "rowColor.scale", "rowColor.scale.domain", "rowColor.scale.range", "rowColor.scale.unknown", "rowGroups", "rowGroups.group", "rowGroups.match", "rowHeight", "rows", "rows.field", "rows.kept", "rows.labels", "rows.sort", "rows.tree", "rows.treeProvenance", "transform", "transform.as", "transform.expr", "transform.field", "transform.fields", "transform.frame", "transform.groupby", "transform.index", "transform.keepEmpty", "transform.key", "transform.ops", "transform.ops.as", "transform.ops.field", "transform.ops.op", "transform.ops.weight", "transform.padding", "transform.step", "transform.type", "type"],
17
+ LinearMultiSampleVariantDisplay: ["autoscale", "axis", "axis.branchLength", "axis.grid", "axis.labels", "axis.tree", "axis.width", "colorBy", "displayId", "encoding", "encoding.color", "encoding.color.field", "encoding.color.legend", "encoding.color.scale", "encoding.color.value", "facet", "facet.field", "facet.sort", "fetchSizeLimit", "filter", "filter.equal", "filter.field", "filter.gt", "filter.gte", "filter.lt", "filter.lte", "filter.oneOf", "filter.range", "filter.valid", "forceLoad", "height", "inverted", "jexlFilters", "legend", "legend.show", "lineZoneHeight", "maxDisplayedBpPerPx", "maxFeatureScreenDensity", "maxScore", "minScore", "minimalTicks", "minorAlleleFrequencyFilter", "mouseover", "numStdDev", "referenceDrawingMode", "renderingMode", "rowColor", "rowColor.field", "rowColor.scale", "rowColor.scale.domain", "rowColor.scale.range", "rowColor.scale.unknown", "rowHeight", "rows", "rows.field", "rows.kept", "rows.labels", "rows.sort", "rows.tree", "rows.treeProvenance", "scaleType", "shadeByDosage", "showReferenceAlleles", "showSidebarLabels", "showTree", "tooltip", "tooltip.show", "type", "unit", "variantLayout"],
18
+ LinearReferenceSequenceDisplay: ["displayId", "fetchSizeLimit", "forceLoad", "forward", "forward.show", "height", "renderer", "reverse", "reverse.show", "translation", "translation.show", "type"],
19
+ LinearSyntenyDisplay: ["displayId", "middle", "renderer", "type"],
20
+ LinearVariantDisplay: ["color1", "color2", "color3", "containerTypes", "displayId", "displayMode", "encoding", "encoding.color", "encoding.color.field", "encoding.color.legend", "encoding.color.scale", "encoding.color.value", "facet", "facet.field", "facet.hidden", "facet.sort", "featureHeight", "fetchSizeLimit", "filter", "filter.equal", "filter.field", "filter.gt", "filter.gte", "filter.lt", "filter.lte", "filter.oneOf", "filter.range", "filter.valid", "forceLoad", "growMaxHeight", "height", "heightMode", "impliedUTRs", "jexlFilters", "labels", "labels.description", "labels.description.field", "labels.description.show", "labels.name", "labels.name.field", "labels.name.show", "legend", "legend.show", "mark", "mark.height", "maxDisplayedBpPerPx", "maxFeatureScreenDensity", "maxHeight", "mouseover", "outline", "renderer", "showDescriptions", "showLabels", "subfeatureLabels", "tooltip", "tooltip.field", "tooltip.show", "transcriptTypes", "type"],
21
+ LinearWiggleDisplay: ["autoscale", "axis", "axis.branchLength", "axis.grid", "axis.labels", "axis.tree", "axis.width", "data", "data.resolution", "defaultRendering", "displayCrossHatches", "displayId", "encoding", "encoding.color", "encoding.color.field", "encoding.color.legend", "encoding.color.scale", "encoding.color.value", "encoding.size", "encoding.size.value", "encoding.strokeWidth", "encoding.strokeWidth.value", "encoding.y", "encoding.y.axis", "encoding.y.field", "encoding.y.rules", "encoding.y.scale", "extent", "fetchSizeLimit", "height", "inverted", "jexlFilters", "legend", "legend.show", "mark", "mark.extent", "mark.interpolate", "mark.type", "maxDisplayedBpPerPx", "maxFeatureScreenDensity", "maxScore", "minScore", "minimalTicks", "mouseover", "numStdDev", "origin", "renderers", "rowColor", "rowColor.field", "rowColor.scale", "rowColor.scale.domain", "rowColor.scale.range", "rowColor.scale.unknown", "rows", "rows.field", "rows.kept", "rows.labels", "rows.sort", "rows.tree", "rows.treeProvenance", "scaleType", "type"],
22
+ MultiWaySyntenyDisplay: ["axis", "axis.show", "data", "data.resolution", "displayId", "encoding", "encoding.color", "encoding.color.field", "encoding.color.legend", "encoding.color.scale", "encoding.color.value", "fetchSizeLimit", "forceLoad", "height", "jexlFilters", "labels", "labels.lanes", "labels.lanes.placement", "labels.name", "labels.name.field", "labels.name.show", "laneGeneTracks", "laneLayers", "laneLayers.adapter", "laneLayers.adapter.baseUri", "laneLayers.adapter.type", "laneLayers.adapter.uri", "laneLayers.height", "laneLayers.marks", "laneLayers.marks.encoding", "laneLayers.marks.mark", "laneLayers.marks.maxBpPerPx", "laneLayers.marks.minBpPerPx", "laneLayers.marks.transform", "laneLayers.name", "laneLayers.tracks", "legend", "legend.show", "maxDisplayedBpPerPx", "maxFeatureScreenDensity", "mouseover", "ribbons", "ribbons.encoding", "ribbons.encoding.color", "ribbons.encoding.opacity", "ribbons.filter", "ribbons.filter.equal", "ribbons.filter.field", "ribbons.filter.gt", "ribbons.filter.gte", "ribbons.filter.lt", "ribbons.filter.lte", "ribbons.filter.oneOf", "ribbons.filter.range", "ribbons.filter.valid", "ribbons.mark", "ribbons.mark.interpolate", "rows", "rows.field", "rows.kept", "rows.labels", "rows.sort", "rows.tree", "rows.treeProvenance", "type", "utrs", "utrs.encoding", "utrs.encoding.color"],
23
+ };
@@ -33,6 +33,8 @@ export declare function guessTrack({ location, index, bed1, bed2, adapterType, m
33
33
  adapter: Adapter;
34
34
  files: (string | undefined)[];
35
35
  };
36
+ /** The adapter a file's name says, without looking for its index. */
37
+ export declare function adapterTypeByName(file: string): string | undefined;
36
38
  export declare function guessTrackType(adapterType: string, location?: string): string;
37
39
  export declare const syntenyAdapterTypes: Set<string>;
38
40
  export {};
@@ -139,6 +139,11 @@ export function guessTrack({ location, index, bed1, bed2, adapterType, mapLocati
139
139
  }
140
140
  return { adapter: { type: typeOverride ?? 'UNKNOWN' }, files: [] };
141
141
  }
142
+ /** The adapter a file's name says, without looking for its index. */
143
+ export function adapterTypeByName(file) {
144
+ const spec = matchFormat(fileNameOf(file))?.spec;
145
+ return spec && 'adapterType' in spec ? spec.adapterType : undefined;
146
+ }
142
147
  export function guessTrackType(adapterType, location) {
143
148
  return (trackTypeForAdapter(adapterType, location && fileNameOf(location)) ||
144
149
  'FeatureTrack');
@@ -13,27 +13,33 @@ export interface Track {
13
13
  [key: string]: unknown;
14
14
  }
15
15
  /**
16
- * A command-line file as a JBrowse location: a URL (http, s3, ftp, …) is a
17
- * `uri`, anything else a local path.
16
+ * A command-line file as a JBrowse location: a URL is a `uri`, anything else a
17
+ * local path.
18
18
  */
19
19
  export declare function makeLocation(file: string): Location;
20
20
  /**
21
- * The adapter each typed track flag names. `--bam reads` opens `reads` as BAM
22
- * whatever its name says, and `--file reads.bam` (or a bare `reads.bam`) types
23
- * it by name; both build through the add-track format table.
21
+ * The formats each typed track flag reads, each as the adapters for a plain
22
+ * file and its bgzipped, tabix-indexed form. `--vcf calls` opens a name that
23
+ * says none of a flag's formats as its first, `--gff genes.gtf` the format the
24
+ * name says, and `--bed reads.bam` throws. Both build through the add-track
25
+ * format table.
24
26
  */
25
- export declare const trackFlagAdapters: {
26
- readonly bam: 'BamAdapter';
27
- readonly cram: 'CramAdapter';
28
- readonly bigwig: 'BigWigAdapter';
29
- readonly vcfgz: 'VcfTabixAdapter';
30
- readonly gffgz: 'Gff3TabixAdapter';
31
- readonly hic: 'HicAdapter';
32
- readonly bigbed: 'BigBedAdapter';
33
- readonly bedgz: 'BedTabixAdapter';
27
+ export declare const trackFlagFormats: {
28
+ readonly bam: readonly [readonly ["BamAdapter"]];
29
+ readonly cram: readonly [readonly ["CramAdapter"]];
30
+ readonly bigwig: readonly [readonly ["BigWigAdapter"]];
31
+ readonly bigbed: readonly [readonly ["BigBedAdapter"]];
32
+ readonly hic: readonly [readonly ["HicAdapter"]];
33
+ readonly vcf: readonly [readonly ["VcfAdapter", "VcfTabixAdapter"]];
34
+ readonly gff: readonly [readonly ["Gff3Adapter", "Gff3TabixAdapter"], readonly ["GtfAdapter", "GtfTabixAdapter"]];
35
+ readonly bed: readonly [readonly ["BedAdapter", "BedTabixAdapter"], readonly ["BedGraphAdapter", "BedGraphTabixAdapter"], readonly ["BedpeAdapter"]];
34
36
  };
35
- export type TrackFlag = keyof typeof trackFlagAdapters;
37
+ export type TrackFlag = keyof typeof trackFlagFormats;
36
38
  export declare const trackFlags: TrackFlag[];
39
+ export declare function isTrackFlag(flag: string): flag is TrackFlag;
40
+ /** The flags that open a genome file. */
41
+ export declare const genomeFlags: readonly ['fasta', 'chromSizes'];
42
+ export declare function isGenomeFlag(flag: string): boolean;
37
43
  /**
38
44
  * The adapter for one file argument: `adapterType`'s when given, else the one
39
45
  * its name says. Its index is found beside it unless `index` names one. Throws
@@ -43,7 +49,9 @@ export declare function fileAdapter(file: string, { adapterType, index }?: {
43
49
  adapterType?: string;
44
50
  index?: string;
45
51
  }): Adapter;
46
- export declare function isSequenceAdapter(adapter: Adapter): boolean;
52
+ export declare function isSequenceAdapter({ type }: {
53
+ type: string;
54
+ }): boolean;
47
55
  /**
48
56
  * An assembly from a sequence file's adapter, named after the file, with the
49
57
  * `aliases:` and `cytobands:` files a modifier or flag gives it.
@@ -53,6 +61,17 @@ export declare function sequenceAssembly(adapter: Adapter, file: string, { alias
53
61
  cytobands?: string;
54
62
  trackId?: string;
55
63
  }): Assembly;
64
+ /**
65
+ * The assembly a genome argument opens, `--fasta ref.fa`, `--chromSizes
66
+ * a.sizes` or a bare genome file, with the files its `aliases:` and
67
+ * `cytobands:` modifiers name. `--fasta` opens a name the format table does not
68
+ * know as an indexed FASTA. `unused` is the modifiers it has no use for, for
69
+ * the caller to report.
70
+ */
71
+ export declare function genomeAssembly(flag: string, [file, ...mods]: string[], trackId?: string): {
72
+ assembly: Assembly;
73
+ unused: string[];
74
+ };
56
75
  /**
57
76
  * A track for one file argument, labelled by `name:` or the file's basename.
58
77
  * Without `assemblyName` it names no assembly, for a caller that learns the
package/esm/fileInput.js CHANGED
@@ -1,34 +1,65 @@
1
- import path from 'node:path';
2
- import { guessTrack, guessTrackType } from './fileAdapter.js';
3
- import { FILE_FLAG, modifierValue } from './parseArgv.js';
4
- const URL_SCHEME = /^[a-z][a-z0-9+.-]*:\/\//i;
1
+ import { fileNameOf } from '@jbrowse/add-track-core';
2
+ import { adapterTypeByName, guessTrack, guessTrackType } from './fileAdapter.js';
3
+ import { FILE_FLAG, isDataFile, isUrl, modifierValue, splitModifier, } from './parseArgv.js';
5
4
  /**
6
- * A command-line file as a JBrowse location: a URL (http, s3, ftp, …) is a
7
- * `uri`, anything else a local path.
5
+ * A command-line file as a JBrowse location: a URL is a `uri`, anything else a
6
+ * local path.
8
7
  */
9
8
  export function makeLocation(file) {
10
- return URL_SCHEME.test(file)
9
+ return isUrl(file)
11
10
  ? { uri: file, locationType: 'UriLocation' }
12
11
  : { localPath: file, locationType: 'LocalPathLocation' };
13
12
  }
14
13
  /**
15
- * The adapter each typed track flag names. `--bam reads` opens `reads` as BAM
16
- * whatever its name says, and `--file reads.bam` (or a bare `reads.bam`) types
17
- * it by name; both build through the add-track format table.
14
+ * The formats each typed track flag reads, each as the adapters for a plain
15
+ * file and its bgzipped, tabix-indexed form. `--vcf calls` opens a name that
16
+ * says none of a flag's formats as its first, `--gff genes.gtf` the format the
17
+ * name says, and `--bed reads.bam` throws. Both build through the add-track
18
+ * format table.
18
19
  */
19
- export const trackFlagAdapters = {
20
- bam: 'BamAdapter',
21
- cram: 'CramAdapter',
22
- bigwig: 'BigWigAdapter',
23
- vcfgz: 'VcfTabixAdapter',
24
- gffgz: 'Gff3TabixAdapter',
25
- hic: 'HicAdapter',
26
- bigbed: 'BigBedAdapter',
27
- bedgz: 'BedTabixAdapter',
20
+ export const trackFlagFormats = {
21
+ bam: [['BamAdapter']],
22
+ cram: [['CramAdapter']],
23
+ bigwig: [['BigWigAdapter']],
24
+ bigbed: [['BigBedAdapter']],
25
+ hic: [['HicAdapter']],
26
+ vcf: [['VcfAdapter', 'VcfTabixAdapter']],
27
+ gff: [
28
+ ['Gff3Adapter', 'Gff3TabixAdapter'],
29
+ ['GtfAdapter', 'GtfTabixAdapter'],
30
+ ],
31
+ bed: [
32
+ ['BedAdapter', 'BedTabixAdapter'],
33
+ ['BedGraphAdapter', 'BedGraphTabixAdapter'],
34
+ ['BedpeAdapter'],
35
+ ],
28
36
  };
29
- export const trackFlags = Object.keys(trackFlagAdapters);
30
- function isTrackFlag(flag) {
31
- return flag in trackFlagAdapters;
37
+ export const trackFlags = Object.keys(trackFlagFormats);
38
+ export function isTrackFlag(flag) {
39
+ return Object.hasOwn(trackFlagFormats, flag);
40
+ }
41
+ /** The flags that open a genome file. */
42
+ export const genomeFlags = ['fasta', 'chromSizes'];
43
+ export function isGenomeFlag(flag) {
44
+ return genomeFlags.includes(flag);
45
+ }
46
+ const allFormats = trackFlags.flatMap(flag => trackFlagFormats[flag]);
47
+ function formatOf(formats, adapterType) {
48
+ return formats.find(format => format.includes(adapterType));
49
+ }
50
+ // The format the name says, or a typed flag's first for a name that says none
51
+ // of the track flags' formats; then its tabix adapter for a `.gz` name or a
52
+ // named index. Undefined leaves a bare file to the adapter its name says.
53
+ function chosenAdapterType(flag, file, index) {
54
+ const byName = adapterTypeByName(file) ?? '';
55
+ const own = isTrackFlag(flag) ? trackFlagFormats[flag] : allFormats;
56
+ const other = trackFlags.find(f => f !== flag && formatOf(trackFlagFormats[f], byName));
57
+ if (isTrackFlag(flag) && !formatOf(own, byName) && other) {
58
+ throw new Error(`--${flag} ${file}: its name says a ${other} file, which --${flag} does not read; pass it bare or as --${other}`);
59
+ }
60
+ const format = formatOf(own, byName) ?? (isTrackFlag(flag) ? own[0] : undefined);
61
+ const tabix = !!index || /\.b?gz$/i.test(file);
62
+ return format && (format[tabix ? 1 : 0] ?? format[0]);
32
63
  }
33
64
  const SEQUENCE_TRACK = 'ReferenceSequenceTrack';
34
65
  /**
@@ -37,7 +68,7 @@ const SEQUENCE_TRACK = 'ReferenceSequenceTrack';
37
68
  * for a file the format table cannot type, naming the flags that would.
38
69
  */
39
70
  export function fileAdapter(file, { adapterType, index } = {}) {
40
- const { adapter } = guessTrack({
71
+ const { adapter, files } = guessTrack({
41
72
  location: file,
42
73
  index,
43
74
  adapterType,
@@ -46,10 +77,13 @@ export function fileAdapter(file, { adapterType, index } = {}) {
46
77
  if (adapter.type === 'UNKNOWN' || adapter.type === 'UNSUPPORTED') {
47
78
  throw new Error(`JBrowse cannot tell what kind of file ${file} is from its name. Name its type with a flag: ${trackFlags.map(f => `--${f}`).join(', ')}`);
48
79
  }
80
+ else if (index && !files.includes(index)) {
81
+ throw new Error(`${file} opens with ${adapter.type}, which reads no index, so index:${index} applies to nothing`);
82
+ }
49
83
  return adapter;
50
84
  }
51
- export function isSequenceAdapter(adapter) {
52
- return guessTrackType(adapter.type) === SEQUENCE_TRACK;
85
+ export function isSequenceAdapter({ type }) {
86
+ return guessTrackType(type) === SEQUENCE_TRACK;
53
87
  }
54
88
  /**
55
89
  * An assembly from a sequence file's adapter, named after the file, with the
@@ -57,7 +91,7 @@ export function isSequenceAdapter(adapter) {
57
91
  */
58
92
  export function sequenceAssembly(adapter, file, { aliases, cytobands, trackId = 'refseq', } = {}) {
59
93
  return {
60
- name: path.basename(file).replace(/\.(chrom\.)?sizes$/i, ''),
94
+ name: fileNameOf(file).replace(/\.(chrom\.)?sizes$/i, ''),
61
95
  sequence: { type: SEQUENCE_TRACK, trackId, adapter },
62
96
  ...(aliases
63
97
  ? {
@@ -81,6 +115,37 @@ export function sequenceAssembly(adapter, file, { aliases, cytobands, trackId =
81
115
  : {}),
82
116
  };
83
117
  }
118
+ const GENOME_MODIFIERS = new Set(['aliases', 'cytobands']);
119
+ /**
120
+ * The assembly a genome argument opens, `--fasta ref.fa`, `--chromSizes
121
+ * a.sizes` or a bare genome file, with the files its `aliases:` and
122
+ * `cytobands:` modifiers name. `--fasta` opens a name the format table does not
123
+ * know as an indexed FASTA. `unused` is the modifiers it has no use for, for
124
+ * the caller to report.
125
+ */
126
+ export function genomeAssembly(flag, [file, ...mods], trackId) {
127
+ if (!file) {
128
+ throw new Error(`--${flag} requires a file argument`);
129
+ }
130
+ const adapter = fileAdapter(file, {
131
+ adapterType: flag === 'chromSizes'
132
+ ? 'ChromSizesAdapter'
133
+ : flag === 'fasta' && !isDataFile(file)
134
+ ? 'IndexedFastaAdapter'
135
+ : undefined,
136
+ });
137
+ if (!isSequenceAdapter(adapter)) {
138
+ throw new Error(`--${flag} ${file} is not a genome: a FASTA, 2bit or .chrom.sizes file`);
139
+ }
140
+ return {
141
+ assembly: sequenceAssembly(adapter, file, {
142
+ aliases: modifierValue(mods, 'aliases'),
143
+ cytobands: modifierValue(mods, 'cytobands'),
144
+ trackId,
145
+ }),
146
+ unused: mods.filter(mod => !GENOME_MODIFIERS.has(splitModifier(mod)?.[0] ?? '')),
147
+ };
148
+ }
84
149
  /**
85
150
  * A track for one file argument, labelled by `name:` or the file's basename.
86
151
  * Without `assemblyName` it names no assembly, for a caller that learns the
@@ -93,17 +158,18 @@ export function fileTrack(flag, [file, ...mods], assemblyName) {
93
158
  if (!isTrackFlag(flag) && flag !== FILE_FLAG) {
94
159
  throw new Error(`--${flag} is not a file flag`);
95
160
  }
161
+ const index = modifierValue(mods, 'index');
96
162
  const adapter = fileAdapter(file, {
97
- adapterType: isTrackFlag(flag) ? trackFlagAdapters[flag] : undefined,
98
- index: modifierValue(mods, 'index'),
163
+ adapterType: chosenAdapterType(flag, file, index),
164
+ index,
99
165
  });
100
166
  if (isSequenceAdapter(adapter)) {
101
167
  throw new Error(`${file} is a genome, and this view already has one; open one genome per view`);
102
168
  }
103
169
  return {
104
170
  type: guessTrackType(adapter.type, file),
105
- trackId: path.basename(file),
106
- name: modifierValue(mods, 'name') ?? path.basename(file),
171
+ trackId: fileNameOf(file),
172
+ name: modifierValue(mods, 'name') ?? fileNameOf(file),
107
173
  ...(assemblyName ? { assemblyNames: [assemblyName] } : {}),
108
174
  adapter,
109
175
  };
@@ -0,0 +1,39 @@
1
+ import type { ComparativeRow } from './comparative.ts';
2
+ import type { Track } from './fileInput.ts';
3
+ type NamedAssembly = {
4
+ name: string;
5
+ } & Record<string, unknown>;
6
+ export interface TextSearchAdapter {
7
+ type: string;
8
+ assemblyNames?: string[];
9
+ [key: string]: unknown;
10
+ }
11
+ /**
12
+ * The parts of a genomes.jbrowse.org config.json a comparative view reads, with
13
+ * the assembly type the caller holds them as.
14
+ */
15
+ export interface HostedConfig<A extends {
16
+ name: string;
17
+ } = NamedAssembly> {
18
+ assemblies?: A[];
19
+ tracks?: Track[];
20
+ aggregateTextSearchAdapters?: TextSearchAdapter[];
21
+ }
22
+ /**
23
+ * What a comparative view's `--genome` rows take from their hosted configs,
24
+ * keyed by genome name: each genome's assembly, its gene-name search, so a row's
25
+ * `loc:` can name a gene, and a comparison for each gap beside a hosted row
26
+ * that no comparison file fills.
27
+ *
28
+ * A config holds the comparisons its genome is the target of, so a pair is
29
+ * often hosted twice, once in each direction; the upper row's config wins, and
30
+ * the gap draws one comparison. A gap neither config covers throws.
31
+ */
32
+ export declare function hostedComparative<A extends {
33
+ name: string;
34
+ }>(rows: ComparativeRow[], fileTracks: Track[], configs: ReadonlyMap<string, HostedConfig<A>>): {
35
+ assemblies: A[];
36
+ textSearchAdapters: TextSearchAdapter[];
37
+ tracks: Track[];
38
+ };
39
+ export {};
@@ -0,0 +1,45 @@
1
+ // order-free, as a track's [query, target] follows its file format; a self
2
+ // pair names the assembly twice
3
+ function compares(track, a, b) {
4
+ const names = track.assemblyNames ?? [];
5
+ return a === b
6
+ ? names.filter(name => name === a).length >= 2
7
+ : names.includes(a) && names.includes(b);
8
+ }
9
+ /**
10
+ * What a comparative view's `--genome` rows take from their hosted configs,
11
+ * keyed by genome name: each genome's assembly, its gene-name search, so a row's
12
+ * `loc:` can name a gene, and a comparison for each gap beside a hosted row
13
+ * that no comparison file fills.
14
+ *
15
+ * A config holds the comparisons its genome is the target of, so a pair is
16
+ * often hosted twice, once in each direction; the upper row's config wins, and
17
+ * the gap draws one comparison. A gap neither config covers throws.
18
+ */
19
+ export function hostedComparative(rows, fileTracks, configs) {
20
+ const assemblies = [...configs].map(([name, config]) => {
21
+ const assembly = config.assemblies?.find(a => a.name === name);
22
+ if (!assembly) {
23
+ throw new Error(`--genome ${name}: its hosted config names no assembly ${name}`);
24
+ }
25
+ return assembly;
26
+ });
27
+ const textSearchAdapters = [...configs].flatMap(([name, config]) => (config.aggregateTextSearchAdapters ?? []).filter(adapter => adapter.assemblyNames?.includes(name)));
28
+ const tracks = [];
29
+ for (const [i, lower] of rows.slice(1).entries()) {
30
+ const a = rows[i].assembly;
31
+ const b = lower.assembly;
32
+ const sources = [configs.get(a), configs.get(b)].filter(c => !!c);
33
+ if (sources.length &&
34
+ ![...fileTracks, ...tracks].some(track => compares(track, a, b))) {
35
+ const hosted = sources
36
+ .flatMap(config => config.tracks ?? [])
37
+ .find(track => track.type === 'SyntenyTrack' && compares(track, a, b));
38
+ if (!hosted) {
39
+ throw new Error(`genomes.jbrowse.org has no comparison between ${a} and ${b}; put a comparison file between them`);
40
+ }
41
+ tracks.push(hosted);
42
+ }
43
+ }
44
+ return { assemblies, textSearchAdapters, tracks };
45
+ }
package/esm/index.d.ts CHANGED
@@ -1,6 +1,10 @@
1
- export { type Adapter, type Location, guessTrack, guessTrackType, makeLocationProtocol, siblingSidecar, syntenyAdapterTypes, } from './fileAdapter.ts';
2
- export { type Assembly, type Track, type TrackFlag, fileAdapter, fileTrack, isSequenceAdapter, makeLocation, sequenceAssembly, trackFlagAdapters, trackFlags, } from './fileInput.ts';
1
+ export { type Adapter, type Location, guessTrack, guessTrackType, makeLocationProtocol, syntenyAdapterTypes, } from './fileAdapter.ts';
2
+ export { type Assembly, type Track, type TrackFlag, fileAdapter, fileTrack, genomeAssembly, genomeFlags, isGenomeFlag, makeLocation, trackFlags, } from './fileInput.ts';
3
3
  export { genomeConfigUrl } from './genome.ts';
4
+ export { type HostedConfig, hostedComparative } from './hostedGenomes.ts';
5
+ export { mergeSettings, viewSettings } from './slotPath.ts';
6
+ export { parseBool } from './modifierValues.ts';
4
7
  export { resolveTrackId, trackMatches, trackName, trackType, } from './trackIds.ts';
5
- export { type LaunchPlan, launchFlags, launchPlan } from './launchPlan.ts';
6
- export { type Entry, FILE_FLAG, isDataFile, isModifier, modifierValue, parseArgv, splitModifier, standardizeArgv, } from './parseArgv.ts';
8
+ export { type ComparativeData, type ComparativeRow, type SyntenyFlag, buildComparative, comparativeRole, hasComparativeArgs, syntenyFlags, } from './comparative.ts';
9
+ export { type ComparativeLaunchPlan, type LaunchPlan, type LaunchViewType, type LinearLaunchPlan, type ShowTrack, exportBooleanFlags, launchFlags, launchPlan, launchViewType, takesFile, uniqueId, } from './launchPlan.ts';
10
+ export { type Entry, FILE_FLAG, isDataFile, isModifier, isUrl, modifierValue, parseArgv, standardizeArgv, } from './parseArgv.ts';
package/esm/index.js CHANGED
@@ -1,6 +1,10 @@
1
- export { guessTrack, guessTrackType, makeLocationProtocol, siblingSidecar, syntenyAdapterTypes, } from './fileAdapter.js';
2
- export { fileAdapter, fileTrack, isSequenceAdapter, makeLocation, sequenceAssembly, trackFlagAdapters, trackFlags, } from './fileInput.js';
1
+ export { guessTrack, guessTrackType, makeLocationProtocol, syntenyAdapterTypes, } from './fileAdapter.js';
2
+ export { fileAdapter, fileTrack, genomeAssembly, genomeFlags, isGenomeFlag, makeLocation, trackFlags, } from './fileInput.js';
3
3
  export { genomeConfigUrl } from './genome.js';
4
+ export { hostedComparative } from './hostedGenomes.js';
5
+ export { mergeSettings, viewSettings } from './slotPath.js';
6
+ export { parseBool } from './modifierValues.js';
4
7
  export { resolveTrackId, trackMatches, trackName, trackType, } from './trackIds.js';
5
- export { launchFlags, launchPlan } from './launchPlan.js';
6
- export { FILE_FLAG, isDataFile, isModifier, modifierValue, parseArgv, splitModifier, standardizeArgv, } from './parseArgv.js';
8
+ export { buildComparative, comparativeRole, hasComparativeArgs, syntenyFlags, } from './comparative.js';
9
+ export { exportBooleanFlags, launchFlags, launchPlan, launchViewType, takesFile, uniqueId, } from './launchPlan.js';
10
+ export { FILE_FLAG, isDataFile, isModifier, isUrl, modifierValue, parseArgv, standardizeArgv, } from './parseArgv.js';
@@ -1,11 +1,30 @@
1
1
  import type { Assembly, Track } from './fileInput.ts';
2
2
  import type { Entry } from './parseArgv.ts';
3
3
  /**
4
- * What a command line asks a JBrowse app to open: a genome, the files and
5
- * tracks to show on it, and where. Plain JSON, so it can cross from the process
6
- * that read the files to the one that draws them.
4
+ * The views jb2export's subcommand words name, which Desktop takes as its
5
+ * first argument too.
7
6
  */
8
- export interface LaunchPlan {
7
+ export declare const launchViewTypes: {
8
+ readonly lgv: 'LinearGenomeView';
9
+ readonly synteny: 'LinearSyntenyView';
10
+ readonly dotplot: 'DotplotView';
11
+ };
12
+ export type LaunchViewType = (typeof launchViewTypes)[keyof typeof launchViewTypes];
13
+ export declare function launchViewType(word: string): LaunchViewType | undefined;
14
+ /**
15
+ * What a command line asks a JBrowse app to open: genomes, the files and
16
+ * tracks to show on them, and where. Plain JSON, so it can cross from the
17
+ * process that read the files to the one that draws them.
18
+ */
19
+ export type LaunchPlan = LinearLaunchPlan | ComparativeLaunchPlan;
20
+ interface PlanBase {
21
+ /** settings `--view` writes on the view, as a session spec's view holds them */
22
+ view: Record<string, unknown>;
23
+ /** modifiers this plan does not carry into the view, for the app to report */
24
+ unapplied: string[];
25
+ }
26
+ export interface LinearLaunchPlan extends PlanBase {
27
+ type: 'LinearGenomeView';
9
28
  /** a config.json path or URL to load first: `--genome`'s hosted one, or `--config` */
10
29
  config?: string;
11
30
  /** a genome built from a file, which no config then supplies */
@@ -18,15 +37,60 @@ export interface LaunchPlan {
18
37
  * config's, which only the app that fetches it can name.
19
38
  */
20
39
  tracks: Track[];
21
- /** trackIds to show, files' and `--track`'s, in command-line order */
22
- show: string[];
23
- /** modifiers this plan does not carry into the view, for the app to report */
24
- unapplied: string[];
40
+ /**
41
+ * The tracks to show, files' and `--track`'s, in command-line order, each
42
+ * with the modifiers the app applies once it knows the track's display
43
+ */
44
+ show: ShowTrack[];
45
+ }
46
+ /** A synteny view or dotplot of genome files and hosted genomes. */
47
+ export interface ComparativeLaunchPlan extends PlanBase {
48
+ type: 'LinearSyntenyView' | 'DotplotView';
49
+ /** the genomes built from files */
50
+ assemblies: Assembly[];
51
+ /**
52
+ * each `--genome` and its hosted config, which the app fetches and hands to
53
+ * `hostedComparative`
54
+ */
55
+ hosted: {
56
+ name: string;
57
+ config: string;
58
+ }[];
59
+ /**
60
+ * one row per genome, as a session spec's comparative view lists them; the
61
+ * top row is a dotplot's x axis
62
+ */
63
+ views: {
64
+ assembly: string;
65
+ loc?: string;
66
+ }[];
67
+ /** the comparison files' tracks, each between the genomes it compares */
68
+ tracks: Track[];
69
+ }
70
+ export interface ShowTrack {
71
+ trackId: string;
72
+ modifiers: string[];
25
73
  }
26
74
  export declare const launchFlags: ReadonlySet<string>;
75
+ /**
76
+ * jb2export's flags that take only true or false, so a file after one is a
77
+ * file of its own. Desktop reads them to report one without taking the file.
78
+ */
79
+ export declare const exportBooleanFlags: ReadonlySet<string>;
80
+ /** Whether a flag opens a data file, as a track, genome or comparison flag does. */
81
+ export declare function takesFile(key: string): boolean;
82
+ /**
83
+ * `base`, or the first of `base-2`, `base-3`, ... that `used` lacks, which it
84
+ * adds to `used`.
85
+ */
86
+ export declare function uniqueId(used: Set<string>, base: string): string;
27
87
  /**
28
88
  * The plan a command line describes, with every local path resolved against
29
89
  * `cwd`: the directory the command ran in, which is not the app's own once a
30
90
  * second launch hands its arguments to a running one.
91
+ *
92
+ * `viewType` is the view a subcommand word named. Without one, a second genome
93
+ * or a comparison file opens a synteny view, and anything else a linear one.
31
94
  */
32
- export declare function launchPlan(entries: Entry[], cwd: string): LaunchPlan;
95
+ export declare function launchPlan(entries: Entry[], cwd: string, viewType?: LaunchViewType): LaunchPlan;
96
+ export {};