{"id":21662792,"url":"https://github.com/higlass/higlass-pileup","last_synced_at":"2025-04-11T23:51:10.054Z","repository":{"id":35095924,"uuid":"206233340","full_name":"higlass/higlass-pileup","owner":"higlass","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-26T05:03:06.000Z","size":1570,"stargazers_count":10,"open_issues_count":15,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T21:19:39.822Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/higlass.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-04T04:45:51.000Z","updated_at":"2025-03-26T05:03:10.000Z","dependencies_parsed_at":"2024-06-21T14:09:42.109Z","dependency_job_id":"f3e5ee4b-2c7a-4d21-ab9d-119f6211382f","html_url":"https://github.com/higlass/higlass-pileup","commit_stats":null,"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/higlass%2Fhiglass-pileup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/higlass%2Fhiglass-pileup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/higlass%2Fhiglass-pileup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/higlass%2Fhiglass-pileup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/higlass","download_url":"https://codeload.github.com/higlass/higlass-pileup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497890,"owners_count":21113984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T10:18:06.303Z","updated_at":"2025-04-11T23:51:10.046Z","avatar_url":"https://github.com/higlass.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HiGlass Pileup Track\n\n\u003e Viewer for sequence alignments.\n\n[![HiGlass](https://img.shields.io/badge/higlass-👍-red.svg?colorB=0f5d92)](http://higlass.io)\n[![Build Status](https://img.shields.io/travis/higlass/higlass-pileup-track/master.svg?colorB=0f5d92)](https://travis-ci.org/higlass/higlass-pileup-track)\n\n\u003cimg src=\"/teaser.png?raw=true\" width=\"600\" /\u003e\n\n**Note**: This is the source code for the pileup only! You might want to check out the following repositories as well:\n\n- HiGlass viewer: https://github.com/higlass/higlass\n- HiGlass server: https://github.com/higlass/higlass-server\n- HiGlass docker: https://github.com/higlass/higlass-docker\n\n## Installation\n\n```\nnpm install higlass-pileup\n```\n\n## Usage\n\nThe live scripts can be found at:\n\n- https://unpkg.com/higlass-pileup/dist/higlass-pileup.min.js\n\n## Things that haven't been thoroughly tested\n\n1. Group by strand when using single vs. paired end reads\n2. Group by HP tag when using single vs. paired end reads\n\n### Client\n\n1. Make sure you load this track prior to `hglib.js`. For example:\n\n```\n\u003cscript src=\"/higlass-pileup-track.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"hglib.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  ...\n\u003c/script\u003e\n```\n\n2. Now, configure the track in your view config and be happy!\n\n```\n{\n  \"editable\": true,\n  \"trackSourceServers\": [\n    \"http://higlass.io/api/v1\"\n  ],\n  \"exportViewUrl\": \"/api/v1/viewconfs\",\n  \"views\": [\n    {\n      \"initialXDomain\": [\n        0,\n        100000\n      ],\n      \"tracks\": {\n        \"top\": [\n          {\n            \"type\": \"pileup\",\n            \"options\": {\n              \"axisPositionHorizontal\": \"right\",\n              \"axisLabelFormatting\": \"normal\",\n              \"showCoverage\": false,\n              \"colorScale\": [\n                // A T G C N Other\n                \"#2c7bb6\",\n                \"#92c5de\",\n                \"#ffffbf\",\n                \"#fdae61\",\n                \"#808080\",\n                \"#DCDCDC\"\n              ]\n            },\n            \"height\": 180,\n            \"uid\": \"FylkvVBTSumoJ959HT4-5A\",\n            \"data\": {\n              \"type\": \"bam\",\n              \"bamUrl\": \"https://pkerp.s3.amazonaws.com/public/bamfile_test/SRR1770413.sorted.bam\",\n              \"baiUrl\": \"https://pkerp.s3.amazonaws.com/public/bamfile_test/SRR1770413.sorted.bam.bai\",\n              \"chromSizesUrl\": \"https://pkerp.s3.amazonaws.com/public/bamfile_test/GCF_000005845.2_ASM584v2_genomic.chrom.sizes\",\n              {\n                \"options\": {\n                  \"maxTileWidth\": 30000\n                }\n              }\n            },\n            \"width\": 470\n          }\n        ]\n      },\n      \"layout\": {\n        \"w\": 12,\n        \"h\": 6,\n        \"x\": 0,\n        \"y\": 0\n      }\n    }\n  ]\n}\n```\n\n3. To use in higlass.io:\n\n- Modify the viewconf above to specify the URL for your BAM file.\n- Either remove or update the `chromSizesUrl` entry to point to a chromosome sizes file for the assembly that your BAM file is aligned to. If it's omitted, the chromosome sizes will be extracted directly from the BAM file and ordered best-guess semantically (i.e. chr1, chr2, ...., chrM, chrX, chrY).\n- Save the viewconf as a JSON file.\n- Navigate to higlass.io/app and drag the JSON file onto the viewer.\n- Browse away!\n\n## Options\n\n### Data config\n\n**maxTileWidth** - To limit the amount of data that is fetched from the server, HiGlass sets a\ndefault maximum tile width. This can be modified in the `data` section of the track config. Setting\nit to a large file will let you zoom out further while still fetching data. This is useful for\nviewing low coverage BAM files.\n\n### Track options\n\n**colorScale** - Array that controls the color of substitutions and highlighted reads. It can take 6 or 11 values. 11 values are required if you want to control highlighted read colors (see the `highlightReadsBy` option). Example:\n\n```\n\"colorScale\": [\n  \"#2c7bb6\", //color of A substitutions\n  \"#92c5de\", //color of T substitutions\n  \"#ffffbf\", //color of G substitutions\n  \"#fdae61\", //color of C substitutions\n  \"#808080\", //color of N substitutions\n  \"#DCDCDC\", //color of other substitutions\n  \"#FF0000\", //color of reads with large insert size\n  \"#0000D1\", //color of reads with small insert size\n  \"#00D1D1\", //color of reads with LL orientation (see https://software.broadinstitute.org/software/igv/interpreting_pair_orientations)\n  \"#555CFA\", //color of reads with RR orientation\n  \"#02A221\", //color of reads with RL orientation\n]\n```\n\n**outlineReadOnHover** - Highlights the current read on hover.\n\n**outlineMateOnHover** - Highlights the mate of the current read on hover. If the mate is a split read,\nboth alignments will be highlighted.\n\n**highlightReadsBy** - Array that can take the values `insertSize`, `pairOrientation` or `insertSizeAndPairOrientation`:\n\n- if `insertSize` is set, reads that have a large or small insert size will be highlighted. The thresholds are controlled by the `largeInsertSizeThreshold` and `smallInsertSizeThreshold` track options. `largeInsertSizeThreshold` defaults to `1000`, i.e., 1000 bp. `smallInsertSizeThreshold` is not set by default, i.e, reads with small insert size won't be highlighted.\n- if `pairOrientation` is set, reads with an abnormal mapping orientation are highlighted (e.g. ++,--,-+).\n- if `insertSizeAndPairOrientation` is set, reads with an abnormal mapping orientation that also have abnormal insert sizes are highlighted.\n- if multiple values are set, reads that fulfill any of the conditions are highlighed in the corresponding color.\n- highlight colors can be controlled by extending the `colorScale` track option to 11 values. The additional 5 values will control the large insert size color, small insert size color and the ++, --, -+ mapping orientations (in that order).\n\n**minMappingQuality** - If this is set (integer), reads with a mapping quality lower than the specified value are not displayed.\n\n## Local tiles\n\nThe `higlass-pileup` track supports local tiles. Local tiles can contain either BAM formatted data or they can include raw rendering objects. The following is a snippet that goes in the `track` section of a viewconf:\n\n```\n            data: {\n              type: 'local-tiles',\n              tilesetInfo: {\n                'min_pos': [0],\n                'max_pos': [14],\n                'max_width': 64,\n                'tile_size': 1024,\n                'chromsizes': [['a', 14]],\n                'max_zoom': 0,\n                'max_tile_width': 100000,\n                'format': 'subs'\n              },\n              tiles: {\n                '0.0': [{\n                  \"id\": \"r1\",\n                  \"from\": 0,\n                  \"to\": 100,\n                  \"substitutions\": [\n                    {'pos': 2, 'type': 'D', 'length': 2},\n                    {'pos': 6, 'type': 'X', 'length': 1, 'base': 'A', 'variant': 'T'},\n                    {'pos': 9, 'type': 'D', 'length': 2}\n                  ],\n                  \"color\": 0\n                }],\n              }\n            }\n```\n\nThe currently available substitution types are:\n\n- `S` - corresponding to soft clipped bases\n- `H` - corresponding to hard clipped bases\n- `X` - corresponding to a mismatch\n- `I` - corresponding to an insertion\n- `D` - corresponding to a deletion\n\n## Support\n\nFor questions, please either open an issue or ask on the HiGlass Slack channel at http://bit.ly/higlass-slack\n\n## Development\n\n### Installation\n\n```bash\n$ git clone https://github.com/higlass/higlass-pileup-track \u0026\u0026 higlass-pileup-track\n$ npm install\n```\n\n### Commands\n\n**Developmental server**: `npm start`\n**Production build**: `npm run build`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiglass%2Fhiglass-pileup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiglass%2Fhiglass-pileup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiglass%2Fhiglass-pileup/lists"}