Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge nf-test into main #68

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
fbf6e1f
init nf-test
AmstlerStephan Mar 7, 2024
3bb374f
add gitignore
AmstlerStephan Mar 7, 2024
64b6260
adapt config files to use nf-test
AmstlerStephan Mar 7, 2024
025ffa2
move test data
AmstlerStephan Mar 7, 2024
d6d0d43
adapt test.config
AmstlerStephan Mar 7, 2024
bb6b685
move testing data
AmstlerStephan Mar 7, 2024
4eabc2f
add data and tests for the cluster filtering and reformating
AmstlerStephan Mar 7, 2024
6a6ebb3
add further tests for reformat filter cluster
AmstlerStephan Mar 7, 2024
3b62f2b
add snapshot to test main workflow
AmstlerStephan Mar 7, 2024
a000151
no snapshots for workflows
AmstlerStephan Mar 7, 2024
3bf22c6
move testing data
AmstlerStephan Mar 7, 2024
9549bf7
Merge branch 'nf-test' of https://github.com/genepi/umi-pipeline-nf i…
AmstlerStephan Mar 7, 2024
8b471b3
adapt module structure
AmstlerStephan Mar 11, 2024
74543c6
adapt module paths in main workflow
AmstlerStephan Mar 11, 2024
adc32dc
add test data for variant calling
AmstlerStephan Mar 11, 2024
248918b
Add variant calling test data
AmstlerStephan Mar 11, 2024
5980ae9
Add test cases
AmstlerStephan Mar 11, 2024
1bd50f4
Add freebayes test cases
AmstlerStephan Mar 11, 2024
21bf952
Add tests for all variant callers
AmstlerStephan Mar 11, 2024
2fbbb8e
a
AmstlerStephan Mar 11, 2024
4dbee61
adapt lofreq parameters to have no minimal coverage
AmstlerStephan Mar 11, 2024
2f9aaf2
remove typo
AmstlerStephan Mar 11, 2024
170299f
Add fastq test files for merge input
AmstlerStephan Mar 12, 2024
1171cb7
Add tests and snapshot for merge_fastq
AmstlerStephan Mar 12, 2024
f7064c0
add test data for mapping
AmstlerStephan Mar 12, 2024
4ca53b9
add tests for consensus and final consensus reads
AmstlerStephan Mar 12, 2024
efe9a8e
Create test cases for split_reads
AmstlerStephan Mar 12, 2024
b4c843b
prepare tests for split reads process
AmstlerStephan Mar 15, 2024
36b8944
prepare tests for umi detection
AmstlerStephan Mar 15, 2024
b98af47
Add tests for clustering
AmstlerStephan Mar 15, 2024
6acd93d
remove params snippet
AmstlerStephan Mar 15, 2024
b19fc54
add tests for cluster polishing
AmstlerStephan Mar 15, 2024
0c2439f
add tests for cluster reformatting using
AmstlerStephan Mar 15, 2024
1521903
Add CI tests for nf-test
AmstlerStephan Jun 17, 2024
1cdef7b
Update ci-tests.yml
AmstlerStephan Jun 17, 2024
3077e99
Adapt docker file path
AmstlerStephan Jun 17, 2024
d2bf203
Merge branch 'nf-test' of https://github.com/genepi/umi-pipeline-nf i…
AmstlerStephan Jun 17, 2024
78c6dad
updated testing paramaters for faster execution
AmstlerStephan Jun 18, 2024
7f5d96e
Updated test cases
AmstlerStephan Jun 18, 2024
5b770cc
Updated local nf-test to v0.9.0 and updated snapshots
AmstlerStephan Jun 18, 2024
dccab02
Merge pull request #67 from genepi/main
AmstlerStephan Jun 18, 2024
b60ab80
specify minimap2 version
AmstlerStephan Jun 18, 2024
09ab258
test using existing release container
AmstlerStephan Jun 18, 2024
42f2b4b
remove docker initiation
AmstlerStephan Jun 18, 2024
8598c76
Temporarily remove snapshots of miniminap2
AmstlerStephan Jun 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI Tests

on: [push, pull_request]

jobs:

test:

runs-on: ubuntu-latest
strategy:
matrix:
shard: [1, 2, 3, 4, 5]

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

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

- name: Setup Nextflow
uses: nf-core/setup-nextflow@v1
with:
version: "latest-edge"

- name: Install nf-test
run: |
wget -qO- get.nf-test.com | bash -s 0.9.0-rc2
sudo mv nf-test /usr/local/bin/

- name: Run Tests (Shard ${{ matrix.shard }}/${{ strategy.job-total }})
run: nf-test test --ci --shard ${{ matrix.shard }}/${{ strategy.job-total }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
work
.nextflow
.nextflow.*
tests/output
.nf-test/
nf-test
.nf-test.log
2 changes: 1 addition & 1 deletion config/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// PROCESS RESOURCES
process {
withName: "POLISH_CLUSTER" {
memory = { 1.GB * task.attempt }
memory = { 2.GB * task.attempt }
cpus = 1
}

Expand Down
11 changes: 6 additions & 5 deletions config/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ params {
version = false
debug = false

input = "$baseDir/data/fastq_pass/"
output = "umi-pipeline-nf_test-run"
reference = "$baseDir/data/ref/lpa-ref2645.fasta"
reference_fai = "$baseDir/data/ref/lpa-ref2645.fasta.fai"
bed = "$baseDir/data/ref/lpa-ref2645.bed"
input = "$baseDir/tests/input/pipeline/fastq_pass/"
output = "test_umi-pipeline-nf"
reference = "$baseDir/tests/input/pipeline/ref/lpa-ref2645.fasta"
reference_fai = "$baseDir/tests/input/pipeline/ref/lpa-ref2645.fasta.fai"
bed = "$baseDir/tests/input/pipeline/ref/lpa-ref2645.bed"

min_reads_per_cluster = 10
max_reads_per_cluster = 20
min_reads_per_barcode = 0
call_variants = true
variant_caller = "freebayes"
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
22 changes: 0 additions & 22 deletions data/info.txt

This file was deleted.

2 changes: 0 additions & 2 deletions env/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ RUN conda update -y conda && \

WORKDIR "/opt"
RUN wget https://github.com/seppinho/mutserve/releases/download/v2.0.0-rc13.lpa/mutserve_LPA_adapted.jar


7 changes: 4 additions & 3 deletions lib/processes/cluster.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ vsearch_dir="vsearch_clusters"

process CLUSTER {
publishDir "${params.output}/${sample}/clustering/${type}", pattern: "${consensus_fasta}", mode: 'copy'
publishDir "${params.output}/${sample}/clustering/${type}", pattern: "cluster*", mode: 'copy'

input:
tuple val( sample ), val( target ), path( detected_umis_fastq )
val ( type )
output:
tuple val( "${sample}" ), val( "${target}" ), path( "${consensus_fasta}" ), emit:consensus_fasta
tuple val( "${sample}" ), val( "${target}" ), path( "cluster*" ), emit:cluster_fastas
tuple val( "${sample}" ), val( "${target}" ), path( "${consensus_fasta}" ), optional: true, emit:consensus_fasta
tuple val( "${sample}" ), val( "${target}" ), path( "cluster*" ), optional: true, emit:cluster_fastas

script:
def id = "${type}" == "raw" ? 0.8 : 0.99
def id = "${type}" == "raw" ? 0.90 : 0.99
"""
vsearch \
--clusterout_id \
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ process LOFREQ {
--ref ${reference} \
--out ${type}.vcf \
--call-indels \
--min-cov 5 \
--no-default-filter \
${bam}
"""
}
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/processes/reformat_filter_cluster.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process REFORMAT_FILTER_CLUSTER {
tag "${sample}"
// publishDir "${params.output}/${sample}/clustering/${type}/smolecule", pattern: "smolecule*", mode: 'copy'
publishDir "${params.output}/${sample}/clustering/${type}/smolecule", pattern: "smolecule*", mode: 'copy'
publishDir "${params.output}/${sample}/stats/${type}", pattern: "*tsv", mode: 'copy'

input:
Expand Down
6 changes: 3 additions & 3 deletions lib/workflows/umi-pipeline.nf
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ include {REFORMAT_FILTER_CLUSTER} from '../processes/reformat_filter_cluster.nf'
include {POLISH_CLUSTER} from '../processes/polish_cluster.nf'
include {FILTER_CONSENSUS_FASTQ} from '../processes/filter_consensus_fastq.nf'
include {REFORMAT_CONSENSUS_CLUSTER} from '../processes/reformat_consensus_cluster.nf'
include {LOFREQ as LOFREQ_CONSENSUS; LOFREQ as LOFREQ_FINAL_CONSENSUS} from '../processes/variant_calling/lofreq.nf'
include {MUTSERVE as MUTSERVE_CONSENSUS; MUTSERVE as MUTSERVE_FINAL_CONSENSUS} from '../processes/variant_calling/mutserve.nf'
include {FREEBAYES as FREEBAYES_CONSENSUS; FREEBAYES as FREEBAYES_FINAL_CONSENSUS} from '../processes/variant_calling/freebayes.nf'
include {LOFREQ as LOFREQ_CONSENSUS; LOFREQ as LOFREQ_FINAL_CONSENSUS} from '../processes/lofreq.nf'
include {MUTSERVE as MUTSERVE_CONSENSUS; MUTSERVE as MUTSERVE_FINAL_CONSENSUS} from '../processes/mutserve.nf'
include {FREEBAYES as FREEBAYES_CONSENSUS; FREEBAYES as FREEBAYES_FINAL_CONSENSUS} from '../processes/freebayes.nf'


// SUB-WORKFLOWS
Expand Down
15 changes: 5 additions & 10 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ params {
medaka_model = "r1041_e82_400bps_hac_g615"
fwd_umi = "TTTVVVVTTVVVVTTVVVVTTVVVVTTT"
rev_umi = "AAABBBBAABBBBAABBBBAABBBBAAA"
adapter_length = 200
adapter_length = 100
min_length = 40
max_length = 60
minimap2_param = "-ax map-ont -k 13 --MD"
Expand All @@ -65,37 +65,32 @@ params {
// NEXTFLOW PROFILES

// Load base.config by default for all pipelines
includeConfig "${baseDir}/config/base.config"
includeConfig "config/base.config"

process.container = 'quay.io/genepi/umi-pipeline-nf:v0.2.1'

profiles {

// -profile conda
conda {
process.conda = "${baseDir}/env/environment.yml"
process.conda = "env/environment.yml"
}

// -profile docker
docker {
docker.enabled = true
}

// -profile singularity
singularity {
singularity.enabled = true
singularity.autoMounts = true
docker.enabled = false
}

// -profile test
test {
includeConfig "${baseDir}/config/test.config"
includeConfig "config/test.config"
}

// -profile custom
custom {
includeConfig "${baseDir}/config/custom.config"
includeConfig "config/custom.config"
}

}
8 changes: 8 additions & 0 deletions nf-test.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
config {

testsDir "tests"
workDir ".nf-test"
configFile "tests/nextflow.config"
profile "test,docker"

}
Empty file.
464 changes: 464 additions & 0 deletions tests/input/cluster/barcode03/detected_umis.fastq

Large diffs are not rendered by default.

384 changes: 384 additions & 0 deletions tests/input/cluster/barcode04/detected_umis.fastq

Large diffs are not rendered by default.

848 changes: 848 additions & 0 deletions tests/input/cluster/barcode05/detected_umis.fastq

Large diffs are not rendered by default.

30,352 changes: 30,352 additions & 0 deletions tests/input/cluster/barcode06/detected_umis.fastq

Large diffs are not rendered by default.

18,924 changes: 18,924 additions & 0 deletions tests/input/cluster/barcode07/detected_umis.fastq

Large diffs are not rendered by default.

Loading
Loading