Skip to content

Commit

Permalink
Merge pull request #49 from friendsofstrandseq/dev
Browse files Browse the repository at this point in the history
2.2.1: fixes
  • Loading branch information
weber8thomas authored Aug 22, 2023
2 parents 5913949 + 05c6753 commit 58bc400
Show file tree
Hide file tree
Showing 19 changed files with 895 additions and 460 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,4 @@ workflow/data/arbigent/scTRIP_segmentation.bed
.tests/data_CHR17/RPE-BM510/bam/*.bam.raw
.tests/data_CHR17/RPE-BM510/bam/*.bam.sort
.tests/external_data/chr17.fa.log
LOGS_DEV/
38 changes: 38 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM gitpod/workspace-full:2023-03-24-02-48-18

ENV RETRIGGER=4

ENV BUILDKIT_VERSION=0.11.6
ENV BUILDKIT_FILENAME=buildkit-v${BUILDKIT_VERSION}.linux-amd64.tar.gz
ENV DAZZLE_VERSION=0.1.17

USER root

# Install dazzle, buildkit and pre-commit
RUN curl -sSL https://github.com/moby/buildkit/releases/download/v${BUILDKIT_VERSION}/${BUILDKIT_FILENAME} | tar -xvz -C /usr
RUN curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v${DAZZLE_VERSION}/dazzle_${DAZZLE_VERSION}_Linux_x86_64.tar.gz | tar -xvz -C /usr/local/bin
RUN curl -sSL https://github.com/mvdan/sh/releases/download/v3.5.1/shfmt_v3.5.1_linux_amd64 -o /usr/bin/shfmt \
&& chmod +x /usr/bin/shfmt
RUN install-packages shellcheck \
&& pip3 install pre-commit
RUN curl -sSL https://github.com/mikefarah/yq/releases/download/v4.22.1/yq_linux_amd64 -o /usr/bin/yq && chmod +x /usr/bin/yq

# Apptainer installation
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:apptainer/ppa && \
apt-get update && \
apt-get install -y apptainer

# Mambaforge installation
RUN wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh && \
sh Mambaforge-Linux-x86_64.sh -b -p /home/gitpod/mambaforge && \
/home/gitpod/mambaforge/bin/mamba create -n snakemake -c bioconda -c conda-forge snakemake && \
/home/gitpod/mambaforge/bin/mamba init && \
echo "source /home/gitpod/mambaforge/bin/activate" >> /home/gitpod/.bashrc && \
echo "conda activate snakemake" >> /home/gitpod/.bashrc

# Clean up to reduce image size
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm Mambaforge-Linux-x86_64.sh
72 changes: 70 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,72 @@
image: condaforge/mambaforge:latest
image:
file: .gitpod.Dockerfile

ports:
- port: 5000
onOpen: ignore

tasks:
- name: install pre-commit git hooks
init: pre-commit install
- name: start up buildkitd
command: |
sudo /usr/bin/buildkitd --debug --config ./buildkitd.toml --group gitpod
- name: start a local docker registry
command: |
mkdir -p /workspace/registry
docker run -p 5000:5000 --name registry --rm -v /workspace/registry:/var/lib/registry registry:2
openMode: split-right
- name: dazzle build and test
command: |
gp ports await 5000
REPO=localhost:5000/dazzle
echo "To build specific chunks and combine them 'time ./build-chunk.sh -c chunk1 -c chunk2:variant1.2.3 -n combo'"
echo "To build all the chunks and combinations 'time ./build-all.sh'"
echo "To build a specific combination 'time ./build-combo.sh combo'"
echo "To list image chunks 'dazzle project image-name $REPO'"
echo "To list hashes for image chunks 'dazzle project hash $REPO'"
echo "To print the combined image maniest 'dazzle project manifest $REPO'"
openMode: tab-after

# MOSAICATCHER

# MOSAICATCHER

- name: Change cache location
command: |
mkdir -p ~/my_mamba_cache
export CONDA_PKGS_DIRS=~/my_mamba_cache
- name: Create snakemake env
command: mamba create -n snakemake -c bioconda -c conda-forge snakemake=7.18.2 -y
command: mamba create -n snakemake -c bioconda -c conda-forge snakemake -y

# - name: Run mosaicatcher
# command: |
# snakemake --configfile .tests/config/simple_config.yaml \
# --config ashleys_pipeline=True MultiQC=True \
# --profile workflow/snakemake_profiles/local/conda/ \
# --conda-frontend mamba \
# --cores 8 --forceall

# - name: Generate Dockerfile
# command: |
# snakemake --configfile .tests/config/simple_config.yaml \
# --config ashleys_pipeline=True MultiQC=True \
# --profile workflow/snakemake_profiles/local/conda/ \
# --conda-frontend mamba \
# --cores 8 --containerize

vscode:
extensions:
- ms-azuretools.vscode-docker
- timonwong.shellcheck

github:
prebuilds:
master: true
branches: true
pullRequests: true
pullRequestsFromForks: true
addCheck: true
addComment: true
4 changes: 4 additions & 0 deletions .gitpod.yml.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
image: condaforge/mambaforge:latest
tasks:
- name: Create snakemake env
command: mamba create -n snakemake -c bioconda -c conda-forge snakemake=7.18.2 -y
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
repos:
- hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-yaml
# - args:
# - --branch
# - master
# id: no-commit-to-branch
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
- hooks:
- id: snakefmt
repo: https://github.com/snakemake/snakefmt
rev: 0.4.0
- hooks:
- id: commitizen
stages:
- commit-msg
repo: https://github.com/commitizen-tools/commitizen
rev: v2.17.12
4 changes: 2 additions & 2 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# --------------------------------------------------------

# MosaiCatcher version
version: 2.2.0
version: 2.2.1

# Ashleys-QC pipeline version
ashleys_pipeline_version: 2.2.0
ashleys_pipeline_version: 2.2.1

# Email for notifications about the pipeline's status
email: ""
Expand Down
15 changes: 8 additions & 7 deletions config/config_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ MultiQC:
type: bool
required: False
default: False
multistep_normalisation_analysis:
multistep_normalisation:
desc: "Enable / Disable multistep normalisation"
type: bool
required: False
Expand All @@ -38,11 +38,6 @@ ashleys_threshold:
type: bool
required: False
default: 0.5
plate_orientation:
desc: "Plate orientation for GC analysis (landscape/portrait)"
type: string
required: False
default: landscape
window:
desc: "Mosaic bin window size"
type: int
Expand Down Expand Up @@ -73,7 +68,7 @@ samples_to_process:
type: list
required: True
default: "[]"
normalized_counts:
hgsvc_based_normalized_counts:
desc: Normalize or not mosaic counts
type: bool
required: False
Expand Down Expand Up @@ -116,3 +111,9 @@ scNOVA:
required: False
default: False
lint_check: False
genecore_prefix:
desc: ""
type: str
required: False
default: "/g/korbel/shared/genecore"
lint_check: False
Loading

0 comments on commit 58bc400

Please sign in to comment.