Commit e8d5bd76 authored by pjotrp's avatar pjotrp
Browse files

Created ODGI container

parent 0c26c0aa
......@@ -12,6 +12,7 @@
- [[#docker][Docker]]
- [[#providing-a-usable-docker-container][Providing a usable Docker container]]
- [[#building-docker-image-of-conda-with-guix][Building Docker Image of Conda with Guix]]
- [[#common-workflow-language-cwl][Common Workflow Language (CWL)]]
* Introduction
......@@ -157,7 +158,7 @@ want to create /usr/bin pointing to $GUIX_ENVIRONMENT/bin
Note that /gnu/store is immutable and can therefore be shared with the
main system. This makes GNU Guix containers really small and fast.
*** Docker
*** Docker image
With GNU Guix you can create a Docker image without actually installing Docker(!)
......@@ -172,8 +173,24 @@ env GUIX_PACKAGE_PATH=../guix-bioinformatics/ \
note we now have the -S switch which can make the /usr/bin symlink
into the profile.
*** Run Docker
This produced a file which we can be loaded into Docker
Docker is part of Guix too:
guix package -i docker containerd docker-cli -p ~/opt/docker
source ~/opt/docker/etc/profile
Start the ~dockerd~ as ~root~ and make sure permissions are set
groupadd docker
usermod -aG docker ${USER}
: docker load --input /gnu/store/0p1ianjqqzbk1rr9rycaqcjdr2s13mcj-docker-pack.tar.gz
: docker images
......@@ -365,3 +382,88 @@ fredmanglis/guix-sambamba bash -c "sambamba view /data/test.bam"
the `--volume` option enables one to mount a specific directory to the docker
container that is created, so that the data is available to the running
* Common Workflow Language (CWL)
For [[][COVID-19 PubSeq]] a tool named [[][ODGI]] was required in a CWL [[][module]] to
generate RDF. The quickest way to get a working Docker container was
by using GNU Guix. ODGI is currently maintained and packaged in an
external [[][guix-genomics]] repo by Erik Garrison. It is simply a matter of
adding a channel or by using the ~GUIX_PACKAGE_PATH~ after a git clone
of guix-genomics we build odgi in a [[./][profile]]
env GUIX_PACKAGE_PATH=~/guix-genomics ~/.config/guix/current/bin/guix package -i odgi -p ~/opt/vgtools
and a quick test shows
tux01:~$ ~/opt/vgtools/bin/odgi
odgi: dynamic succinct variation graph tool, version #<procedure version ()>
usage: /home/pjotr/opt/vgtools/bin/odgi <command> [options]
main mapping and calling pipeline:
-- build build dynamic succinct variation graph
-- stats describe the graph and its path relationships
-- sort sort a variation graph
-- view projection of graphs into other formats
-- kmers process and dump the kmers of the graph
-- unitig emit the unitigs of the graph
-- viz visualize the graph
-- paths interrogation and manipulation of paths
-- prune prune the graph based on coverage or topological complexity
-- unchop merge unitigs into single nodes
-- normalize compact unitigs and simplify redundant furcations
-- subset extract subsets of the graph as defined by query criteria
-- bin bin path information across the graph
-- matrix graph topology in sparse matrix form
-- chop chop long nodes into short ones while preserving topology
-- groom resolve spurious inverting links
-- layout use SGD to make 2D layouts of the graph
-- flatten project the graph sequence and paths into FASTA and BED
-- break break cycles in the graph
-- pathindex create a path index for a given graph
-- panpos get the pangenome position for a given path and nucleotide position (1-based)
-- server start a HTTP server with a given index file to query a pangenome position
-- version get the git version of odgi
-- test run unit tests
For more commands, type `odgi help`.
Now can try building a Guix container with
env GUIX_PACKAGE_PATH=~/guix-genomics ~/.config/guix/current/bin/guix environment -C --ad-hoc odgi
yes, that works too. Great, now we package a Docker image
env GUIX_PACKAGE_PATH=~/guix-genomics ~/.config/guix/current/bin/guix pack -f docker odgi
which created a container in
~/gnu/store/d68qyyvqchlgq3lzh3qgmlg9k42c9yas-docker-pack.tar.gz~ of
size 30MB. Tiny!
After installing docker (part of GNU Guix) you can test
docker load --input d68qyyvqchlgq3lzh3qgmlg9k42c9yas-docker-pack.tar.gz
docker images
odgi latest 5351dc5d4fc8 50 years ago 102MB
docker run 5351dc5d4fc8 odgi
odgi: dynamic succinct variation graph tool, version #<procedure version ()>
It works!
Next we make it available for general use. I pushed it to IPFS
for [[][sharing]].
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment