Skip to content

Commit

Permalink
Merge branch 'master' into wgs-whole-region-deleted-v2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Colelyman committed Oct 10, 2024
2 parents e142de2 + 14139c3 commit 8eddce8
Show file tree
Hide file tree
Showing 69 changed files with 9,971 additions and 6,477 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
- image: kclem/crispresso2vpy3
- image: pinellolab/crispresso2:v2.3.0

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
Expand Down
18 changes: 18 additions & 0 deletions .github/envs/test_env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: test_env
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- pip
- fastp
- numpy<2
- cython
- jinja2
- tbb=2020.2
- pyparsing=2.3.1
- scipy
- matplotlib=3.8.4
- pandas>2
- pip:
- ydiff
7 changes: 7 additions & 0 deletions .github/workflows/.pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[FORMAT]
max-line-length=150
max-args=15
max-locals=40

[MESSAGES CONTROL]
disable = E0401, W0719
47 changes: 47 additions & 0 deletions .github/workflows/aws_ecr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Push Docker image to Amazon ECR

on:
release:
types:
- edited
- released
branches:
- master

jobs:
build-and-push:
name: Build and Push Docker image
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- id: get_version
name: Get version
uses: jannemattila/get-version-from-tag@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push the image to Amazon ECR
id: build-image
env:
AWS_ACCOUNT: ${{ secrets.AWS_ACCOUNT_ID }}
ECR_REPOSITORY: 'crispresso2'
AWS_REGION: 'us-east-1'
IMAGE_TAG: v${{ steps.get_version.outputs.version }}
run: |
# Build a docker container and push it to ECR
docker build -t $AWS_ACCOUNT.dkr.ecr.$AWS_REGION.amazonaws.com/$ECR_REPOSITORY:$IMAGE_TAG .
echo "Pushing image to ECR..."
docker push $AWS_ACCOUNT.dkr.ecr.$AWS_REGION.amazonaws.com/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$AWS_ACCOUNT.dkr.ecr.$AWS_REGION.amazonaws.com/$ECR_REPOSITORY:$IMAGE_TAG"
135 changes: 135 additions & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: Run Integration Tests

on:
push:

pull_request:
types: [opened, reopened]

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
env:
CRISPRESSO2_DIR: ${GITHUB_WORKSPACE}/../CRISPResso2_copy

strategy:
fail-fast: false

steps:
- uses: actions/checkout@v3

- name: Setup Conda Env
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test_env
channels: conda-forge,bioconda,defaults
auto-activate-base: false
use-mamba: true

- name: Get Date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash

- name: Cache Conda Env
id: cache-env
uses: actions/cache@v3
env:
# Increase this number to reset the cache if envs/test_env.yml hasn't changed
CACHE_NUMBER: 0
with:
path: /usr/share/miniconda/envs/test_env
key: conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('.github/envs/test_env.yml') }}

- name: Update Conda Env
run: |
conda env update -n test_env -f .github/envs/test_env.yml
if: steps.cache-env.outputs.cache-hit != 'true'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ bowtie2 samtools libsys-hostname-long-perl
conda list
- name: Create directory for files
run: |
mkdir ../CRISPResso2_copy
cp -r * ../CRISPResso2_copy
- name: Copy C2_tests repo
uses: actions/checkout@v3
with:
repository: edilytics/CRISPResso2_tests
# ref: '<BRANCH-NAME>' # update to specific branch

- name: Run Basic
run: |
make basic test print
- name: Run Params
if: success() || failure()
run: |
make params test print
- name: Run Prime Editor
if: success() || failure()
run: |
make prime-editor test print
- name: Run BAM Input
if: success() || failure()
run: |
make bam test print
- name: Run BAM Output
if: success() || failure()
run: |
make bam-out test print
- name: Run BAM Genome Output
if: success() || failure()
run: |
make bam-out-genome test print
- name: Run Batch
if: success() || failure()
run: |
make batch test print
- name: Run Pooled
if: success() || failure()
run: |
make pooled test print
- name: Run Pooled Mixed Mode
if: success() || failure()
run: |
make pooled-mixed-mode test print
- name: Run Pooled Mixed Mode Demux
if: success() || failure()
run: |
make pooled-mixed-mode-genome-demux test print
- name: Run Pooled Paired Sim
if: success() || failure()
run: |
make pooled-paired-sim test print
- name: Run WGS
if: success() || failure()
run: |
make wgs test print
- name: Run Compare
if: success() || failure()
run: |
make compare test print
- name: Run Aggregate
if: success() || failure()
run: |
make aggregate test print
27 changes: 27 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Pylint

on:
push:

pull_request:
types: [opened, reopened]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
pylint --fail-under=6.2 $(git ls-files '*.py') --rcfile=/home/runner/work/CRISPResso2/CRISPResso2/.github/workflows/.pylintrc
45 changes: 45 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Run Pytest

on:
push:

pull_request:
types: [opened, reopened]

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}

strategy:
fail-fast: false

steps:
- uses: actions/checkout@v3

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
with:
channels: conda-forge,bioconda,defaults
auto-activate-base: false
activate-environment: test_env
environment-file: .github/envs/test_env.yml

- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ bowtie2 samtools libsys-hostname-long-perl
- name: Install Pytest
run: |
pip install pytest pytest-cov
- name: Install CRISPResso
run: |
pip install -e .
- name: Run Pytest
run: |
pytest tests --cov CRISPResso2
14 changes: 0 additions & 14 deletions CRISPResso.py

This file was deleted.

Loading

0 comments on commit 8eddce8

Please sign in to comment.