Coder Social home page Coder Social logo

hybpiper-docker's Introduction

hybpiper-docker

Dockerfile and image for running HybPiper with Python 3.

Example Usage

Pull the most recent build:

docker pull joelnitta/hybpiper

Running HybPiper within the container

Launch the container:

docker run --rm -it joelnitta/hybpiper

You should now be inside the container, in the /home directory.

All HybPiper scripts have been added to $PATH, so you can call them directly from any directory.

Check that all dependencies are installed:

reads_first.py --check-depend

Run the HybPiper tutorial:

cd /apps/HybPiper/test_dataset
tar -zxvf test_reads.fastq.tar.gz
reads_first.py -b test_targets.fasta -r NZ281_R*_test.fastq --prefix NZ281 --bwa

...

Running HybPiper from outside the container

Alternatively, you can run HybPiper commands directly from the command line by mounting a volume.

For example, mount /working/dir containing test_targets.fasta, NZ281_R1_test.fastq, and NZ281_R2_test.fastq from the tutorial data, and run reads_first.py:

docker run --rm --entrypoint reads_first.py -v /working/dir:/home joelnitta/hybpiper -b test_targets.fasta -r NZ281_R*_test.fastq --prefix NZ281 --bwa

To run a different HybPiper script, change the script name after --entrypoint and provide arguments to that script after joelnitta/hybpiper. Note that any filename arguments must have their paths relative to the working directory.

hybpiper-docker's People

Contributors

joelnitta avatar

Watchers

 avatar

hybpiper-docker's Issues

Not all hybpiper scripts exectuable

Right now reads_first.py is executable after running chmod +x *.py, but not the others (at least some of them, haven't them checked all yet).

I think this is because the image runs python3, but not all scripts have a shebang set up for python3.

For example, the shebang of reads_first.py is #!/usr/bin/env python, but the shebang of hybpiper_stats.py is #!/usr/bin/env python2. However, hybpiper_stats.py does not seem to require python2 - it runs fine if we provide the interpreter as usual per python hybpiper_stats.py. So this seems to be a relic from when HybPiper was only compatible with python2.

I suppose I could either fix this by making the image run both python2 and python3, or file an issue on the main HybPiper repo to request a fix. Since #!/usr/bin/env python seems more flexible (important when running not in a container) the latter seems preferable.

See also:
https://stackoverflow.com/questions/2429511/why-do-people-write-the-usr-bin-env-python-shebang-on-the-first-line-of-a-pyt

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.