Foreword
Software used
docker documentation: https://www.docker.com/
HiGlass documentation: http://docs.higlass.io/higlass_docker.html#running-locally
higlass-docker address: https://github.com/higlass/higlass-docker
nginx documentation: https://www.cnginx.com/
docker installation steps
#Uninstall old version sudo apt-get remove docker docker-engine docker-ce docker.io #Update index package sudo apt-get update #Install apt dependency package, used to obtain the warehouse through HTTPS sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common #Add Docker official GPG key curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - #Set up stable repository sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" #Update apt package index sudo apt-get update #Install the latest version of Docker CE sudo apt-get install -y docker-ce #Verification-View docker running status systemctl status docker #Verification - View docker version docker -v #If you install the specified version, you can use the following command #List available versions apt-cache madison docker-ce #Install the specified version sudo apt-get install docker-ce=<VERSION>
Install HiGlass docker image
Pull HiGlass docker image
it takes some time
sudo docker pull higlass/higlass-docker:v0.6.1
Create container data volume directory
#Create /higlass/hg-data for higlass file directory mapping in the docker container sudo mkdir -p /higlass/hg-data #Create /higlass/tmp, a directory for users to upload files. sudo mkdir -p /higlass/tmp
Start container
Run the following command
sudo docker run --detach \ --publish 8989:80 \ --volume ~/higlass/hg-data:/data \ --volume ~/higlass/tmp:/tmp \ --name higlass-container \ higlass/higlass-docker:v0.6.1 #--publish 8989:80 Host port 8989 and container port 80 mapping #--volume ~/higlass/hg-data:/data \ Host directory/higlass/hg-data and container/data directory mapping #--volume ~/higlass/tmp:/data \ Host directory/higlass/tmp and container/tmp directory mapping
Configure nginx for external access
Install nginx
sudo apt-get install nginx
configureconfig
Location: /etc/nginx/sites-available/default
sudo vim /etc/nginx/sites-available/default
Add the following content to location / in the file. The original restart will proxy access to port 80 of the server to the port of the higlass container.
#I tried to define the location /higlass {} module to use it, but the trouble is that some css and js in the higlass internal web service cannot be accessed. If you have to use this, you can go to the docker container and change this path yourself. Use it instead. It is better to open a separate nginx server to handle higlass.
#Replace content location/{ proxy_pass http://localhost:8989/; proxy_http_version 1.1; proxy_set_header X-Forwarded-Proto https; #Configure the packet forwarding protocol to https proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header Cookie $http_cookie; proxy_connect_timeout 30; proxy_set_header Referer $http_referer; #proxy_cookie_path [/project name] [proxy path address]; #[/project name] [proxy path address] Ensure that the cookies of https and http are consistent }
Restart nginx
sudo service nginx restart
Access client address
#This directly maps port 80 of the server, so you can directly access the IP address or domain name. http://xxx.xxx.xxx/
Effect
Generally, this client is not used if it is used embedded in the project. The display interface is embedded in other front-end frameworks and calls the api interface of the higlass server to display some content.
Access management terminal
Set the administrator account and password of the management terminal
Information can be viewed in higlass-docker
sudo docker exec -it higlass-container higlass-server/manage.py createsuperuser
As shown in the picture:
access
http://xxx.xxx.xxxx/admin
Add file display on the management side
I encountered a problem that I didn’t understand how to set up login 403. Sometimes it is correct.
After entering, you can upload the files to be displayed through the interface. Please note that the configuration items corresponding to files in different formats are also different.
File type | filetype | datatype |
mcool | cooler | matrix |
bedpe | bed2ddb | 2d-rectangle-domains |
wig | chromsizes -tsv | chromsizes |
After joining, you can select it on the client interface. Each time you add one, a unique uuid will be generated, which can be used to connect with other systems.
ubuntu command line to add file display
Move the file to the container data volume higlass/tmp and execute the command below
#mcool format sudo docker exec higlass-container python higlass-server/manage.py ingest_tileset --filename /tmp/mcool/test.mcool --filetype cooler --datatype matrix #bedpeformat sudo docker exec higlass-container python higlass-server/manage.py ingest_tileset --filename /tmp/test.bedpe --filetype bed2ddb --datatype 2d-rectangle-domains #wigformat sudo docker exec higlass-container python higlass-server/manage.py ingest_tileset --filename /tmp/test.wig --filetype chromsizes-tsv --datatype chromsizes
Client renderings
to be continued……