Permalink
Browse files

Add adaptive kmer selection

Signed-off-by: Michael Barton <mail@michaelbarton.me.uk>
  • Loading branch information...
michaelbarton committed Oct 3, 2014
1 parent 27dbf4c commit 8d841532bae4ba69bf65c82aedde9e5f449d41ea
Showing with 19 additions and 7 deletions.
  1. +14 −6 Dockerfile
  2. +2 −1 Procfile
  3. +3 −0 estimate_kmer
View
@@ -5,12 +5,20 @@ RUN echo "deb http://http.debian.net/debian jessie main contrib non-free" > /etc
RUN apt-get update -y
RUN apt-get install -y libsparsehash-dev libboost-all-dev openmpi-bin gcc build-essential make autoconf bsdmainutils
-ADD https://github.com/bcgsc/abyss/releases/download/1.5.2/abyss-1.5.2.tar.gz /tmp/
-RUN tar xzf /tmp/abyss-1.5.2.tar.gz
-WORKDIR /abyss-1.5.2
-RUN ./configure && make && make install
+RUN apt-get install -y r-base
-ADD run /
+ADD http://kmergenie.bx.psu.edu/kmergenie-1.6741.tar.gz /tmp/kmergenie.tar.gz
+RUN mkdir /tmp/kmergenie
+RUN tar xzf /tmp/kmergenie.tar.gz --directory /tmp/kmergenie --strip-components=1
+RUN cd /tmp/kmergenie && make && make install
+
+ADD https://github.com/bcgsc/abyss/releases/download/1.5.2/abyss-1.5.2.tar.gz /tmp/abyss.tar.gz
+RUN mkdir /tmp/abyss
+RUN tar xzf /tmp/abyss.tar.gz --directory /tmp/abyss --strip-components=1
+RUN cd /tmp/abyss && ./configure && make && make install
+
+ADD run /usr/local/bin/
+ADD estimate_kmer /usr/local/bin/
ADD Procfile /
-ENTRYPOINT ["/run"]
+ENTRYPOINT ["run"]
View
@@ -1,3 +1,4 @@
-k-32: abyss-pe k=32 name=genome in=${READS}
default: abyss-pe k=64 name=genome in=${READS}
+adaptive: abyss-pe k=$(estimate_kmer ${READS}) name=genome in=${READS}
+k-32: abyss-pe k=32 name=genome in=${READS}
k-96: abyss-pe k=96 name=genome in=${READS}
View
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+kmergenie $1 2> /dev/null | tail -n 1 | cut -f 3 -d ' '

3 comments on commit 8d84153

@michaelbarton

This comment has been minimized.

Show comment
Hide comment
@michaelbarton

michaelbarton Oct 3, 2014

Contributor

@sjackman I have added a Procfile entry estimating kmer size using kmergenie

Contributor

michaelbarton replied Oct 3, 2014

@sjackman I have added a Procfile entry estimating kmer size using kmergenie

@sjackman

This comment has been minimized.

Show comment
Hide comment
@sjackman

sjackman Oct 3, 2014

Contributor

Nice! Thanks. I'll be interested to see how often it beats out the other three values of k.

Contributor

sjackman replied Oct 3, 2014

Nice! Thanks. I'll be interested to see how often it beats out the other three values of k.

@sjackman

This comment has been minimized.

Show comment
Hide comment
@sjackman

sjackman Oct 3, 2014

Contributor

Would kmergenie be a more descriptive name than adaptive? I'd use adaptive if it were an internal function of ABySS, but I feel kmergenie deserves the exposure in this case, and is more transparent to the user of what's actually happening.

Contributor

sjackman replied Oct 3, 2014

Would kmergenie be a more descriptive name than adaptive? I'd use adaptive if it were an internal function of ABySS, but I feel kmergenie deserves the exposure in this case, and is more transparent to the user of what's actually happening.

Please sign in to comment.