https://github.com/higlass/higlass-bigwig-datafetcher
https://github.com/higlass/higlass-bigwig-datafetcher
hidivelab
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/higlass/higlass-bigwig-datafetcher
- Owner: higlass
- License: mit
- Created: 2020-12-17T22:04:53.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-01-31T05:09:51.000Z (over 1 year ago)
- Last Synced: 2025-08-19T10:55:19.702Z (10 months ago)
- Topics: hidivelab
- Language: JavaScript
- Homepage:
- Size: 641 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# BigWig Data Fetcher for HiGlass
Quickly load data from a bigwig file in HiGlass.
[](http://higlass.io)
## Usage
The live scripts can be found at:
- https://unpkg.com/higlass-bigwig-datafetcher/dist/higlass-bigwig-datafetcher.min.js
First, register the data fetcher:
```js
import register from "higlass-register";
import { BigwigDataFetcher } from "higlass-bigwig-datafetcher";
register(
{ dataFetcher: BigwigDataFetcher, config: BigwigDataFetcher.config },
{ pluginType: "dataFetcher" }
);
```
Configure the track in your view config; you should be all set from here!
```
[...
{
"type": "bar",
"height": 80,
"data": {
"type": "bbi",
"url": "https://aveit.s3.amazonaws.com/higlass/bigwig/example.chr1.10000-1160000.bw",
"chromSizesUrl": "https://aveit.s3.amazonaws.com/higlass/data/sequence/hg38.chrom.sizes",
},
"options": {
...
}
}
]
```
Note that the `chromSizesUrl` option is required.
For an example, see [`src/index.html`](src/index.html).
### Basic authentication
Bigwig files may be hosted on a website that uses Basic authentication to limit access. To load data from a bigWig file hosted on a site that uses Basic authentication, add the username and password to the URL. For example: `http://username:password@example.com/data.bw`. This would be used in the view configuration `url` property, *e.g.*,:
```
[...
{
"type": "bar",
"height": 80,
"data": {
"type": "bbi",
"url": "http://username:password@example.com/data.bw",
"chromSizesUrl": "https://aveit.s3.amazonaws.com/higlass/data/sequence/hg38.chrom.sizes",
},
"options": {
...
}
}
]
```
## Development
### Testing
To run the test suite:
```
npm run test
```
### Installation
```bash
$ git clone https://github.com/higlass/higlass-bigwig-datafetcher
$ cd higlass-bigwig-datafetcher
$ npm install
```
If you have a local copy of higlass, you can then run this command in the higlass-bigwig-datafetcher directory:
```bash
npm link higlass
```
### Commands
- **Developmental server**: `npm start`
- **Production build**: `npm run build`