Skip to content

Commit

Permalink
Merge branch 'development' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
iquasere committed Apr 28, 2023
2 parents 373d765 + 66fa471 commit dfe4714
Show file tree
Hide file tree
Showing 68 changed files with 1,359 additions and 2,759 deletions.
63 changes: 30 additions & 33 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,21 @@ name: CI

on:
push:
branches: [ development ]
branches:
- development
- master
pull_request:
branches: [ development ]
branches:
- development
- master


# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v2

Expand All @@ -43,7 +40,7 @@ jobs:
name: mosca
path: /tmp/mosca.tar

use:
mgmt-workflow:
runs-on: ubuntu-latest
needs: build
steps:
Expand All @@ -61,31 +58,31 @@ jobs:
docker load --input /tmp/mosca.tar
docker image ls -a
- name: Check base entrypoint
run: docker run mosca /bin/bash -c "ls"
- name: MGMT workflow
run: docker run mosca /bin/bash -c "mosca -c MOSCARDO/configs/mgmt_config.json"

mgmp-workflow:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Download artifact
uses: actions/download-artifact@v2
with:
name: mosca
path: /tmp

- name: Load Docker image
run: |
docker load --input /tmp/mosca.tar
docker image ls -a
- name: Create named volume
run: docker volume create named_volume

- name: MGMT workflow
run: docker run mosca /bin/bash -c "mosca.py -c MOSCARDO/configs/mgmt_config.json; rm -r output"

- name: test_docker
- name: MGMP workflow
run: >
docker run -v named_volume:/data -v /var/run/docker.sock:/var/run/docker.sock mosca /bin/bash
-c 'cp MOSCARDO/input/mp1/mp1.RAW data/mp1.RAW; docker run --rm -e WINEDEBUG=-all -v named_volume:/data chambm/pwiz-skyline-i-agree-to-the-vendor-licenses wine msconvert /data/mp1.RAW --mgf --filter "peakPicking cwt"; ls /data'
#- name: MGMP workflow
# run: >
# docker run -v named_volume:/data -v /var/run/docker.sock:/var/run/docker.sock mosca /bin/bash
# -c "mosca.py -c MOSCARDO/configs/mgmp_config.json"

#- name: MG only workflow
# run: >
# docker run mosca /bin/bash -c "mkdir resources_directory; mv MOSCARDO/data/cdd.tar.gz resources_directory;
# cp MOSCARDO/data/mg_R1.fastq.gz MOSCARDO/data/mg_R1_001.fastq.gz;
# cp MOSCARDO/data/mg_R2.fastq.gz MOSCARDO/data/mg_R2_001.fastq.gz;
# mosca.py -c MOSCARDO/configs/mg_only_config.json"

#- name: MT only workflow
# run: docker run mosca /bin/bash -c "mosca.py -c MOSCARDO/configs/mt_config.json"
docker run -v named_volume:/data -v /var/run/docker.sock:/var/run/docker.sock mosca /bin/bash
-c "mosca -c MOSCARDO/configs/mgmp_config.json; du -sh output/*; df -h"
11 changes: 10 additions & 1 deletion Dockerfile_CI
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# This Dockerfile should only be used for testing purposes
# It differs from the main Dockerfile by including the download of MOSCARDO's files to be run with MOSCA
# Also includes the creation of a named_volume automatically, neccessary for MP spectra conversion

FROM continuumio/miniconda3

VOLUME ["named_volume"]
Expand All @@ -13,8 +17,13 @@ RUN buildDeps='build-essential zlib1g-dev' \
# Install MOSCA
&& git clone https://github.com/iquasere/MOSCA.git -b development \
&& bash MOSCA/install.bash --mosca_env "$(conda info --base)" \
# Fix AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK' \
# https://stackoverflow.com/questions/74981558/error-updating-python3-pip-attributeerror-module-lib-has-no-attribute-openss
# https://stackoverflow.com/questions/73830524/attributeerror-module-lib-has-no-attribute-x509-v-flag-cb-issuer-check
&& pip install cryptography==38.0.4 \
&& pip install pyopenssl --upgrade \
&& conda clean --all \
&& apt-get install -y packagekit-gtk3-module libasound2 libdbus-glib-1-2 libx11-xcb1 curl \
&& apt-get install -y curl \
&& curl -fsSL https://get.docker.com -o get-docker.sh \
&& sh get-docker.sh \
&& apt-get purge -y --auto-remove $buildDeps
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<img width="40%" src="resources/mosca_logo.png" alt="Logo" title="Logo by Sérgio A. Silva">
</p>

[![Development CI](https://github.com/iquasere/MOSCA/actions/workflows/main.yml/badge.svg?branch=development)](
[![Development CI](https://github.com/iquasere/MOSCA/actions/workflows/main.yml/badge.svg)](
https://github.com/iquasere/MOSCA/actions/workflows/main.yml) [
![GitHub release](https://img.shields.io/github/release/iquasere/MOSCA.svg)](
https://github.com/iquasere/MOSCA/releases/latest) [
Expand Down
4 changes: 1 addition & 3 deletions base_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ channels:
- defaults
dependencies:
- python >=3.9
- pandas
- snakemake-minimal
- mamba
- snakemake
12 changes: 5 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
dir="${PREFIX}/share/MOSCA"
mkdir -p "${dir}/scripts" "${PREFIX}/bin"
cp workflow/scripts/* "${dir}/scripts"
cp workflow/Snakefile workflow/mosca.py "${dir}/scripts"
cp -r resources "${dir}/resources"
chmod +x "${dir}/scripts/mosca.py"
ln -s "${dir}/scripts/mosca.py" "${PREFIX}/bin/"
echo "Storing MOSCA's files in the Conda environment at: ${PREFIX}"
mkdir -p "${PREFIX}/share/MOSCA" "${PREFIX}/bin"
cp -r MOSCA/workflow/* "${PREFIX}/share/MOSCA"
chmod +x "${PREFIX}/share/MOSCA/mosca.py"
ln -s "${PREFIX}/share/MOSCA/mosca.py" "${PREFIX}/bin/mosca"
Loading

0 comments on commit dfe4714

Please sign in to comment.