Giter Site home page Giter Site logo

docker_igv_js's Introduction

docker_igv_js Build Status

A Docker container to wrap IGV.js

Motivation

Visualizations in Refinery are provided by Docker containers. The link between Refinery and the Docker containers is django_docker_engine. A container may provide back-end services to a visualization, or after start up it may just serve static html and js, as is the case here. In either case the input files are provided in a directory which is mounted on a predetermined path.

Add new genomes

The IGV instance will look for genome reference files in a particular S3 bucket. To add reference files for a new assembly, check out get-reference-genomes and run genome-to-s3.sh.

Development

Clone the repository, make sure Docker is installed, and then:

pip install -r requirements.txt
python test.py

After the tests run successfully the containers used for testing are killed.

Running and accessing the container

  • The docker_igv_js container can be run by pointing to valid input.json file by url:

    • docker run -p 8080:80 -e INPUT_JSON_URL=https://raw.githubusercontent.com/refinery-platform/docker_igv_js/master/input_fixtures/good/input.json gehlenborglab/docker_igv_js
  • Or an input.json file can be constructed and passed to the container directly through the envvar: INPUT_JSON.

    • docker run -p 8080:80 -e INPUT_JSON='
        {
          "node_info": {
            "id-1": {
              "file_url": "https://raw.githubusercontent.com/igvteam/igv/master/test/data/bed/intervalTest.bed",
              "node_solr_info": {"name": "track-name"}
            }
          },
          "parameters": [
            {"name": "Genome Build", "value": "hg19"}
          ]
        }' gehlenborglab/docker_igv_js
      
  • Visit http://localhost:8080

Note: The current intentions of this project are to satisfy the needs of the refinery-platform, which currently has a strict way of passing input data to the underlying application (as seen above). Decoupling this tool, and providing a more general purpose solution has been talked of here.

Release

Successful Github tags and PRs will prompt Travis to push the built image to Dockerhub. For a new version number:

git tag v0.0.x && git push origin --tags

docker_igv_js's People

Contributors

ilan-gold avatar mccalluc avatar scottx611x avatar

Watchers

 avatar

Forkers

bkbonde

docker_igv_js's Issues

How to run image once built

Thanks for creating this. I am trying to build the image and run it.

python test.py works well so I build the image with docker build -t igvtest3 ./context and it builds fine.

Then I try to run it with docker run --rm -p 8080:8080 igvtest3:latest and it hangs for a while then I ctrl+c and get an error related to the SocketServer.py. Error looks like this:

File "on_startup.py", line 95, in
start_server()
File "on_startup.py", line 82, in start_server
SocketServer.TCPServer(("", 80), Handler).serve_forever()
File "/usr/local/lib/python2.7/SocketServer.py", line 231, in serve_forever
poll_interval)
File "/usr/local/lib/python2.7/SocketServer.py", line 150, in _eintr_retry
return func(*args)
KeyboardInterrupt

any suggestions?

thanks,

Matt

Rename track and store in URL

Default track names are often less than useful: Try using the API to set the name, and then store that in the URL, so if someone loads from the same url, they will see the right name.

input.json should not mirror Refinery details

With PR #12, input.json is expecting a dump of the Refinery data structure. I'd prefer if we could keep an abstraction barrier between this and Refinery. In particular, Refinery needs to be responsible for deciding how to make a title with the information it has, and the result is what gets passed in input.json.

Chicken etc. genomes

It looks like we're hard-coded for hg19 right now:

with open("data/input.json") as f:
config_data = json.loads(f.read())
tracks = []
assembly = "hg19"
url_base = "https://s3.amazonaws.com/data.cloud.refinery-platform.org/data/igv-reference/{}/".format(
assembly
)

but it shouldn't be hard to

  • upload genome reference files to s3
  • update this to actually read the input.json

Underlying handling of VCF files

I added https://raw.githubusercontent.com/igvteam/igv/master/test/data/vcf/SRP32_v4.sorted.0.vcf to the CSV. In the network log I see these requests:

GET https://raw.githubusercontent.com/igvteam/igv/master/test/data/vcf/SRP32_v4.sorted.0.vcf.idx
OPTIONS https://raw.githubusercontent.com/igvteam/igv/master/test/data/vcf/SRP32_v4.sorted.0.vcf

  • If this type matters, we somehow need to ensure that the .idx is in place.
  • and maybe look into the IGV code to see why it needs OPTIONS.

Store current address to transparent cookie

If a user comes back to a different docker container running IGV, our default should be to zoom to the same address, I think? It might also be based on time... If it's within an hour, you're probably thinking about the same thing, longer than that, and it's reasonable to put the responsibility on the user to save the URL if the genetic address matters.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.