Skip to content

Commit

Permalink
Merge pull request #13 from qbic-pipelines/dev
Browse files Browse the repository at this point in the history
Patch release 1.0.1
  • Loading branch information
ggabernet authored Jun 18, 2021
2 parents b71b623 + e4c0e0b commit 46367b4
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 13 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
# Nextflow versions: check pipeline minimum and current latest
nxf_ver: ['20.10.0', '']
nxf_ver: ['21.04.1', '']
steps:
- name: Check out pipeline code
uses: actions/checkout@v2
Expand All @@ -42,4 +42,37 @@ jobs:
- name: Run pipeline with test data
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker
nextflow run ${GITHUB_WORKSPACE} -profile test,docker -stub
test_profile:
name: Run workflow tests
# Only run on push if this is the nf-core dev branch (merged PRs)
if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'qbic-pipelines/cellranger') }}
runs-on: ubuntu-20.04
env:
NXF_VER: ${{ matrix.nxf_ver }}
NXF_ANSI_LOG: false
strategy:
matrix:
# Nextflow versions: check pipeline minimum and current latest
nxf_ver: ['21.04.1', '']
profile: ['test_genome']
steps:
- name: Check out pipeline code
uses: actions/checkout@v2

- name: Pull docker image
run: |
docker pull qbicpipelines/cellranger:dev
docker tag qbicpipelines/cellranger:dev qbicpipelines/cellranger:1.0
- name: Install Nextflow
env:
CAPSULE_LOG: none
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
- name: Run pipeline with test data
run: |
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.profile }},docker -stub
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.0 - Mordor

Initial release of qbic-pipelines/cellranger, created with the [nf-core](https://nf-co.re/) template.
## v1.0.1 - Mordor - patch

### `Added`

Updated to nf-core template v1.14.
* Using stub feature for CI tests.

### `Fixed`

* Fixed channel issues when not providing a reference file.

### `Dependencies`

### `Deprecated`

## v1.0 - Mordor

Initial release of qbic-pipelines/cellranger, created with the [nf-core](https://nf-co.re/) template.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

**Nextflow wrapper around the Cell Ranger pipeline for single cell RNAseq analysis**.

[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A520.10.0-brightgreen.svg)](https://www.nextflow.io/)
[![Docker](https://img.shields.io/docker/automated/nfcore/qbic-pipelines-cellranger.svg)](https://hub.docker.com/r/qbicpipelines/cellranger)
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A521.04.1-brightgreen.svg)](https://www.nextflow.io/)
[![GitHub Actions CI Status](https://github.com/qbic-pipelines/cellranger/workflows/nf-core%20CI/badge.svg)](https://github.com/qbic-pipelines/cellranger/actions)

## Introduction

<!-- TODO nf-core: Write a 1-2 sentence summary of what data the pipeline is for and what it does -->
**qbic-pipelines/cellranger** is a Nextflow pipeline that wraps the Cell Ranger pipeline for single cell RNAseq analysis. It additionally performs QC on the Fastq files
with `FastQC` and summarizes the QC with `MultiQC`.

Expand Down
1 change: 0 additions & 1 deletion conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ params {
gtf = 'https://raw.githubusercontent.com/qbic-pipelines/cellranger/dev/testdata/Homo_sapiens.GRCh38.104.chr_22.gtf'
reference_name = 'Homo_sapiens.GRCh38.chr_22'
index_file = true
save_reference = true
}
22 changes: 22 additions & 0 deletions conf/test_genome.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* -------------------------------------------------
* Nextflow config file for running tests
* -------------------------------------------------
* Defines bundled input files and everything required
* to run a fast and simple test. Use as follows:
* nextflow run nf-core/qbic-pipelines-cellranger -profile test,<docker/singularity>
*/

params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check pipeline function'
// Limit resources so that this can run on GitHub Actions
max_cpus = 2
max_memory = 6.GB
max_time = 48.h

// Input data
input = 'https://raw.githubusercontent.com/qbic-pipelines/cellranger/master/testdata/input_data.tsv'
genome = 'GRCh38'
index_file = true
}
12 changes: 12 additions & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,17 @@ if (params.index_file) {
if (params.prebuilt_reference){
if (params.genome) exit 1, "Please provide either a reference folder or a genome name, not both."
ch_reference_path = Channel.fromPath("${params.prebuilt_reference}")
ch_fasta = Channel.empty()
ch_gtf = Channel.empty()
} else if (!params.genome) {
if (!params.fasta | !params.gtf) exit 1, "Please provide either a genome reference name with the `--genome` parameter, or a reference folder, or a fasta and gtf file."
if (params.fasta) { ch_fasta = file(params.fasta, checkIfExists: true) } else { exit 1, "Please provide fasta file with the '--fasta' option." }
if (params.gtf) { ch_gtf = file(params.gtf, checkIfExists: true) } else { exit 1, "Please provide gtf file with the '--gtf' option." }
ch_reference_path = Channel.empty()
} else {
ch_fasta = Channel.empty()
ch_gtf = Channel.empty()
ch_reference_path = Channel.empty()
}

////////////////////////////////////////////////////
Expand Down Expand Up @@ -291,6 +297,12 @@ process count {
--localmem=${task.memory.toGiga()}
"""
}

stub:
"""
mkdir -p "sample-${GEM}/outs/"
touch sample-${GEM}/outs/fake_file.txt
"""
}

/*
Expand Down
7 changes: 4 additions & 3 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
params {

// Workflow flags
index_file = true
index_file = false
input = null
input_paths = null
outdir = './results'
Expand Down Expand Up @@ -119,6 +119,7 @@ profiles {
}
test { includeConfig 'conf/test.config' }
test_full { includeConfig 'conf/test_full.config' }
test_genome { includeConfig 'conf/test_genome.config' }
}

// Load igenomes.config if required
Expand Down Expand Up @@ -160,8 +161,8 @@ manifest {
homePage = 'https://github.com/qbic-pipelines/cellranger'
description = 'Cell ranger pipeline for single cell RNAseq'
mainScript = 'main.nf'
nextflowVersion = '>=20.10.0'
version = '1.0dev'
nextflowVersion = '>=21.04.1'
version = '1.0.1'
}

// Function to ensure that resource requirements don't go beyond
Expand Down

0 comments on commit 46367b4

Please sign in to comment.