view x/static/js/8435.484d30f8.chunk.js.map @ 125:49f3d3878413 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author fubar
date Sat, 05 Oct 2024 23:58:05 +0000
parents
children
line wrap: on
line source

{"version":3,"file":"static/js/8435.484d30f8.chunk.js","mappings":"kJAKe,MAAMA,EAOnB,WAAAC,CACEC,EAA4B,GAC5BC,GARF,KAAAC,KAA+B,CAAC,EAU9B,MAAM,YAAEC,GAAc,EAAI,eAAEC,GAAiB,GAAUH,QAAAA,EAAW,CAAC,EACnE,IAAII,EASAC,EAEAC,EATFF,EADoB,iBAAXL,EACKA,EAAOQ,UAAUC,MAAM,SAC5BT,GAGK,GAMhB,IAAK,MAAMU,KAAQL,EAAa,CAC9B,GAAa,KAATK,EACF,MAAM,IAAIC,MAAM,yCAElB,GAAID,EAAKE,OAAOC,WAAW,KACzB,SAEF,GAAIH,EAAKF,UAAUM,SAAS,MAAO,CACjC,MAAMC,EAAcL,EAAKF,UAAUQ,MAAM,GAAI,GACzCT,EACFA,GAAiBQ,EAAYE,YAE7BV,EAAgBQ,EAElB,Q,CAEF,IAAIG,EAAeR,EAKnB,GAJIH,IACFW,EAAeX,EAAgBW,EAAaD,YAC5CV,OAAgBY,GAEdb,QAAAA,EAAiBH,EAAa,CAChC,MAAMiB,EAASF,EAAaG,MAAM,aAClC,QAAsBF,IAAlBb,EACEc,GACA,CAAEd,GAAiBc,EAErBd,EAAgB,QAEb,GACc,KAAlBA,GAAmC,OAAXc,GACxBd,GAAiBc,GAAUd,IAAkBc,EAAO,GAErD,MAAM,IAAIT,MAAM,qC,MAGlBL,EAAgB,GAElB,MAAMS,EAAcG,EAAaN,OAC3BU,EAAMP,EAAYQ,QAAQ,KAChC,IAAa,IAATD,EAAY,CACd,IAAKE,KAAKC,QACR,MAAM,IAAId,MACR,2DAIJ,GAAIa,KAAKtB,KAAKa,GACZ,SAEFS,KAAKtB,K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,EACZpE,aAAc/B,EACdgC,iBALsB0C,EAAAA,EAAAA,SAAQuB,EAAK,CAAC,WAAY,cAOlD5B,EAAKoB,cAAc9E,GACnB7C,EAAIkC,GAAcW,EAAOpC,MAC3B,CAEA,MAAM6H,EAAmBtH,OAAOC,QAAQjB,GAClCuI,EAAOD,EAAiB7H,OAC1B,sCAAsC6H,EACnCtI,KAAI,EAAEP,EAAK+I,KAAS,GAAG/I,MAAQ+I,cAC/B9H,KAAK,QACR,GACE+H,EAAO/B,EAAoBjG,OAC7B,uCAAuCiG,EAAoBhG,KACzD,QAEF,GACJ8F,EAAQkC,OAAO,CAACH,EAAME,GAAM1C,QAAOC,KAAOA,IAAGtF,KAAK,MAAO,UAC3D,CACF,CAAE,MAAOiI,GACPC,QAAQC,MAAMF,GACdnC,EAAQsC,YAAY,IAAGlC,EAAAA,EAAAA,SAAQL,EAAM,aAAaoC,KAAMA,GACxDnC,EAAQuC,kBAAkBxC,EAAKyC,cACjC,CACF,C","sources":["../../../node_modules/@gmod/ucsc-hub/src/raStanza.ts","../../../node_modules/@gmod/ucsc-hub/src/raFile.ts","../../../node_modules/@gmod/ucsc-hub/src/util.ts","../../../node_modules/@gmod/ucsc-hub/src/trackDbFile.ts","../../../node_modules/@gmod/ucsc-hub/src/genomesFile.ts","../../../node_modules/@gmod/ucsc-hub/src/hubFile.ts","../../../node_modules/@gmod/ucsc-hub/src/singleFileHub.ts","../../../plugins/data-management/src/ucsc-trackhub/ucscTrackHub.ts","../../../plugins/data-management/src/ucsc-trackhub/ucscAssemblies.ts","../../../plugins/data-management/src/ucsc-trackhub/doConnect.ts"],"sourcesContent":["/**\n * Class representing an ra file stanza. Each stanza line is split into its key\n * and value and stored as a Map, so the usual Map methods can be used on the\n * stanza.\n */\nexport default class RaStanza {\n  data: Record<string, string> = {}\n\n  name?: string\n\n  nameKey?: string\n\n  constructor(\n    stanza: string | string[] = [],\n    options?: { checkIndent?: boolean; skipValidation?: boolean },\n  ) {\n    const { checkIndent = true, skipValidation = false } = options ?? {}\n    let stanzaLines: string[]\n    if (typeof stanza === 'string') {\n      stanzaLines = stanza.trimEnd().split(/\\r?\\n/)\n    } else if (stanza) {\n      stanzaLines = stanza\n    } else {\n      stanzaLines = []\n    }\n\n    let currentIndent: string | undefined\n\n    let continuedLine: string | undefined\n    for (const line of stanzaLines) {\n      if (line === '') {\n        throw new Error('Invalid stanza, contained blank lines')\n      }\n      if (line.trim().startsWith('#')) {\n        continue\n      }\n      if (line.trimEnd().endsWith('\\\\')) {\n        const trimmedLine = line.trimEnd().slice(0, -1)\n        if (continuedLine) {\n          continuedLine += trimmedLine.trimStart()\n        } else {\n          continuedLine = trimmedLine\n        }\n        continue\n      }\n      let combinedLine = line\n      if (continuedLine) {\n        combinedLine = continuedLine + combinedLine.trimStart()\n        continuedLine = undefined\n      }\n      if (currentIndent ?? checkIndent) {\n        const indent = combinedLine.match(/^([ \\t]+)/)\n        if (currentIndent === undefined) {\n          if (indent) {\n            ;[, currentIndent] = indent\n          } else {\n            currentIndent = ''\n          }\n        } else if (\n          (currentIndent === '' && indent !== null) ||\n          (currentIndent && indent && currentIndent !== indent[1])\n        ) {\n          throw new Error('Inconsistent indentation of stanza')\n        }\n      } else {\n        currentIndent = ''\n      }\n      const trimmedLine = combinedLine.trim()\n      const sep = trimmedLine.indexOf(' ')\n      if (sep === -1) {\n        if (!this.nameKey) {\n          throw new Error(\n            'First line in a stanza must have both a key and a value',\n          )\n        }\n        // Adding a key that already exists and has no value is a no-op\n        if (this.data[trimmedLine]) {\n          continue\n        }\n        this.data[trimmedLine] = ''\n        continue\n      }\n      const key = trimmedLine.slice(0, sep)\n      const value = trimmedLine.slice(sep + 1)\n      if (this.data[key] && value !== this.data[key]) {\n        throw new Error(\n          'Got duplicate key with a different value in stanza: ' +\n            `\"${key}\" key has both ${this.data[key]} and ${value}`,\n        )\n      }\n      if (!this.nameKey) {\n        this.nameKey = key\n        this.name = trimmedLine.slice(sep + 1)\n      }\n      this.data[key] = value\n    }\n\n    if (!skipValidation) {\n      this.validate()\n    }\n  }\n\n  protected validate() {}\n}\n","import RaStanza from './raStanza'\n\n/**\n * Class representing an ra file. Each file is composed of multiple stanzas, and\n * each stanza is separated by one or more blank lines. Each stanza is stored in\n * a Map with the key being the value of the first key-value pair in the stanza.\n * The usual Map methods can be used on the file. An additional method `add()`\n * is available to take a raw line of text and break it up into a key and value\n * and add them to the class. This should be favored over `set()` when possible,\n * as it performs more validity checks than using `set()`.\n * @extends Map\n * @property {undefined|string} nameKey - The key of the first line of all the\n * stanzas (`undefined` if the stanza has no lines yet).\n * @throws {Error} Throws if an empty stanza is added, if the key in the first\n * key-value pair of each stanze isn't the same, or if two stanzas have the same\n * value for the key-value pair in their first lines.\n * @param {(string|string[])} [raFile=[]] - An ra file, either as a single\n * string or an array of strings with one stanza per entry. Supports both LF\n * and CRLF line terminators.\n * @param {object} options\n * @param {boolean} options.checkIndent [true] - Check if a the stanzas within\n * the file are indented consistently and keep track of the indentation\n */\nexport default class RaFile {\n  data: Record<string, RaStanza | undefined> = {}\n\n  nameKey?: string\n\n  constructor(\n    raFile: string | string[] = [],\n    options?: { checkIndent?: boolean; skipValidation?: boolean },\n  ) {\n    const { checkIndent = true, skipValidation = false } = options ?? {}\n    let stanzas: string[]\n    if (typeof raFile === 'string') {\n      stanzas = raFile.trimEnd().split(/(?:[\\t ]*\\r?\\n){2,}/)\n    } else if (raFile) {\n      stanzas = raFile\n    } else {\n      stanzas = []\n    }\n    for (const stanza of stanzas) {\n      if (stanza === '') {\n        throw new Error('Invalid stanza, was empty')\n      }\n      if (stanza.trim().startsWith('#')) {\n        const stanzaLines = stanza\n          .trimEnd()\n          .split(/\\r?\\n/)\n          .map(line => line.trim())\n        if (stanzaLines.every(line => line.startsWith('#'))) {\n          continue\n        }\n      }\n      const raStanza = new RaStanza(stanza, { checkIndent })\n      if (!this.nameKey) {\n        this.nameKey = raStanza.nameKey\n      } else if (raStanza.nameKey !== this.nameKey) {\n        throw new Error(\n          'The first line in each stanza must have the same key. ' +\n            `Saw both ${this.nameKey} and ${raStanza.nameKey}`,\n        )\n      }\n      if (!raStanza.name) {\n        throw new Error(`No stanza name: ${raStanza.name}`)\n      }\n      if (this.data[raStanza.name]) {\n        throw new Error(`Got duplicate stanza name: ${raStanza.name}`)\n      }\n\n      this.data[raStanza.name] = raStanza\n    }\n\n    if (!skipValidation) {\n      this.validate()\n    }\n  }\n\n  protected validate() {}\n}\n","import RaStanza from './raStanza'\n\n// validate that all required fields are present in the map\nexport function validateRequiredFieldsArePresent(\n  map: RaStanza,\n  requiredFields: string[],\n  description = '',\n) {\n  const missingFields: string[] = []\n  for (const field of requiredFields) {\n    if (!map.data[field]) {\n      missingFields.push(field)\n    }\n  }\n  if (missingFields.length > 0) {\n    throw new Error(\n      `${description} is missing required entr${\n        missingFields.length === 1 ? 'y' : 'ies'\n      }: ${missingFields.join(', ')}`,\n    )\n  }\n}\n","import RaFile from './raFile'\nimport { validateRequiredFieldsArePresent } from './util'\n\n/**\n * Class representing a genomes.txt file.\n * @extends RaFile\n * @param {(string|string[])} [trackDbFile=[]] - A trackDb.txt file as a string\n * @throws {Error} Throws if \"track\" is not the first key in each track or if a\n * track is missing required keys\n */\nexport default class TrackDbFile extends RaFile {\n  constructor(\n    trackDbFile: string,\n    options?: ConstructorParameters<typeof RaFile>[1],\n  ) {\n    super(trackDbFile, { ...options, checkIndent: false })\n  }\n\n  protected validate() {\n    if (this.nameKey !== 'track') {\n      throw new Error(\n        `trackDb has \"${this.nameKey}\" instead of \"track\" as the first line in each track`,\n      )\n    }\n    for (const [trackName, track] of Object.entries(this.data)) {\n      const trackKeys = Object.keys(track!.data)\n      validateRequiredFieldsArePresent(\n        track!,\n        ['track', 'shortLabel'],\n        `Track ${trackName}`,\n      )\n\n      const parentTrackKeys = new Set([\n        'superTrack',\n        'compositeTrack',\n        'container',\n        'view',\n      ])\n      if (!trackKeys.some(key => parentTrackKeys.has(key))) {\n        if (!trackKeys.includes('bigDataUrl')) {\n          throw new Error(\n            `Track ${trackName} is missing required key \"bigDataUrl\"`,\n          )\n        }\n        if (!trackKeys.includes('type')) {\n          const settingsKeys = Object.keys(this.settings(trackName))\n          if (!settingsKeys.includes('type')) {\n            throw new Error(\n              `Neither track ${trackName} nor any of its parent tracks have the required key \"type\"`,\n            )\n          }\n        }\n      }\n      let currentTrackName: string | undefined = trackName\n      do {\n        // @ts-expect-error\n        currentTrackName = this.data[currentTrackName]?.parent as\n          | string\n          | undefined\n        if (currentTrackName) {\n          ;[currentTrackName] = currentTrackName.split(' ')\n        }\n      } while (currentTrackName)\n      const currentTrack = this.data[trackName]\n      if (currentTrack) {\n        this.data[trackName] = currentTrack\n      }\n    }\n  }\n\n  /**\n   * Gets all track entries including those of parent tracks, with closer\n   * entries overriding more distant ones\n   * @param {string} trackName The name of a track\n   * @throws {Error} Throws if track name does not exist in the trackDb\n   */\n  settings(trackName: string) {\n    if (!this.data[trackName]) {\n      throw new Error(`Track ${trackName} does not exist`)\n    }\n    const parentTracks = [trackName]\n    let currentTrackName: string | undefined = trackName\n    do {\n      // @ts-expect-error\n      currentTrackName = this.data[currentTrackName]?.parent as\n        | string\n        | undefined\n      if (currentTrackName) {\n        parentTracks.push(currentTrackName)\n      }\n    } while (currentTrackName)\n    const settings = {} as Record<string, unknown>\n    parentTracks.reverse()\n    for (const parentTrack of parentTracks) {\n      const ret = this.data[parentTrack]\n      if (ret) {\n        for (const [key, value] of Object.entries(ret)) {\n          settings[key] = value\n        }\n      }\n    }\n    return settings\n  }\n}\n","import RaFile from './raFile'\nimport { validateRequiredFieldsArePresent } from './util'\n\n/**\n * Class representing a genomes.txt file.\n * @extends RaFile\n * @param {(string|string[])} [genomesFile=[]] - A genomes.txt file as a string\n * @throws {Error} Throws if the first line of the hub.txt file doesn't start\n * with \"genome <genome_name>\" or if it has invalid entries\n */\nexport default class GenomesFile extends RaFile {\n  public validate(requiredFields = ['genome', 'trackDb']) {\n    // TODO: check if genome is hosted by UCSC and if not, require twoBitPath and groups\n\n    if (this.nameKey !== 'genome') {\n      throw new Error(\n        'Genomes file must begin with a line like \"genome <genome_name>\"',\n      )\n    }\n\n    for (const [genomeName, genome] of Object.entries(this.data)) {\n      validateRequiredFieldsArePresent(\n        genome!,\n        requiredFields,\n        `genome ${genomeName}`,\n      )\n    }\n  }\n}\n","import RaStanza from './raStanza'\nimport { validateRequiredFieldsArePresent } from './util'\n\n/**\n * Class representing a hub.txt file.\n * @extends RaStanza\n * @param {(string|string[])} [hubFile=[]] - A hub.txt file as a string\n * @throws {Error} Throws if the first line of the hub.txt file doesn't start\n * with \"hub <hub_name>\", if it has invalid entries, or is missing required\n * entries\n */\nexport default class HubFile extends RaStanza {\n  protected validate() {\n    validateRequiredFieldsArePresent(\n      this,\n      ['hub', 'shortLabel', 'longLabel', 'genomesFile', 'email'],\n      'Hub file',\n    )\n  }\n}\n","import RaStanza from './raStanza'\nimport TrackDbFile from './trackDbFile'\nimport { validateRequiredFieldsArePresent } from './util'\n\n/**\n * Class representing a \"single-file\" hub.txt file that contains all the\n * sections of a hub in a single file.\n */\nexport default class SingleFileHub {\n  public genome: RaStanza\n\n  public tracks: TrackDbFile\n\n  public hubData: RaStanza\n\n  constructor(hubText: string) {\n    const [hubSection, genomeSection, ...trackSections] = hubText\n      .trimEnd()\n      .split(/(?:[\\t ]*\\r?\\n){2,}/)\n    this.hubData = new RaStanza(hubSection)\n    this.validateHub()\n\n    this.genome = new RaStanza(genomeSection)\n    this.validateGenomeSection()\n\n    this.tracks = new TrackDbFile(trackSections.join('\\n\\n'), {\n      skipValidation: false,\n    })\n  }\n\n  protected validateHub() {\n    if (this.hubData.nameKey !== 'hub') {\n      throw new Error('Hub file must begin with a line like \"hub <hub_name>\"')\n    }\n\n    validateRequiredFieldsArePresent(this.hubData, [\n      'hub',\n      'shortLabel',\n      'longLabel',\n      'email',\n      'descriptionUrl',\n    ])\n  }\n\n  protected validateGenomeSection() {\n    if (this.genome.nameKey !== 'genome') {\n      throw new Error(\n        'Genomes file must begin with a line like \"genome <genome_name>\"',\n      )\n    }\n  }\n}\n","import {\n  FileLocation,\n  isUriLocation,\n  notEmpty,\n  objectHash,\n} from '@jbrowse/core/util'\nimport { openLocation } from '@jbrowse/core/util/io'\nimport { generateUnknownTrackConf } from '@jbrowse/core/util/tracks'\nimport { RaStanza, GenomesFile, TrackDbFile } from '@gmod/ucsc-hub'\n\nexport async function fetchGenomesFile(genomesLoc: FileLocation) {\n  const genomesFileText = await openLocation(genomesLoc).readFile('utf8')\n  return new GenomesFile(genomesFileText)\n}\n\nexport async function fetchTrackDbFile(trackDbLoc: FileLocation) {\n  const text = await openLocation(trackDbLoc).readFile('utf8')\n  return new TrackDbFile(text)\n}\n\nexport function makeLoc(\n  first: string,\n  base: { uri: string; baseUri?: string },\n) {\n  return {\n    uri: new URL(first, new URL(base.uri, base.baseUri)).href,\n    locationType: 'UriLocation',\n  }\n}\n\nexport function makeLocAlt(first: string, alt: string, base: { uri: string }) {\n  return first ? makeLoc(first, base) : makeLoc(alt, base)\n}\n\nexport function makeLoc2(first: string, alt?: string) {\n  return first\n    ? {\n        uri: first,\n        locationType: 'LocalPath',\n      }\n    : {\n        uri: alt,\n        locationType: 'UriLocation',\n      }\n}\n\nexport function generateTracks({\n  trackDb,\n  trackDbLoc,\n  assemblyName,\n  sequenceAdapter,\n}: {\n  trackDb: TrackDbFile\n  trackDbLoc: FileLocation\n  assemblyName: string\n  sequenceAdapter: any\n}) {\n  return Object.entries(trackDb.data)\n    .map(([trackName, track]) => {\n      const trackKeys = Object.keys(track!)\n      const parentTrackKeys = new Set([\n        'superTrack',\n        'compositeTrack',\n        'container',\n        'view',\n      ])\n      if (trackKeys.some(key => parentTrackKeys.has(key))) {\n        return undefined\n      }\n      const parentTracks = []\n      let currentTrackName = trackName\n      do {\n        currentTrackName = trackDb.data[currentTrackName]?.data.parent || ''\n        if (currentTrackName) {\n          currentTrackName = currentTrackName.split(' ')[0]!\n          parentTracks.push(trackDb.data[currentTrackName])\n        }\n      } while (currentTrackName)\n      parentTracks.reverse()\n      const categories = parentTracks\n        .map(p => p?.data.shortLabel)\n        .filter((f): f is string => !!f)\n      const res = makeTrackConfig({\n        track: track!,\n        categories,\n        trackDbLoc,\n        trackDb,\n        sequenceAdapter,\n      })\n      return {\n        ...res,\n        trackId: `ucsc-trackhub-${objectHash(res)}`,\n        assemblyNames: [assemblyName],\n      }\n    })\n    .filter(notEmpty)\n}\n\nfunction makeTrackConfig({\n  track,\n  categories,\n  trackDbLoc,\n  trackDb,\n  sequenceAdapter,\n}: {\n  track: RaStanza\n  categories: string[]\n  trackDbLoc: FileLocation\n  trackDb: TrackDbFile\n  sequenceAdapter: any\n}) {\n  const trackType =\n    track.data.type || trackDb.data[track.data.parent || '']?.data.type || ''\n  const name = track.data.shortLabel || ''\n  const bigDataUrl = track.data.bigDataUrl || ''\n  const bigDataIdx = track.data.bigDataIndex || ''\n  const isUri = isUriLocation(trackDbLoc)\n  let baseTrackType = trackType.split(' ')[0] || ''\n  if (baseTrackType === 'bam' && bigDataUrl.toLowerCase().endsWith('cram')) {\n    baseTrackType = 'cram'\n  }\n  const bigDataLocation = isUri\n    ? makeLoc(bigDataUrl, trackDbLoc)\n    : makeLoc2(bigDataUrl)\n\n  switch (baseTrackType) {\n    case 'bam':\n      return {\n        type: 'AlignmentsTrack',\n        name: track.data.longLabel,\n        description: track.data.longLabel,\n        category: categories,\n        adapter: {\n          type: 'BamAdapter',\n          bamLocation: bigDataLocation,\n          index: {\n            location: isUri\n              ? makeLocAlt(bigDataIdx, `${bigDataUrl}.bai`, trackDbLoc)\n              : makeLoc2(bigDataIdx, `${bigDataUrl}.bai`),\n          },\n        },\n      }\n\n    case 'cram':\n      return {\n        type: 'AlignmentsTrack',\n        name,\n        description: track.data.longLabel,\n        category: categories,\n        adapter: {\n          type: 'CramAdapter',\n          cramLocation: bigDataLocation,\n          craiLocation: isUri\n            ? makeLocAlt(bigDataIdx, `${bigDataUrl}.crai`, trackDbLoc)\n            : makeLoc2(bigDataIdx, `${bigDataUrl}.crai`),\n          sequenceAdapter,\n        },\n      }\n    case 'bigBarChart':\n    case 'bigBed':\n    case 'bigGenePred':\n    case 'bigChain':\n    case 'bigInteract':\n    case 'bigMaf':\n    case 'bigNarrowPeak':\n    case 'bigPsl':\n      return {\n        type: 'FeatureTrack',\n        name,\n        description: track.data.longLabel,\n        category: categories,\n        adapter: {\n          type: 'BigBedAdapter',\n          bigBedLocation: bigDataLocation,\n        },\n      }\n    case 'bigWig':\n      return {\n        type: 'QuantitativeTrack',\n        name,\n        description: track.data.longLabel,\n        category: categories,\n        adapter: {\n          type: 'BigWigAdapter',\n          bigWigLocation: bigDataLocation,\n        },\n      }\n\n    case 'vcfTabix':\n      return {\n        type: 'VariantTrack',\n        name,\n        description: track.data.longLabel,\n        category: categories,\n        adapter: {\n          type: 'VcfTabixAdapter',\n          vcfGzLocation: bigDataLocation,\n          index: {\n            location: isUri\n              ? makeLocAlt(bigDataIdx, `${bigDataUrl}.tbi`, trackDbLoc)\n              : makeLoc2(bigDataIdx, `${bigDataUrl}.tbi`),\n          },\n        },\n      }\n\n    case 'hic':\n      return {\n        type: 'HicTrack',\n        name,\n        description: track.data.longLabel,\n        category: categories,\n        adapter: {\n          type: 'HicAdapter',\n          hicLocation: bigDataLocation,\n        },\n      }\n\n    // unsupported types\n    //     case 'peptideMapping':\n    //     case 'gvf':\n    //     case 'ld2':\n    //     case 'narrowPeak':\n    //     case 'wig':\n    //     case 'wigMaf':\n    //     case 'halSnake':\n    //     case 'bed':\n    //     case 'bed5FloatScore':\n    //     case 'bedGraph':\n    //     case 'bedRnaElements':\n    //     case 'broadPeak':\n    //     case 'coloredExon':\n    default:\n      return generateUnknownTrackConf(name, baseTrackType, categories)\n  }\n}\n\nexport { default as ucscAssemblies } from './ucscAssemblies'\n","// These are the assemblies for which there is a sequence file located at\n// http://hgdownload.soe.ucsc.edu/goldenPath/${assemblyName}/bigZips/${assemblyName}.2bit\n// This list was generated by `getUcscAssemblies.js`\n\nexport default `ailMel1\nallMis1\nanoCar1\nanoCar2\nanoGam1\nanoGam3\napiMel1\napiMel2\naplCal1\naptMan1\naquChr2\nbalAcu1\nbisBis1\nbosTau2\nbosTau3\nbosTau4\nbosTau6\nbosTau7\nbosTau8\nbraFlo1\ncaeJap1\ncaePb1\ncaePb2\ncaeRem2\ncaeRem3\ncalJac1\ncalJac3\ncalMil1\ncanFam1\ncanFam3\ncavPor3\ncb3\nce10\nce11\nce2\nce4\nce6\ncerSim1\nchlSab2\nchoHof1\nchrPic1\nci1\nci2\nci3\ncriGri1\ncriGriChoV1\ndanRer10\ndanRer11\ndanRer3\ndanRer4\ndanRer5\ndanRer6\ndanRer7\ndasNov3\ndipOrd1\ndm1\ndm2\ndm3\ndm6\ndp2\ndp3\ndroAna1\ndroAna2\ndroEre1\ndroGri1\ndroMoj1\ndroMoj2\ndroPer1\ndroSec1\ndroSim1\ndroVir1\ndroVir2\ndroYak1\ndroYak2\neboVir3\nechTel1\nechTel2\nequCab1\nequCab2\neriEur1\neriEur2\nfelCat3\nfelCat4\nfelCat5\nfelCat8\nfr1\nfr2\nfr3\ngadMor1\ngalGal2\ngalGal3\ngalGal4\ngalGal5\ngalGal6\ngalVar1\ngasAcu1\ngeoFor1\ngorGor3\ngorGor4\ngorGor5\nhetGla1\nhetGla2\nhg16\nhg18\nhg19\nhg38\nlatCha1\nloxAfr3\nmacEug2\nmacFas5\nmanPen1\nmelGal1\nmelGal5\nmelUnd1\nmicMur1\nmicMur2\nmm10\nmm7\nmm8\nmm9\nmonDom2\nmonDom4\nmonDom5\nmusFur1\nmyoLuc2\nnanPar1\nnasLar1\nnomLeu1\nnomLeu2\nnomLeu3\nochPri2\nochPri3\noreNil2\nornAna1\nornAna2\noryCun2\noryLat2\notoGar3\noviAri1\noviAri3\noviAri4\npanPan1\npanPan2\npanTro1\npanTro2\npanTro3\npanTro4\npanTro5\npanTro6\npapAnu2\npapHam1\npetMar1\npetMar2\nponAbe2\nponAbe3\npriPac1\nproCap1\npteVam1\nrheMac2\nrheMac3\nrheMac8\nrhiRox1\nrn4\nrn5\nrn6\nsacCer1\nsacCer2\nsacCer3\nsaiBol1\nsarHar1\nsorAra1\nsorAra2\nspeTri2\nstrPur1\nstrPur2\nsusScr11\nsusScr2\nsusScr3\ntaeGut1\ntaeGut2\ntarSyr1\ntarSyr2\ntetNig1\ntetNig2\nthaSir1\ntriMan1\ntupBel1\nturTru2\nventer1\nvicPac1\nvicPac2\nxenLae2\nxenTro1\nxenTro2\nxenTro3\nxenTro7\nxenTro9`.split(/\\r?\\n/)\n","import { HubFile, SingleFileHub } from '@gmod/ucsc-hub'\nimport {\n  generateTracks,\n  fetchGenomesFile,\n  fetchTrackDbFile,\n} from './ucscTrackHub'\n\nimport { AnyConfigurationModel, getConf } from '@jbrowse/core/configuration'\nimport { FileLocation, getSession } from '@jbrowse/core/util'\nimport { openLocation } from '@jbrowse/core/util/io'\nimport { nanoid } from '@jbrowse/core/util/nanoid'\n\nfunction resolve(uri: string, baseUri: string) {\n  return new URL(uri, baseUri).href\n}\n\nexport async function doConnect(self: {\n  configuration: AnyConfigurationModel\n  addTrackConfs: (arg: Record<string, unknown>[]) => void\n}) {\n  const session = getSession(self)\n  const notLoadedAssemblies = [] as string[]\n  try {\n    const hubFileLocation = getConf(self, 'hubTxtLocation') as FileLocation\n    const hubFileText = await openLocation(hubFileLocation).readFile('utf8')\n    // @ts-expect-error\n    const hubUri = resolve(hubFileLocation.uri, hubFileLocation.baseUri)\n    const { assemblyManager } = session\n    if (hubFileText.includes('useOneFile on')) {\n      const hub = new SingleFileHub(hubFileText)\n      const { genome, tracks } = hub\n      const genomeName = genome.name!\n\n      const asm = assemblyManager.get(genomeName)\n      if (!asm) {\n        // @ts-expect-error\n        session.addSessionAssembly({\n          name: genomeName,\n          sequence: {\n            type: 'ReferenceSequenceTrack',\n            trackId: `${genomeName}-${nanoid()}`,\n            adapter: {\n              type: 'TwoBitAdapter',\n              twoBitLocation: {\n                uri: resolve(genome.data.twoBitPath!, hubUri),\n              },\n              chromSizesLocation: {\n                uri: resolve(genome.data.chromSizes!, hubUri),\n              },\n            },\n          },\n        })\n      }\n      const asm2 = assemblyManager.get(genomeName)\n      const sequenceAdapter = getConf(asm2!, ['sequence', 'adapter'])\n      const tracksNew = generateTracks({\n        trackDb: tracks,\n        trackDbLoc: hubFileLocation,\n        assemblyName: genomeName,\n        sequenceAdapter,\n      })\n      self.addTrackConfs(tracksNew)\n    } else {\n      const hubFile = new HubFile(hubFileText)\n      const genomeFile = hubFile.data.genomesFile\n      if (!genomeFile) {\n        throw new Error('genomesFile not found on hub')\n      }\n\n      // @ts-expect-error\n      const hubUri = resolve(hubFileLocation.uri, hubFileLocation.baseUri)\n      const genomesFileLocation = hubUri\n        ? {\n            uri: resolve(genomeFile, hubUri),\n            locationType: 'UriLocation' as const,\n          }\n        : {\n            localPath: genomeFile,\n            locationType: 'LocalPathLocation' as const,\n          }\n      const genomesFile = await fetchGenomesFile(genomesFileLocation)\n      const map = {} as Record<string, number>\n      for (const [genomeName, genome] of Object.entries(genomesFile.data)) {\n        const assemblyNames = getConf(self, 'assemblyNames')\n        if (assemblyNames.length > 0 && !assemblyNames.includes(genomeName)) {\n          continue\n        }\n\n        const asm = assemblyManager.get(genomeName)\n        if (!asm) {\n          notLoadedAssemblies.push(genomeName)\n          continue\n        }\n\n        // @ts-expect-error\n        const db = genome.data.trackDb\n        if (!db) {\n          throw new Error('genomesFile not found on hub')\n        }\n        const base = new URL(genomeFile, hubUri)\n        const loc = hubUri\n          ? {\n              uri: new URL(db, base).href,\n              locationType: 'UriLocation' as const,\n            }\n          : {\n              localPath: db,\n              locationType: 'LocalPathLocation' as const,\n            }\n        const trackDb = await fetchTrackDbFile(loc)\n        const sequenceAdapter = getConf(asm, ['sequence', 'adapter'])\n        const tracks = generateTracks({\n          trackDb,\n          trackDbLoc: loc,\n          assemblyName: genomeName,\n          sequenceAdapter,\n        })\n        self.addTrackConfs(tracks)\n        map[genomeName] = tracks.length\n      }\n\n      const loadedAssemblies = Object.entries(map)\n      const str1 = loadedAssemblies.length\n        ? `Loaded data from these assemblies: ${loadedAssemblies\n            .map(([key, val]) => `${key} (${val} tracks)`)\n            .join(', ')}`\n        : ''\n      const str2 = notLoadedAssemblies.length\n        ? `Skipped data from these assemblies: ${notLoadedAssemblies.join(\n            ', ',\n          )}`\n        : ''\n      session.notify([str1, str2].filter(f => !!f).join('. '), 'success')\n    }\n  } catch (e) {\n    console.error(e)\n    session.notifyError(`${getConf(self, 'name')}: \"${e}\"`, e)\n    session.breakConnection?.(self.configuration)\n  }\n}\n"],"names":["RaStanza","constructor","stanza","options","data","checkIndent","skipValidation","stanzaLines","currentIndent","continuedLine","trimEnd","split","line","Error","trim","startsWith","endsWith","trimmedLine","slice","trimStart","combinedLine","undefined","indent","match","sep","indexOf","this","nameKey","key","value","name","validate","RaFile","raFile","stanzas","map","every","raStanza","validateRequiredFieldsArePresent","requiredFields","description","missingFields","field","push","length","join","TrackDbFile","trackDbFile","super","trackName","track","Object","entries","trackKeys","keys","parentTrackKeys","Set","some","has","includes","settings","currentTrackName","parent","currentTrack","parentTracks","reverse","parentTrack","ret","GenomesFile","genomeName","genome","HubFile","SingleFileHub","hubText","hubSection","genomeSection","trackSections","hubData","validateHub","validateGenomeSection","tracks","async","fetchTrackDbFile","trackDbLoc","text","openLocation","readFile","makeLoc","first","base","uri","URL","baseUri","href","locationType","makeLocAlt","alt","makeLoc2","generateTracks","trackDb","assemblyName","sequenceAdapter","res","categories","trackType","type","shortLabel","bigDataUrl","bigDataIdx","bigDataIndex","isUri","isUriLocation","baseTrackType","toLowerCase","bigDataLocation","longLabel","category","adapter","bamLocation","index","location","cramLocation","craiLocation","bigBedLocation","bigWigLocation","vcfGzLocation","hicLocation","generateUnknownTrackConf","makeTrackConfig","p","filter","f","trackId","objectHash","assemblyNames","notEmpty","resolve","doConnect","self","session","getSession","notLoadedAssemblies","hubFileLocation","getConf","hubFileText","hubUri","assemblyManager","hub","get","addSessionAssembly","sequence","nanoid","twoBitLocation","twoBitPath","chromSizesLocation","chromSizes","asm2","tracksNew","addTrackConfs","genomeFile","genomesFile","genomesFileLocation","localPath","genomesLoc","genomesFileText","fetchGenomesFile","asm","db","loc","loadedAssemblies","str1","val","str2","notify","e","console","error","notifyError","breakConnection","configuration"],"sourceRoot":""}