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

Cytosine report test #493

Merged
merged 2 commits into from
Dec 14, 2024
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
23 changes: 22 additions & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,24 @@ TREATMENT_REP3,AEG588A6_S6_L004_R1_001.fastq.gz,,

An [example samplesheet](../assets/samplesheet.csv) has been provided with the pipeline.

## Parameters

Check out the full list of parameters required, available for multiple aligners on [nf-core/methylseq pipeline parameters page](https://nf-co.re/methylseq/2.8.0/parameters/).

- [Input/output options](https://nf-co.re/methylseq/2.8.0/parameters/#input-output-options)
- [Save intermediate files](https://nf-co.re/methylseq/2.8.0/parameters/#save-intermediate-files)
- [Reference genome options](https://nf-co.re/methylseq/2.8.0/parameters/#reference-genome-options)
- [Alignment options](https://nf-co.re/methylseq/2.8.0/parameters/#alignment-options)
- [Special library types](https://nf-co.re/methylseq/2.8.0/parameters/#special-library-types)
- [Adapter Trimming](https://nf-co.re/methylseq/2.8.0/parameters/#adapter-trimming)
- [Bismark options](https://nf-co.re/methylseq/2.8.0/parameters/#bismark-options)
- [bwa-meth options](https://nf-co.re/methylseq/2.8.0/parameters/#bwa-meth-options)
- [Qualimap Options](https://nf-co.re/methylseq/2.8.0/parameters/#bwa-meth-options)
- [Skip pipeline steps](https://nf-co.re/methylseq/2.8.0/parameters/#skip-pipeline-steps)
- [Run pipeline steps](https://nf-co.re/methylseq/2.8.0/parameters/#Run-pipeline-steps)

> It is mandatory to provide `--fasta` along with `--bismark_index`/`--bwameth_index` parameters

## Running the pipeline

The typical command for running the pipeline is as follows:
Expand Down Expand Up @@ -139,7 +157,10 @@ For example, users working with unfinished genomes containing tens or even hundr

To bypass this limitation, the `--scaffolds` option can be added as an additional `ext.args` in `conf/modules/bismark_methylationextractor.config`. This prevents methylation calls from being pre-sorted into individual chromosome files. Instead, all input files are temporarily merged into a single file (unless there is only one file), which is then sorted by both chromosome and position using the Unix sort command.

> For a detailed list of different options available, please refer to the official [Bismark](https://felixkrueger.github.io/Bismark/options/genome_preparation/) and [bwa-meth](https://github.com/brentp/bwa-meth) documentation.
For a detailed list of different options available, please refer to the official docs of:

- [Bismark](https://felixkrueger.github.io/Bismark/options/genome_preparation/)
- [bwa-meth](https://github.com/brentp/bwa-meth)

### Running the `test` profile

Expand Down
41 changes: 41 additions & 0 deletions tests/bismark_cytosine_report.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
nextflow_pipeline {

name "Test Workflow main.nf"
script "../main.nf"
config "./nextflow.config"
tag "cpu"

test("Params: bismark | cytosine_report") {
when {
params {
cytosine_report = true
outdir = "$outputDir"
}
}

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')
// bam_files: All bam files
def bam_files = getAllFilesFromDir(params.outdir, include: ['**/*.bam'])
assertAll(
{ assert workflow.success},
{ assert snapshot(
// Number of 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_methylseq_software_mqc_versions.yml"),
// All stable path name
stable_name,
// All files with stable contents
stable_path,
// All bam files
bam_files.collect{ file -> [ file.getName(), bam(file.toString()).getReadsMD5() ] }
).match() }
)
}
}

}
Loading
Loading