Commit dc251619 authored by Davis McCarthy's avatar Davis McCarthy
Browse files

Tweaking docker image and workflow

parent 253e448e
......@@ -17,18 +17,12 @@ COPY Miniconda3-latest-Linux-x86_64.sh /
RUN bash /Miniconda3-latest-Linux-x86_64.sh -b -p /miniconda
ENV PATH /miniconda:/miniconda/bin:$PATH
COPY environment.yml /
RUN conda env create -f /environment.yml python=3.6 && conda clean -a
COPY environment.yml /tmp/environment.yml
RUN conda env create -f /tmp/environment.yml python=3.6 && conda clean -a
# Pull the environment name out of the environment.yml
RUN echo "source activate embo-singlecellomics" > ~/.bashrc
ENV PATH /opt/conda/envs/embo-singlecellomics/bin:$PATH
#COPY methylQA /methylQA
# go to the methylQA folder
#RUN cd /methylQA/
# then run a make command here
#RUN make
# the binary methylQA file will be generated
#ENV PATH /methylQA:/methylQA/bin:$PATH
RUN mkdir -p /usr/local/lib/R/site-library
ADD scripts/install.R /tmp/
RUN R -f /tmp/install.R
......@@ -82,6 +82,18 @@ in case you wish to use it for the second part of the analysis.
* [`MethylQA`](http://methylqa.sourceforge.net/index.php)
* [`Singularity`](https://www.sylabs.io/docs/)
## Notes on building images with singularity
On multi-user systems, building images with Singularity can be sensitive to the
settings of `umask`, which determines the default permissions for files and
directories created by the user. On many systems, the default `umask` is often
007 or 077, which defines more stringent permissions for newly created files.
We have found that building Singularity images with these `umask` values can
lead to errors when trying to run the Singularity images. We have found it
necessary to change `umask` to 002 before building Singularity images. Once this
has been done, users with `umask` settings of 007 or 077 (and otherwise correct
permissions) should be able to run the built Singularity image.
## Acknowledgements
......
......@@ -49,7 +49,7 @@ rule fastqc_reports:
params:
output_dir="reports/fastqc/"
singularity:
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.1"
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.2"
shell:
'fastqc -o {params.output_dir} {input}'
......@@ -75,7 +75,7 @@ rule fastqc_reports_trimmed:
params:
output_dir="reports/fastqc/"
singularity:
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.1"
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.2"
shell:
'/Users/davis/src/FastQC.app/Contents/MacOS/fastqc -o {params.output_dir} {input}'
......@@ -86,7 +86,7 @@ rule bismark_prepare_genome:
output:
'genome/Bisulfite_Genome'
singularity:
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.1"
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.2"
shell:
'bismark_genome_preparation {input}'
......@@ -98,7 +98,7 @@ rule bismark:
output:
temp('data/bismark/raw/{sample}_trimmed_bismark_bt2.bam') ## CHECK BISMARK OUTPUT
singularity:
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.1"
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.2"
shell:
'bismark --non_directional --genome genome -o data/bismark/raw '
'{input}'
......@@ -110,7 +110,7 @@ rule bismark_dedup:
output:
temp('data/bismark/raw/{sample}_trimmed_bismark_bt2.deduplicated.bam') ## CHECK BISMARK OUTPUT
singularity:
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.1"
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.2"
shell:
'deduplicate_bismark --bam {input}'
......@@ -121,7 +121,7 @@ rule bismark_methylation:
output:
'data/bismark/methyl/{sample}_trimmed_bismark_bt2.deduplicated.bismark.cov.gz'
singularity:
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.1"
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.2"
shell:
'bismark_methylation_extractor --gzip --bedGraph '
'-o data/bismark/methyl {input}'
......@@ -136,7 +136,7 @@ rule multiqc:
output:
'reports/multiqc/multiqc_report.html'
singularity:
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.1"
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.2"
shell:
'multiqc --force --filename {output} '
'reports/fastqc ./ '
......@@ -153,7 +153,7 @@ rule merge_methylation:
indir = 'data/bismark/methyl',
outdir = 'data/bismark/merged'
singularity:
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.1"
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.2"
shell:
'RScript scripts/merge.R -i {params.indir} -o {params.outdir}'
......@@ -168,6 +168,6 @@ rule annotate_methylation:
annodir = 'annotation',
outdir = 'results'
singularity:
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.1"
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.2"
shell:
'RScript scripts/annotate.R -i {params.indir} -a {params.annodir} -o {params.outdir}'
Supports Markdown
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