-
Notifications
You must be signed in to change notification settings - Fork 421
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate pipeline pytest alignment and annotation tests to nf-test (#1708
) <!-- # nf-core/sarek pull request Many thanks for contributing to nf-core/sarek! Please fill in the appropriate checklist below (delete whatever is not relevant). These are the most common things requested on pull requests (PRs). Remember that PRs should be made against the dev branch, unless you're preparing a pipeline release. Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/sarek/tree/master/.github/CONTRIBUTING.md) --> ## PR checklist - [ ] This comment contains a description of changes (with reason). - [ ] If you've fixed a bug or added code that should be tested, add tests! - [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/sarek/tree/master/.github/CONTRIBUTING.md) - [ ] If necessary, also make a PR on the nf-core/sarek _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository. - [ ] Make sure your code lints (`nf-core lint`). - [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`). - [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir <OUTDIR>`). - [ ] Usage Documentation in `docs/usage.md` is updated. - [ ] Output Documentation in `docs/output.md` is updated. - [ ] `CHANGELOG.md` is updated. - [ ] `README.md` is updated (including new tool citations and authors/contributors).
- Loading branch information
Showing
23 changed files
with
1,316 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
nextflow_pipeline { | ||
|
||
name "Test pipeline" | ||
script "../main.nf" | ||
tag "pipeline" | ||
tag "pipeline_sarek" | ||
profile "alignment_from_everything" | ||
|
||
test("Run with profile test,alignment_from_everything | --save_mapped --save_output_as_bam") { | ||
|
||
when { | ||
params { | ||
modules_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/' | ||
igenomes_base = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data' | ||
outdir = "$outputDir" | ||
save_mapped = true | ||
save_output_as_bam = true | ||
} | ||
} | ||
|
||
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') | ||
// cram_files: All cram files | ||
def cram_files = getAllFilesFromDir(params.outdir, include: ['**/*.cram']) | ||
def fasta = params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta' | ||
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 tests pipelines on multiple Nextflow versions | ||
removeNextflowVersion("$outputDir/pipeline_info/nf_core_sarek_software_mqc_versions.yml"), | ||
// All stable path name, with a relative path | ||
stable_name, | ||
// All files with stable contents | ||
stable_path, | ||
// All cram files | ||
cram_files.collect{ file -> [ file.getName(), cram(file.toString(), fasta).getReadsMD5() ] } | ||
).match() } | ||
) | ||
} | ||
} | ||
} |
Oops, something went wrong.