{"_id":"@apr144/higlass-bigbed-datafetcher","_rev":"1-f11cf928c8c868f6d5bd7b620b1e1f63","name":"@apr144/higlass-bigbed-datafetcher","dist-tags":{"latest":"0.1.0-020925-001"},"versions":{"0.1.0":{"name":"@apr144/higlass-bigbed-datafetcher","version":"0.1.0","author":{"name":"Alex Reynolds"},"license":"MIT","_id":"@apr144/higlass-bigbed-datafetcher@0.1.0","maintainers":[{"name":"apr144","email":"alexpreynolds@gmail.com"}],"contributors":[{"url":"http://github.com/alexpreynolds","name":"Alex Reynolds"}],"homepage":"https://github.com/alexpreynolds/higlass-bigbed-datafetcher#readme","bugs":{"url":"https://github.com/alexpreynolds/higlass-bigbed-datafetcher/issues"},"dist":{"shasum":"dc4329f3ab5aeaa1df944b3c20fffef0e69ded28","tarball":"https://registry.npmjs.org/@apr144/higlass-bigbed-datafetcher/-/higlass-bigbed-datafetcher-0.1.0.tgz","fileCount":5,"integrity":"sha512-jWyJSO0oEfID9O8wULJzBwChB/eFmJHfixeZGQKLWM5D+qgiE9DEd3ZUHNRAAf5Lxm4qZ5CLK9dNPrQMNWSJxw==","signatures":[{"sig":"MEYCIQCWsHwWfh97xHou7/I+YTqlKpPJfvl/cwSORR/2FFllmwIhAMZiPAqq8+ZiCryn74ea4tr2TjocRXZhobIs1xF+KEds","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14573},"main":"dist/index.js","type":"module","module":"dist/index.js","exports":{".":{"import":"./dist/index.js"}},"gitHead":"60c850841d71030fbce7beffbe8473e5edcfb494","private":false,"scripts":{"test":"vitest --config vite-test.config.js --run","build":"rimraf ./dist/ && npm run build-lib","clean":"rm -rf node_modules && rm -f package-lock.json && rm -rf dist && rm -rf build && rm -rf dist.zip","start":"npm-run-all --parallel start-lib start-app","build-lib":"npm run build-lib:prod && npm run build-lib:dev","start-app":"vite --config vite-demo.config.js --port 3000","start-lib":"cross-env ESBUILD_MODE=watch node ./bundle.mjs","prerelease":"rm -rf dist/*; npm run build; zip -r dist.zip dist","test-watch":"vitest --config vite-test.config.js --watch","build-lib:dev":"cross-env APP_ENV=development ESBUILD_MODE=build node ./bundle.mjs","build-lib:prod":"cross-env APP_ENV=production ESBUILD_MODE=build node ./bundle.mjs"},"_npmUser":{"name":"apr144","email":"alexpreynolds@gmail.com"},"repository":{"url":"git://github.com/alexpreynolds/higlass-bigbed-datafetcher.git","type":"git"},"_npmVersion":"10.1.0","description":"BigBed Data Fetcher for HiGlass","directories":{},"_nodeVersion":"20.9.0","dependencies":{"d3-dsv":"^3.0.1","slugid":"^3.0.0","d3-scale":"^1.0.7","@gmod/bbi":"^4.0.5","@gmod/bed":"^2.1.3","d3-request":"^1.0.6","higlass-register":"^0.3.0","@apr144/generic-filehandle":"3.1.1-020925-001"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^4.3.0","jsdom":"^20.0.0","rimraf":"^3.0.2","vitest":"^0.23.4","esbuild":"^0.14.42","cross-env":"^7.0.0","npm-run-all":"^4.1.5","@esbuild-plugins/node-globals-polyfill":"^0.1.1","@esbuild-plugins/node-modules-polyfill":"^0.1.4"},"_npmOperationalInternal":{"tmp":"tmp/higlass-bigbed-datafetcher_0.1.0_1739144876875_0.5669224626285723","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-020925-001":{"name":"@apr144/higlass-bigbed-datafetcher","version":"0.1.0-020925-001","description":"BigBed Data Fetcher for HiGlass","private":false,"author":{"name":"Alex Reynolds"},"license":"MIT","contributors":[{"name":"Alex Reynolds","url":"http://github.com/alexpreynolds"}],"type":"module","main":"dist/index.js","module":"dist/index.js","exports":{".":{"import":"./dist/index.js"}},"repository":{"type":"git","url":"git://github.com/alexpreynolds/higlass-bigbed-datafetcher.git"},"devDependencies":{"@esbuild-plugins/node-globals-polyfill":"^0.1.1","@esbuild-plugins/node-modules-polyfill":"^0.1.4","cross-env":"^7.0.0","esbuild":"^0.14.42","jsdom":"^20.0.0","npm-run-all":"^4.1.5","rimraf":"^3.0.2","vite":"^4.3.0","vitest":"^0.23.4"},"scripts":{"clean":"rm -rf node_modules && rm -f package-lock.json && rm -rf dist && rm -rf build && rm -rf dist.zip","build":"rimraf ./dist/ && npm run build-lib","build-lib":"npm run build-lib:prod && npm run build-lib:dev","build-lib:prod":"cross-env APP_ENV=production ESBUILD_MODE=build node ./bundle.mjs","build-lib:dev":"cross-env APP_ENV=development ESBUILD_MODE=build node ./bundle.mjs","start-lib":"cross-env ESBUILD_MODE=watch node ./bundle.mjs","start-app":"vite --config vite-demo.config.js --port 3000","start":"npm-run-all --parallel start-lib start-app","prerelease":"rm -rf dist/*; npm run build; zip -r dist.zip dist","test-watch":"vitest --config vite-test.config.js --watch","test":"vitest --config vite-test.config.js --run"},"dependencies":{"@gmod/bbi":"^4.0.5","@gmod/bed":"^2.1.3","d3-dsv":"^3.0.1","d3-request":"^1.0.6","d3-scale":"^1.0.7","@apr144/generic-filehandle":"3.1.1-020925-001","higlass-register":"^0.3.0","slugid":"^3.0.0"},"gitHead":"3b9c082848c181677c0510e20b65ae3911162957","bugs":{"url":"https://github.com/alexpreynolds/higlass-bigbed-datafetcher/issues"},"homepage":"https://github.com/alexpreynolds/higlass-bigbed-datafetcher#readme","_id":"@apr144/higlass-bigbed-datafetcher@0.1.0-020925-001","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-0GkvyL4WMkDiOkt+SClTQ5zppJZvi9DJq89YhZ4KaAUpHZl82sN/FkxklyE2YxYMfabEIN96OREsCW6Wsul8eQ==","shasum":"6517f2a0ef378bdc4bb479bb5c065baa6619b4b3","tarball":"https://registry.npmjs.org/@apr144/higlass-bigbed-datafetcher/-/higlass-bigbed-datafetcher-0.1.0-020925-001.tgz","fileCount":9,"unpackedSize":2083172,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDHd+Q2g05RfKqoWmIW8oVywn1DBBL/lfokXas/Kon5nAIgeqeRv7p8ZYr1VPm3kOuvOE50LMY9ARPy1xWxPNeoZFA="}]},"_npmUser":{"name":"apr144","email":"alexpreynolds@gmail.com"},"directories":{},"maintainers":[{"name":"apr144","email":"alexpreynolds@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/higlass-bigbed-datafetcher_0.1.0-020925-001_1739149738948_0.10626087077232893"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-09T23:47:56.757Z","modified":"2025-02-10T01:08:59.334Z","0.1.0":"2025-02-09T23:47:57.081Z","0.1.0-020925-001":"2025-02-10T01:08:59.162Z"},"bugs":{"url":"https://github.com/alexpreynolds/higlass-bigbed-datafetcher/issues"},"author":{"name":"Alex Reynolds"},"license":"MIT","homepage":"https://github.com/alexpreynolds/higlass-bigbed-datafetcher#readme","repository":{"type":"git","url":"git://github.com/alexpreynolds/higlass-bigbed-datafetcher.git"},"description":"BigBed Data Fetcher for HiGlass","contributors":[{"name":"Alex Reynolds","url":"http://github.com/alexpreynolds"}],"maintainers":[{"name":"apr144","email":"alexpreynolds@gmail.com"}],"readme":"# higlass-bigbed-datafetcher\nProvide remote access to remotely-hosted bigBed files to HiGlass client applications\n\n## Usage\n\nThis enables access to a web-hosted bigBed file for use with the `higlass-transcripts` (https://github.com/higlass/higlass-transcripts) plug-in.\n\nRegister the data fetcher in your HiGlass application:\n\n```\nimport register from \"higlass-register\";\nimport { BigBedDataFetcher } from \"higlass-bigbed-datafetcher\";\n\nregister (\n  { \n    dataFetcher: BigBedDataFetcher, \n    config: BigBedDataFetcher.config,\n  },\n  { \n    pluginType: \"dataFetcher\",\n  }\n);\n```\n\nConfigure the view configuration's `horizontal-transcripts` object with `data` attributes pointing to the web-hosted tabix file:\n\n```\n{\n  \"name\": \"My bigBed elements\",\n  \"type\": \"horizontal-transcripts\",\n  \"uid\": \"my_bigbed_uid\",\n  \"options\": {\n    \"fontSize\": 9, // font size for labels and amino acids (if available)\n    \"fontFamily\": \"Helvetica\",\n    \"labelFontColor\": \"#333333\",\n    \"labelBackgroundPlusStrandColor\": \"#ffffff\",\n    \"labelBackgroundMinusStrandColor\": \"#ffffff\",\n    \"labelStrokePlusStrandColor\": \"#999999\",\n    \"labelStrokeMinusStrandColor\": \"#999999\",\n    \"plusStrandColor\": \"#bdbfff\", // color of coding parts of the exon on the plus strand\n    \"minusStrandColor\": \"#fabec2\", // color of coding parts of the exon on the negative strand\n    \"utrColor\": \"#C0EAAF\", // color of untranslated regions of the exons\n    \"backgroundColor\": \"#ffffff\", // color of track background\n    \"transcriptHeight\": 12, // height of the transcripts\n    \"transcriptSpacing\": 2, // space in between the transcripts\n    \"name\": \"Gene transcripts\",\n    \"maxTexts\": 50, // Maximum number of labels shown on the screen\n    \"showToggleTranscriptsButton\": true, // If the \"Show fewer transcripts\"/\"Show more transcripts\" is shown\n    \"trackHeightAdjustment\": \"automatic\", // if \"automatic\", the height of the track is adjusted to the number of visible transcripts.\n    \"startCollapsed\": false, // if true, only one transcript is shown\n  },\n  \"data\" : {\n    \"type\": \"bigbed\",\n    \"url\": \"https://example.com/bigBed/my_elements.bb\",\n    \"chromSizesUrl\": \"https://example.com/bigBed/hg38.chromSizes.gz\",\n  },\n}\n```\n\nThe format of data is currently driven by the `formatTranscriptData` function in `higlass-transcripts`, where transcript metadata are stored in thirteen columns:\n\n```\nformatTranscriptData(ts) {\n  const strand = ts[5];\n  const stopCodonPos = ts[12] === \".\" ? \".\" : (strand === \"+\" ? +ts[12] + 2 : +ts[12] - 1);\n  const startCodonPos = ts[11] === \".\" ? \".\" : (strand === \"+\" ? +ts[11] - 1 : +ts[11] + 2);\n  const exonStarts = ts[9].split(\",\").map((x) => +x - 1);\n  const exonEnds = ts[10].split(\",\").map((x) => +x);\n  const txStart = +ts[1] - 1;\n  const txEnd = +ts[2] - 1;\n\n  const result = {\n    transcriptId: this.transcriptId(ts),\n    transcriptName: ts[3],\n    txStart: txStart,\n    txEnd: txEnd,\n    strand: strand,\n    chromName: ts[0],\n    codingType: ts[8],\n    exonStarts: exonStarts,\n    exonEnds: exonEnds,\n    startCodonPos: startCodonPos,\n    stopCodonPos: stopCodonPos,\n    importance: +ts[4],\n  };\n  return result;\n}\n```\n\nPlaceholders are used to change rendering behavior when fields are missing data.","readmeFilename":"README.md"}