Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ testing/
testing*
*.pyc
null/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

.nf-test*
1 change: 0 additions & 1 deletion docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ Once installed, open IGV, go to `File > Open Session` and select the `igv_sessio
- `genome/`
- A number of genome-specific files are generated by the pipeline in order to aid in the filtering of the data, and because they are required by standard tools such as BEDTools. These can be found in this directory along with the genome fasta file which is required by IGV. If using a genome from AWS iGenomes and if it exists a `README.txt` file containing information about the annotation version will also be saved in this directory.
- `genome/index/`

- `bwa/`: Directory containing BWA indices.
- `bowtie2/`: Directory containing BOWTIE2 indices.
- `chromap/`: Directory containing Chromap indices.
Expand Down
11 changes: 11 additions & 0 deletions modules/local/bam_remove_orphans.nf
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,15 @@ process BAM_REMOVE_ORPHANS {
END_VERSIONS
"""
}

stub:
prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.bam

cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
}
12 changes: 12 additions & 0 deletions modules/local/bamtools_filter.nf
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,16 @@ process BAMTOOLS_FILTER {
bamtools: \$(echo \$(bamtools --version 2>&1) | sed 's/^.*bamtools //; s/Part .*\$//')
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.bam

cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
bamtools: \$(echo \$(bamtools --version 2>&1) | sed 's/^.*bamtools //; s/Part .*\$//')
END_VERSIONS
"""
}
12 changes: 12 additions & 0 deletions modules/local/bedtools_genomecov.nf
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,16 @@ process BEDTOOLS_GENOMECOV {
bedtools: \$(bedtools --version | sed -e "s/bedtools v//g")
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.bedGraph
touch ${prefix}.scale_factor.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
bedtools: \$(bedtools --version | sed -e "s/bedtools v//g")
END_VERSIONS
"""
}
12 changes: 12 additions & 0 deletions modules/local/frip_score.nf
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,16 @@ process FRIP_SCORE {
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.FRiP.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
bedtools: \$(bedtools --version | sed -e "s/bedtools v//g")
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
}
12 changes: 12 additions & 0 deletions modules/local/multiqc.nf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo
out of scope.
But why is MultiQC a local module?

Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,16 @@ process MULTIQC {
multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" )
END_VERSIONS
"""

stub:
"""
mkdir -p multiqc_data
touch multiqc_report.html
touch multiqc_data/multiqc.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" )
END_VERSIONS
"""
}
13 changes: 13 additions & 0 deletions modules/local/multiqc_custom_phantompeakqualtools.nf
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,17 @@ process MULTIQC_CUSTOM_PHANTOMPEAKQUALTOOLS {
r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//')
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.spp_nsc_mqc.tsv
touch ${prefix}.spp_rsc_mqc.tsv
touch ${prefix}.spp_correlation_mqc.tsv

cat <<-END_VERSIONS > versions.yml
"${task.process}":
r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//')
END_VERSIONS
"""
}
2 changes: 1 addition & 1 deletion nf-test.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ config {

// load the necessary plugins
plugins {
load "[email protected].3"
load "[email protected].5"
}
}
43 changes: 28 additions & 15 deletions ro-crate-metadata.json

Large diffs are not rendered by default.

81 changes: 77 additions & 4 deletions tests/.nftignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,84 @@
# === SYSTEM FILES ===
.DS_Store
**/.DS_Store

# === PIPELINE EXECUTION METADATA ===
pipeline_info/*.{html,json,txt,yml}

# === MULTIQC OUTPUTS ===
# MultiQC files contain timestamps, system paths, and run-specific data
multiqc/multiqc_data/fastqc_top_overrepresented_sequences_table.txt
multiqc/multiqc_data/BETA-multiqc.parquet
multiqc/multiqc_data/multiqc.log
multiqc/multiqc_data/multiqc_data.json
**/multiqc.log
**/multiqc_data.json
**/multiqc_report.html
multiqc/multiqc_data/multiqc_sources.txt
multiqc/multiqc_data/multiqc_software_versions.txt
multiqc/multiqc_plots/{svg,pdf,png}/*.{svg,pdf,png}
multiqc/multiqc_report.html

# === QC TOOL OUTPUTS ===
fastqc/*_fastqc.{html,zip}
pipeline_info/*.{html,json,txt,yml}
**/*_fastqc.html
**/*_val_*_fastqc.html

# === BINARY AND COMPRESSED FILES ===
**/*.{pdf,png,svg,gz,bam,bai,bigWig,zip,RData,rds}

# === TOOL-SPECIFIC METRICS FILES ===
# Picard metrics
**/*.quality_distribution_metrics
**/*.quality_by_cycle_metrics
**/*.insert_size_metrics
**/*.alignment_summary_metrics
**/*.base_distribution_by_cycle_metrics
**/*.MarkDuplicates.metrics.txt

# Trimming reports
**/*_trimming_report.txt

# Generic outputs
**/*.out

# === ANALYSIS RESULTS (FLOATING-POINT VARIATIONS) ===
# DeepTools outputs
**/*.plotFingerprint.raw.txt
**/*.plotFingerprint.qcmetrics.txt
**/*.computeMatrix.vals.mat.tab
**/*.plotHeatmap.mat.tab
**/*.computeMatrix.mat.gz
**/*.plotProfile.tab

# Peak calling and annotation
**/*.annotatePeaks.txt
**/*.boolean.annotatePeaks.txt
**/macs3_peak.summary.txt

# Feature counting
**/*.featureCounts.txt
**/*.featureCounts.txt.summary

# Statistical analysis
**/*.pca.vals.txt
**/*.pca.vals_mqc.tsv
**/*.sample.dists.txt
**/*.sample.dists_mqc.tsv

# === YAML CONFIGURATION FILES ===
**/deeptools_plot_profile_mlib_deeptools.yaml
**/multiqc_deseq2_clustering_1.yaml
**/multiqc_deseq2_pca_1.yaml
**/multiqc_sources.yaml
**/read_distribution_profile.yaml
**/deeptools_fingerprint_plot.yaml
**/deeptools_plot_fingerprint_counts_mlib_deeptools.yaml

# === CHIP-SEQ SPECIFIC OUTPUTS ===
# PhantomPeakQualTools outputs (contain variable correlation data)
**/*.spp_correlation_mqc.tsv
**/*.spp_nsc_mqc.tsv
**/*.spp_rsc_mqc.tsv

# === IGV SESSION FILES ===
# IGV session files contain absolute paths and timestamps
**/igv_files.txt
**/igv_session.xml
57 changes: 57 additions & 0 deletions tests/bowtie2.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
nextflow_pipeline {

name "Test pipeline with bowtie2 aligner"
script "../main.nf"
tag "bowtie2"

test("bowtie2") {

when {
params {
outdir = "$outputDir"
aligner = "bowtie2"
}
}

then {
// stable_name: All files + folders in ${params.outdir}/ with a stable name
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
// stable_path: All files in ${params.outdir}/ with stable content
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
assertAll(
{ assert workflow.success },
{ assert snapshot(
// Number of successful tasks
workflow.trace.succeeded().size(),
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we test pipelines on multiple Nextflow versions
removeNextflowVersion("$outputDir/pipeline_info/nf_core_chipseq_software_mqc_versions.yml"),
// All stable path name, with a relative path
stable_name,
// All files with stable contents
stable_path
).match() }
)
}
}

test("bowtie2 with stub") {

options "-stub"

when {
params {
outdir = "$outputDir"
aligner = "bowtie2"
}
}

then {
assertAll(
{ assert workflow.success },
{ assert snapshot(
workflow.trace.succeeded().size()
).match() }
)
}
}
}
Loading