Unverified Commit 68ad0534 authored by Chris Cheshire's avatar Chris Cheshire Committed by GitHub
Browse files

Merge pull request #33 from luslab/dev

Added CI unit testing
parents 4d44e59f 48ae7b0b
Loading
Loading
Loading
Loading
+71 −3
Original line number Diff line number Diff line
@@ -9,6 +9,9 @@ on:
    types: [published]

jobs:
  ##############################
  ### SMALL INTEGRATION TEST ###
  ##############################
  test:
    name: Run standard pipeline test
    # Only run on push if this is the nf-core dev branch (merged PRs)
@@ -33,6 +36,9 @@ jobs:
      - name: Run pipeline with test data
        run: |
          nextflow run ${GITHUB_WORKSPACE} -profile docker,test
  ##############################
  ### LARGE INTEGRATION TEST ###
  ##############################
  test_full_small:
    name: Run extended pipeline test
    # Only run on push if this is the nf-core dev branch (merged PRs)
@@ -43,8 +49,8 @@ jobs:
      NXF_ANSI_LOG: false
    strategy:
      matrix:
        # Nextflow versions: check pipeline minimum and current latest
        nxf_ver: ['21.04.0', '']
        # We only run this on the specified nextflow version for the pipeline
        nxf_ver: ['21.04.0']
    steps:
      - name: Check out pipeline code
        uses: actions/checkout@v2
@@ -57,3 +63,65 @@ jobs:
      - name: Run pipeline with test data
        run: |
          nextflow run ${GITHUB_WORKSPACE} -profile docker,test_full_small
  ##############################
  ###      UNIT TESTS        ###
  ##############################
  unit_tests:
    name: ${{ matrix.nxf_version }} ${{ matrix.tags }}
    if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/cutandrun') }}
    runs-on: ubuntu-20.04
    env:
      NXF_ANSI_LOG: false
    strategy:
      fail-fast: false
      matrix:
        nxf_version: ["21.04.0"]
        tags: ["samplesheet", "verify_output_input", "verify_output_align_short", "verify_output_align_long", "verify_output_peak_calling", "verify_output_reporting", "verify_output_save", "verify_output_skip"]
    steps:
      - uses: actions/checkout@v2

      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: "3.x"

      - uses: actions/cache@v2
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
          restore-keys: |
            ${{ runner.os }}-pip-
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: "3.x"

      - name: Install Python dependencies
        run: python -m pip install --upgrade pip pytest-workflow

      - uses: actions/cache@v2
        with:
          path: /usr/local/bin/nextflow
          key: ${{ runner.os }}-nextflow-${{ matrix.nxf_version }}
          restore-keys: |
            ${{ runner.os }}-nextflow-
      - name: Install Nextflow
        env:
          NXF_VER: ${{ matrix.nxf_version }}
          CAPSULE_LOG: none
        run: |
          wget -qO- get.nextflow.io | bash
          sudo mv nextflow /usr/local/bin/
      - name: Run pytest-workflow
        run: pytest --tag ${{ matrix.tags }} --kwdof

      - name: Upload logs on failure
        if: failure()
        uses: actions/upload-artifact@v2
        with:
          name: logs-${{ matrix.tags }}-${{ matrix.profile }}-${{ matrix.nxf_version }}
          path: |
            /tmp/pytest_workflow_*/*/.nextflow.log
            /tmp/pytest_workflow_*/*/log.out
            /tmp/pytest_workflow_*/*/log.err
            /tmp/pytest_workflow_*/*/work
+0 −6
Original line number Diff line number Diff line
@@ -47,12 +47,6 @@ module_order:
    - picard
    - custom_content

report_section_order:
    software_versions:
        order: -1000
    nf-core-cutandrun-summary:
        order: -1001

# Don't show % Dups in the General Stats table (we have this from Picard)
table_columns_visible:
    FastQC:
+7 −3
Original line number Diff line number Diff line
sample,fastq_1,fastq_2
SAMPLE_PAIRED_END,/path/to/fastq/files/AEG588A1_S1_L002_R1_001.fastq.gz,/path/to/fastq/files/AEG588A1_S1_L002_R2_001.fastq.gz
SAMPLE_SINGLE_END,/path/to/fastq/files/AEG588A4_S4_L003_R1_001.fastq.gz,
group,replicate,control_group,fastq_1,fastq_2
h3k27me3,1,1,READ1_FASTQ,READ2_FASTQC
h3k27me3,2,1,READ1_FASTQ,READ2_FASTQC
h3k4me3,1,2,READ1_FASTQ,READ2_FASTQC
h3k4me3,2,2,READ1_FASTQ,READ2_FASTQC
igg,1,1,READ1_FASTQ,READ2_FASTQC
igg,2,2,READ1_FASTQ,READ2_FASTQC
+19 −14
Original line number Diff line number Diff line
@@ -7,10 +7,20 @@
    "items": {
        "type": "object",
        "properties": {
            "sample": {
            "group": {
                "type": "string",
                "pattern": "^\\S+$",
                "errorMessage": "Sample name must be provided and cannot contain spaces"
                "errorMessage": "Sample group must be provided and cannot contain spaces"
            },
            "replicate": {
                "type": "integer",
                "pattern": "^[0-9]*$",
                "errorMessage": "Biological Replicate number within the group - technical replicates must have the same replicate number"
            },
            "control_group": {
                "type": "integer",
                "pattern": "^[0-9]*$",
                "errorMessage": "Group ID that matches to the IgG control group (if provided) - otherwise set to 0"
            },
            "fastq_1": {
                "type": "string",
@@ -18,22 +28,17 @@
                "errorMessage": "FastQ file for reads 1 must be provided, cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'"
            },
            "fastq_2": {
                "errorMessage": "FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'",
                "anyOf": [
                    {
                "type": "string",
                        "pattern": "^\\S+\\.f(ast)?q\\.gz$"
                    },
                    {
                        "type": "string",
                        "maxLength": 0
                    }
                ]
                "pattern": "^\\S+\\.f(ast)?q\\.gz$",
                "errorMessage": "FastQ file for reads 2 must be provided, cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'"
            }
        },
        "required": [
            "sample",
            "fastq_1"
            "replicate",
            "control_group",
            "fastq_1",
            "fastq_2"
        ]
    }
}
+0 −2
Original line number Diff line number Diff line
@@ -257,8 +257,6 @@ Additional QC and analysis pertaining particularly to CUT&Run and CUT&Tag data a

> **NB:** The FastQC plots displayed in the MultiQC report shows _untrimmed_ reads. They may contain adapter sequence and potentially regions with low quality.

### MultiQC

<details markdown="1">
<summary>Output files</summary>

Loading