Skip to content

Commit

Permalink
Add adaptive kmer selection
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Barton <mail@michaelbarton.me.uk>
  • Loading branch information
michaelbarton committed Oct 3, 2014
1 parent 27dbf4c commit 8d84153
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
20 changes: 14 additions & 6 deletions Dockerfile
Expand Up @@ -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"]
3 changes: 2 additions & 1 deletion Procfile
@@ -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}
3 changes: 3 additions & 0 deletions estimate_kmer
@@ -0,0 +1,3 @@
#!/bin/bash

kmergenie $1 2> /dev/null | tail -n 1 | cut -f 3 -d ' '

3 comments on commit 8d84153

@michaelbarton
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@sjackman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@sjackman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.