diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..44dcd20 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,52 @@ +FROM alpine:latest +# build from Alpine for much smaller final image + +# Set working dir as /RNApeg +WORKDIR /RNApeg + +# Tell the OS that this is a non-interactive frontend only for build +ARG DEBIAN_FRONTEND=noninteractive + +# +# Alpine-based install: +# +RUN apk add --no-cache openjdk8-jre +# don't need full JDK, just runtime +RUN apk add --no-cache curl +RUN apk add --no-cache make +RUN apk add --no-cache gcc +RUN apk add --no-cache perl +RUN apk add --no-cache perl-utils +# for "cpan" command-line utility +RUN apk add --no-cache perl-dev +RUN apk add --no-cache musl-dev +# these two for headers required to build perl DBI module +RUN apk add --no-cache perl-doc +# required for perl "use diagnostics", used by SampleName.pm +RUN apk add --no-cache db-dev +RUN apk add --no-cache expat-dev + +# Install perl modules +RUN cpan App:cpanminus +RUN cpanm --no-wget Data::Compare && chown -R root:root /root/.cpanm +RUN cpanm --no-wget DB_File XML::Parser::PerlSAX XML::Twig XML::DOM +RUN cpanm --no-wget Bio::Tools::CodonTable +RUN cpanm --no-wget DBI +RUN cpanm --no-wget Set::IntSpan + +# Put code into place +COPY src/main/scripts /RNApeg/src/bin +COPY src/main/java /RNApeg/src/javalib +COPY src/main/perllib /RNApeg/src/perllib +COPY dependencies/bin /RNApeg/src/bin +COPY dependencies/lib/java /RNApeg/src/javalib +COPY dependencies/lib/perl /RNApeg/src/perllib +COPY src/main/docker/RNApeg.sh /RNApeg/src/bin + +# Change environment variables +ENV PATH="/RNApeg/src/bin:${PATH}" +ENV PERL5LIB="/RNApeg/src/perllib:${PERL5LIB}" +ENV CLASSPATH=/RNApeg/src/javalib/* + +ENTRYPOINT ["/RNApeg/src/bin/RNApeg.sh"] +CMD ["-h"] diff --git a/src/main/scripts/aberrant_splicing_summary.pl b/src/main/scripts/aberrant_splicing_summary.pl index f2608e7..31ba417 100755 --- a/src/main/scripts/aberrant_splicing_summary.pl +++ b/src/main/scripts/aberrant_splicing_summary.pl @@ -1,4 +1,4 @@ -#!/bin/env perl +#!/usr/bin/env perl # simple reporting of strongest evidence of aberrant splicing by gene # # TO DO: diff --git a/src/main/scripts/junction2bed.pl b/src/main/scripts/junction2bed.pl index c1480f8..b3fd1ed 100755 --- a/src/main/scripts/junction2bed.pl +++ b/src/main/scripts/junction2bed.pl @@ -1,4 +1,4 @@ -#!/bin/env perl +#!/usr/bin/env perl # convert tab-delimited annotated junction file to .bed format # (w/various optional filters) # diff --git a/src/main/scripts/junction2gencode.pl b/src/main/scripts/junction2gencode.pl index 8e8efb4..2aaaba6 100755 --- a/src/main/scripts/junction2gencode.pl +++ b/src/main/scripts/junction2gencode.pl @@ -1,4 +1,4 @@ -#!/bin/env perl +#!/usr/bin/env perl # annotate junction files re: "primary" ENSEMBL transcripts # MNE 2/2015 # diff --git a/src/main/scripts/junction_excerpt.pl b/src/main/scripts/junction_excerpt.pl index bf08e17..c5640da 100755 --- a/src/main/scripts/junction_excerpt.pl +++ b/src/main/scripts/junction_excerpt.pl @@ -1,4 +1,4 @@ -#!/bin/env perl +#!/usr/bin/env perl # create use strict; diff --git a/src/main/scripts/junction_extraction_wrapper.pl b/src/main/scripts/junction_extraction_wrapper.pl index 756a777..ff14324 100755 --- a/src/main/scripts/junction_extraction_wrapper.pl +++ b/src/main/scripts/junction_extraction_wrapper.pl @@ -347,15 +347,15 @@ sub perl_test { my @cmds; - push @cmds, "/bin/env perl -v"; - push @cmds, '/bin/env perl -e \'print "perl binary=$^X\n"\''; + push @cmds, "/usr/bin/env perl -v"; + push @cmds, '/usr/bin/env perl -e \'print "perl binary=$^X\n"\''; foreach my $script (qw( bam_junction.pl floating_junction_fix.pl junction2gene.pl )) { - push @cmds, sprintf '/bin/env perl -cw `which %s`', $script; + push @cmds, sprintf '/usr/bin/env perl -cw `which %s`', $script; } foreach my $cmd (@cmds) { diff --git a/src/main/scripts/junction_filter.pl b/src/main/scripts/junction_filter.pl index 00a65fc..efe3799 100755 --- a/src/main/scripts/junction_filter.pl +++ b/src/main/scripts/junction_filter.pl @@ -1,4 +1,4 @@ -#!/bin/env perl +#!/usr/bin/env perl # remove novel junctions present in other junction files use strict; diff --git a/src/main/scripts/junction_gene_extract.pl b/src/main/scripts/junction_gene_extract.pl index edcbb59..9aa7ecf 100755 --- a/src/main/scripts/junction_gene_extract.pl +++ b/src/main/scripts/junction_gene_extract.pl @@ -1,4 +1,4 @@ -#!/bin/env perl +#!/usr/bin/env perl # extract results for individual genes from rnapeg output, # in tab-delimited and .bed format # MNE 7/2014 diff --git a/src/main/scripts/known_downgrade.pl b/src/main/scripts/known_downgrade.pl index 1ece30a..2f98ceb 100755 --- a/src/main/scripts/known_downgrade.pl +++ b/src/main/scripts/known_downgrade.pl @@ -1,4 +1,4 @@ -#!/bin/env perl +#!/usr/bin/env perl # downgrade "known" junctions to "novel" if evidence is exclusive to # a database we don't want to use for aberrant classification (e.g. AceView) # Do this AFTER standard annotation/correction: diff --git a/src/main/scripts/novel_exon_junction_finder.pl b/src/main/scripts/novel_exon_junction_finder.pl index 4c063c9..450d540 100755 --- a/src/main/scripts/novel_exon_junction_finder.pl +++ b/src/main/scripts/novel_exon_junction_finder.pl @@ -1,4 +1,4 @@ -#!/bin/env perl +#!/usr/bin/env perl # in corrected junction counts, find: # - novel skips of known exons # - novel exons (1 end bounding known exon) diff --git a/src/main/scripts/report_excerpt.pl b/src/main/scripts/report_excerpt.pl index 4043290..ba189fa 100755 --- a/src/main/scripts/report_excerpt.pl +++ b/src/main/scripts/report_excerpt.pl @@ -1,4 +1,4 @@ -#!/bin/env perl +#!/usr/bin/env perl use strict; use warnings;