{"id":21662805,"url":"https://github.com/higlass/higlass-manage","last_synced_at":"2025-04-11T23:41:52.672Z","repository":{"id":32397695,"uuid":"132211034","full_name":"higlass/higlass-manage","owner":"higlass","description":"A utility script to manage local docker instances of HiGlass","archived":false,"fork":false,"pushed_at":"2023-07-06T00:55:30.000Z","size":157,"stargazers_count":24,"open_issues_count":48,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T19:37:55.202Z","etag":null,"topics":["gehlenborglab","higlass"],"latest_commit_sha":null,"homepage":"http://docs.higlass.io","language":"Python","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","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}},"created_at":"2018-05-05T03:25:49.000Z","updated_at":"2025-02-17T08:35:24.000Z","dependencies_parsed_at":"2023-07-13T01:48:21.871Z","dependency_job_id":null,"html_url":"https://github.com/higlass/higlass-manage","commit_stats":null,"previous_names":["pkerpedjiev/higlass-manage"],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/higlass%2Fhiglass-manage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/higlass%2Fhiglass-manage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/higlass%2Fhiglass-manage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/higlass%2Fhiglass-manage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/higlass","download_url":"https://codeload.github.com/higlass/higlass-manage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497902,"owners_count":21113982,"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":["gehlenborglab","higlass"],"created_at":"2024-11-25T10:18:09.172Z","updated_at":"2025-04-11T23:41:52.646Z","avatar_url":"https://github.com/higlass.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1308949.svg)](https://doi.org/10.5281/zenodo.1308949)\n\n# Manage HiGlass Instances\n\nThis utility script helps manage local HiGlass instances\n\n## Prerequisites\n\nTo use this utility, you will require:\n\n* [Docker](https://www.docker.com/community-edition)\n* Python 3\n\n## Installation\n\n`higlass-manage` can be installed using pip\n\n```\npip install higlass-manage\n```\n\n## Usage\n\nHiGlass wraps the Docker commands for starting, stopping, listing and populating local higlass instances.\n\n## Tests\n\nTo run the tests, first get the test data:\n\n```\n./get_test_data.sh\n```\n\nAnd then run the tests:\n\n```\n./test.sh\n```\n\n### Quickly viewing a dataset\n\nThe simplest way to get started is to open and view a dataset. The higlass-manage view command will automatically start a new instance if one isn’t already running, add the given dataset and display it in a browser. Currently, the higlass-manage view command only works with cooler, bigWig, chromsizes and gene-annotation files.\n\n```\nwget https://s3.amazonaws.com/pkerp/public/hic-resolutions.cool\nhiglass-manage view hic-resolutions.cool\n```\n\n### Starting a HiGlass instance\n\nStart a local higlass instance using the default data and temporary directories: `~/hg-data` and `/tmp/higlass-docker`. \nAll of the data ingested into the instance will be placed into the data directory. Alternate data and temp directory can be specified using ``--data-dir`` and ``--temp-dir`` parameters.\n\n```\nhiglass-manage start\n```\n\nIf you want to make your instance accessible to the outside world, you need to specify the host URL that it will be available through using the `--site-url` parameter:\n\n```\nhiglass-manage start --site-url higlass.io\n```\n\nThese commands will start an instance running on the default port of 8989. An alternate port can be specified using the ``--port`` parameter. The number of worker processes for the uWSGI application server can be specified with the ``--workers`` parameter.\n\n#### Using the Redis caching service\n\nTo make use of the Redis caching service to improve performance, add the `--use-redis` flag. Redis files will be stored by default in the `~/redis-data` directory. Add the `--redis-dir` parameter to override this default.\n\n```\nhiglass-manage start ... --use-redis --redis-dir /new/path/to/redis-data\n```\n\n#### Setting default client options\n\nTo the default options for newly created tracks, use the `--default-track-options` parameter to pass in a JSON file containing either\ntrack-specific or general default track options:\n\n```\n$cat default_options.json\n{\n    \"all\": {\n        \"showTooltip\": \"true\"\n    }\n}\n\n$ ./higlass_manage.py start --default-track-options default_options.json\n```\n\n### Ingesting data\n\nUse the `ingest` command to add new data. Generally data requires a ``filetype`` and a ``datatype``.\nThis can sometimes (i.e. in the case of `cooler` and `bigwig` files) be inferred from the file itself.\n\n```\nhiglass-manage ingest my_data.mcool\n```\n\nIn other, more ambiguous cases, it needs to be explicitly specified:\n\n```\nhiglass-manage ingest my_file.bed --filetype bedfile --datatype bedlike --assembly hg19\n```\n\nNote that bedfiles don't store chromosome sizes so they need to be passed in using \neither the `--assembly` or `--chromsizes-filename` parameters.\n\n### Listing available datasets\n\n```\npete@twok:~/projects/higlass-manage$ higlass-manage list tilesets\nVlWKy6ofT6qMFGf-uG_5pQ | beddb | bedlike | GSE93955_CHIP_DMC1_B6_peaks.bed.multires\nLAXFhHhASa2zDgJRRS67cw | cooler | matrix | H3K27me3_HiChIP_1.multi.cool\n```\n\n### Starting a shell\n\nFor debugging purposes it can be useful to run a shell within the Docker container hosting the \nhiglass instance. This can accomplished using the `shell` command:\n\n```\nhiglass-manage shell\n```\n\n### Getting the error logs\n\nWhen errors occur they are usually on the higlass-server end. To output the logs use the `logs` command:\n\n```\nhiglass-manage logs\n```\n\n### Stopping a HiGlass instance\n\nTo stop a running instance, use the `stop` command:\n\n```\nhiglass-manage stop\n```\n\n### Migrating a HiGlass instance\n\nMigrating a higlass instance between different servers can be done by copying the data-folder, typically `hg-data`, from server of origin to the destination and re-starting higlass:\n```bash\n# at the destination:\nscp -r user@old.host.org:/path/to/hg-data  /new/path/\nhiglass-manage start --data-dir /new/path/hg-data ...\n```\nTilesets ingested at the origin would be available at the destination. However, `viewconf`-s saved at the origin would not work at the destination, because the tilesets would be referred there with original URLs, e.g. `http://old.server.org:PORT`.\n\nThis can be fixed by updating `viewconfs` in the database before copying `hg-data`:\n```bash\n# at the old.host.org:\nhiglass-manage update-viewconfs --hg-name-old old_hg_name --new-site-url http://new.host.org\n```\nin this case, higlass instance `old_hg_name` would be used to infer old site URL, port and path to the data folder.\n\nSame can be achieved even without any running higlass instances, but then one has to provide path to the data folder and site's URL and port both \"new\" and \"old\":\n```bash\n# at the old.host.org:\nhiglass-manage update-viewconfs --old-site-url http://old.host.org --data-dir /old/path/to/data --new-site-url http://new.host.org\n```\n`update-viewconfs` would save updated database as `/old/path/to/data/db.sqlite3.updated` and keep the original `/old/path/to/data/db.sqlite3` unchanged. Thus, `db.sqlite3.updated` has to be renamed to `db.sqlite3` after migrating to `new.host.org`.\n\n\n## Development\n\nThe following is a list of handy commands when developing HiGlass:\n\n- **Start locally built docker image**:\nThe locally built image must be named `image-default`. Usually built using [higlass-docker](https://github.com/higlass/higlass-docker/). \n   ```\n   higlass-manage start --version local\n   ```\n\n---\n\n## License\n\nThe code in this repository is provided under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiglass%2Fhiglass-manage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiglass%2Fhiglass-manage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiglass%2Fhiglass-manage/lists"}