Skip to content

Commit

Permalink
Snakemake file test working
Browse files Browse the repository at this point in the history
  • Loading branch information
cjprybol committed Jun 19, 2022
1 parent 00ee14b commit 3e30308
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"ms-python.python",
"julialang.language-julia",
"ms-azuretools.vscode-docker",
"vscodevim.vim"
"vscodevim.vim",
"DavidAnson.vscode-markdownlint"
]
}
},
Expand All @@ -71,5 +72,6 @@
// "oryx build -p virtualenv_name=.venv --log-file /tmp/oryx-build.log --manifest-dir /tmp || echo 'Could not auto-build. Skipping.'",
// "python -m bash_kernel.install",
// "rvm rvmrc warning ignore all.rvmrcs"
"sudo jupyter lab --allow-root"
]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ docs/build/
*.md_checkpoints
*.ipynb.md
docs/src
data
.snakemake
22 changes: 20 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ USER root
# COPY requirements.txt .
# pip install requirements.txt

RUN conda install -c conda-forge mamba
RUN mamba install -c conda-forge -c bioconda snakemake

# conda
# write out current installations
# conda list --explicit > spec-file.txt
Expand All @@ -25,8 +28,8 @@ USER root
# RUN conda install --file spec-file.txt

# install R & R kernel
RUN conda install -y -c conda-forge r-base
RUN conda install -y -c r r-essentials
RUN mamba install -y -c conda-forge r-base
# RUN conda install -y -c r r-essentials
ENV PATH=/opt/conda/bin:$PATH
RUN Rscript -e 'install.packages("IRkernel",repos = "http://cran.us.r-project.org");IRkernel::installspec()'
# install additional R packages here
Expand All @@ -52,5 +55,20 @@ RUN julia -e 'import Pkg; Pkg.instantiate()'
# install bash kernel
# RUN pip install bash_kernel

# Install jupyter templates
RUN pip install jupyter_contrib_nbextensions
RUN jupyter contrib nbextension install
RUN pip install jupyterlab_templates
RUN jupyter labextension install jupyterlab_templates
RUN jupyter serverextension enable --py jupyterlab_templates

# copy templates into this directory for them to automatically pop up
# /usr/local/share/jupyter/labextensions/jupyterlab_templates

# adding templates
# https://github.com/jpmorganchase/jupyterlab_templates#adding-templates

# install papermill, which will be our script driver

WORKDIR $CODESPACE_VSCODE_FOLDER
USER codespace
24 changes: 18 additions & 6 deletions Snakefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
rule bwa_map:
input:
"data/genome.fa",
"data/samples/{sample}.fastq"
# https://papermill.readthedocs.io/en/latest/usage-cli.html
# run `snakemake some_target --delete-all-output` to clean outputs from target
# run `snakemake --delete-all-output --cores all` to clean all outputs
# run `snakemake --cores all` to run whole workflow
# run `snakemake some_target --cores all` to run up to and through target

rule hello_world:
output:
"mapped_reads/{sample}.bam"
"data/test.txt"
shell:
"bwa mem {input} | samtools view -Sb - > {output}"
"mkdir -p data && echo 'this is a test' > data/test.txt"

# rule bwa_map:
# input:
# "data/genome.fa",
# "data/samples/{sample}.fastq"
# output:
# "mapped_reads/{sample}.bam"
# shell:
# "bwa mem {input} | samtools view -Sb - > {output}"

# rule samtools_sort:
# input:
Expand Down

0 comments on commit 3e30308

Please sign in to comment.