### Install Nextflow Edge Release from Scratch Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md Download and install a Nextflow edge release from scratch. This involves exporting the desired version, downloading the installer, and moving the binary to a system-wide location. ```bash export NXF_VER="20.11.0-edge" wget -qO- get.nextflow.io | bash sudo mv nextflow /usr/local/bin/ ``` -------------------------------- ### Example Params File Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md A sample YAML file defining pipeline input, output directory, and reference genome. ```yaml input: './samplesheet.csv' outdir: './results/' genome: 'GRCh37' <...> ``` -------------------------------- ### Run Pipeline with Test Profile Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md Execute the pipeline with the 'test' profile and a specified environment profile to verify setup. ```bash nextflow run nf-core/methylseq \ --outdir \ --genome GRCh38 \ -profile test, ``` -------------------------------- ### Run nf-core/methylseq Pipeline Source: https://github.com/nf-core/methylseq/blob/master/README.md Execute the pipeline using default parameters, specifying the input samplesheet, output directory, and genome reference. Use a profile for environment setup (e.g., Docker, Singularity). ```bash nextflow run nf-core/methylseq --input samplesheet.csv --outdir --genome GRCh37 -profile ``` -------------------------------- ### Example Command Error Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md This snippet shows a typical command error encountered during pipeline execution, including the command that failed and the working directory. It serves as an example for debugging. ```console Command error: .command.sh: line 9: 30 Killed STAR --genomeDir star --readFilesIn WT_REP1_trimmed.fq.gz --runThreadN 2 --outFileNamePrefix WT_REP1. Work dir: /home/pipelinetest/work/9d/172ca5881234073e8d76f2a19c88fb Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` ``` -------------------------------- ### Samplesheet Example with Multiple Runs Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md Illustrates how to format a samplesheet when a single sample has multiple FASTQ files across different runs or lanes. The 'sample' identifier must be consistent across all entries for the same sample. ```csv sample,fastq_1,fastq_2,genome SRR389222,SRR389222_sub1.fastq.gz,, SRR389222,SRR389222_sub2.fastq.gz,, SRR389222,SRR389222_sub3.fastq.gz,, Ecoli_10K_methylated,Ecoli_10K_methylated_R1.fastq.gz,Ecoli_10K_methylated_R2.fastq.gz, ``` -------------------------------- ### Running the Methylseq Pipeline with Docker Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md This command executes the nf-core/methylseq pipeline using the Docker containerization. It specifies the input samplesheet, output directory, and reference genome. Ensure you have Nextflow and Docker installed. ```bash nextflow run nf-core/methylseq --input ./samplesheet.csv --outdir ./results --genome GRCh38 -profile docker ``` -------------------------------- ### BWA-Meth Internal Command Translation Source: https://github.com/nf-core/methylseq/blob/master/docs/usage/bs-seq-primer.md This example illustrates the internal translation performed by BWA-Meth, showing how the user command is converted to a piped command for BWA-MEM. This process avoids creating temporary files. ```bash bwa mem -p ref.fa.bwameth.c2t ' " - $k: $v" }.join("\n") %> ``` -------------------------------- ### Samplesheet CSV Format Source: https://github.com/nf-core/methylseq/blob/master/README.md Prepare a CSV file with sample information including FASTQ file paths and genome reference. Supports single-end and paired-end reads. ```csv sample,fastq_1,fastq_2,genome SRR389222_sub1,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub1.fastq.gz,, SRR389222_sub2,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub2.fastq.gz,, SRR389222_sub3,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub3.fastq.gz,, Ecoli_10K_methylated,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R1.fastq.gz,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R2.fastq.gz, ``` -------------------------------- ### Run Pipeline with Edge Release (Direct) Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md Execute a pipeline using a specific Nextflow edge version directly on the command line. The version is specified inline before the 'nextflow run' command. ```bash NXF_VER="20.11.0-edge" nextflow run nf-core/rnaseq -profile test,docker -r 3.0 ``` -------------------------------- ### Specify Samplesheet Input Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md This parameter points to the location of the samplesheet file, which is crucial for defining the samples and their associated FASTQ files for the analysis. ```bash --input '[path to samplesheet file]' ``` -------------------------------- ### Global Resource Limits Configuration Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md Configure maximum resources (CPUs, memory, time) for all pipeline processes by default. This is useful for setting system-wide caps. ```nextflow process { resourceLimits = [ cpus: 4, memory: '15.GB', time: '1.h' ] } ``` -------------------------------- ### Run Targeted Sequencing Analysis Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md This command enables targeted sequencing analysis, filtering methylation data to specified regions and collecting hybrid-capture metrics. It requires specifying the aligner, target regions file, and enabling the relevant flags. ```bash nextflow run nf-core/methylseq \ --input samplesheet.csv \ --genome GRCh38 \ --aligner bismark \ --run_targeted_sequencing \ --target_regions_file genome_target_regions.bed \ --collecthsmetrics ``` -------------------------------- ### bwa-mem Workflow Output Structure Source: https://github.com/nf-core/methylseq/blob/master/docs/output.md This structure outlines the output for the bwa-mem alignment workflow, including FastQC, alignment, deduplication, Rastair processing for conversion rates, and pipeline information. ```text bwamem/ ├── bwamem │ ├── alignments │ │ └── samtools_stats │ └── deduplicated │ └── picard_metrics ├── fastqc │ ├── Ecoli_10K_methylated_1_fastqc.html │ ├── Ecoli_10K_methylated_2_fastqc.html │ └── zips ├── multiqc │ └── bwamem ├── pipeline_info │ ├── execution_report_2024-12-13_05-36-34.html │ ├── execution_timeline_2024-12-13_05-36-34.html │ ├── execution_trace_2024-12-13_05-36-34.txt │ ├── nf_core_methylseq_software_mqc_versions.yml │ ├── params_2024-12-13_05-36-43.json │ └── pipeline_dag_2024-12-13_05-36-34.html ├── rastair │ ├── call │ │ └── Ecoli_10K_methylated.rastair_call.txt │ ├── mbias │ │ └── Ecoli_10K_methylated.rastair_mbias.txt │ ├── mbiasparser │ │ └── Ecoli_10K_methylated.rastair_mbias_processed.csv │ └── methylkit │ └── Ecoli_10K_methylated.rastair_methylkit.txt.gz └── trimgalore ├── fastqc └── logs ``` -------------------------------- ### Specify Pipeline Version Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md Run a specific version of the pipeline using the '-r' flag to ensure reproducibility. ```bash nextflow run nf-core/methylseq -r 1.3.1 ``` -------------------------------- ### Run Pipeline with Edge Release (Export) Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md Set the Nextflow edge version as an environment variable before running the pipeline. This method is an alternative to specifying the version inline. ```bash export NXF_VER="20.11.0-edge" nextflow run nf-core/rnaseq -profile test,docker -r 3.0 ``` -------------------------------- ### Add Custom Arguments to Modules Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md Append additional arguments to module commands, such as '--scaffolds' for Bismark, to bypass OS file handle limits. ```bash nextflow run nf-core/methylseq --scaffolds ``` -------------------------------- ### Bismark Workflow Output Structure Source: https://github.com/nf-core/methylseq/blob/master/docs/output.md This structure shows the directories and files generated when the Bismark alignment workflow is used. It includes results from FastQC, alignment, deduplication, methylation calls, and reports. ```text bismark/ ├── bismark │ ├── alignments │ ├── deduplicated │ ├── methylation_calls │ ├── reports │ └── summary ├── fastqc │ ├── Ecoli_10K_methylated_1_fastqc.html │ ├── Ecoli_10K_methylated_2_fastqc.html │ └── zips ├── multiqc │ └── bismark ├── pipeline_info │ ├── execution_report_2024-12-13_05-38-05.html │ ├── execution_timeline_2024-12-13_05-38-05.html │ ├── execution_trace_2024-12-13_05-38-05.txt │ ├── nf_core_methylseq_software_mqc_versions.yml │ ├── params_2024-12-13_05-38-14.json │ └── pipeline_dag_2024-12-13_05-38-05.html └── trimgalore ├── fastqc └── logs ``` -------------------------------- ### bwa-meth Workflow Output Structure Source: https://github.com/nf-core/methylseq/blob/master/docs/output.md This structure details the output directories and files for the bwa-meth alignment workflow. It includes FastQC, alignment, deduplication, methylation calling with Methyldackel, and pipeline information. ```text bwameth/ ├── bwameth │ ├── alignments │ └── deduplicated ├── fastqc │ ├── Ecoli_10K_methylated_1_fastqc.html │ ├── Ecoli_10K_methylated_2_fastqc.html │ └── zips ├── methyldackel │ ├── Ecoli_10K_methylated.markdup.sorted_CpG.bedGraph │ └── mbias ├── multiqc │ └── bwameth ├── pipeline_info │ ├── execution_report_2024-12-13_05-36-34.html │ ├── execution_timeline_2024-12-13_05-36-34.html │ ├── execution_trace_2024-12-13_05-36-34.txt │ ├── nf_core_methylseq_software_mqc_versions.yml │ ├── params_2024-12-13_05-36-43.json │ └── pipeline_dag_2024-12-13_05-36-34.html └── trimgalore ├── fastqc └── logs ``` -------------------------------- ### BWA-Meth Alignment Command Source: https://github.com/nf-core/methylseq/blob/master/docs/usage/bs-seq-primer.md This command demonstrates how BWA-Meth maps bisulfite-converted reads to an in silico converted reference. It shows the typical command structure for aligning paired-end reads. ```bash python bwameth.py --reference ref.fa A.fq B.fq ``` -------------------------------- ### Embed Pipeline Logo in Email Source: https://github.com/nf-core/methylseq/blob/master/assets/sendmail_template.txt Reads a PNG logo file from the project directory, encodes it in Base64, and prepares it for embedding in an email. ```Groovy <% out << new File("$projectDir/assets/nf-core-methylseq_logo_light.png"). bytes. encodeBase64(). toString(). tokenize( '\n' )*. toList()*. collate( 76 )*. collect { it.join() }. flatten(). join( '\n' ) %> ``` -------------------------------- ### Update Pipeline Cache Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md Fetch the latest version of the pipeline from GitHub to ensure you are running the most recent code. ```bash nextflow pull nf-core/methylseq ``` -------------------------------- ### Attach MultiQC Report to Email Source: https://github.com/nf-core/methylseq/blob/master/assets/sendmail_template.txt Conditionally attaches a MultiQC report to an email if the file exists and its size is within a specified limit. The report is Base64 encoded. ```Groovy <% if (mqcFile){ def mqcFileObj = new File("$mqcFile") if (mqcFileObj.length() < mqcMaxSize){ out << """ --nfcoremimeboundary Content-Type: text/html; name=\"multiqc_report\" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: attachment; filename=\"${mqcFileObj.getName()}\" ${mqcFileObj. bytes. encodeBase64(). toString(). tokenize( '\n' )*. toList()*. collate( 76 )*. collect { it.join() }. flatten(). join( '\n' )} """ }} %> ``` -------------------------------- ### Process-Specific Resource Limits Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md Set resource limits for a specific pipeline process using its name. This allows fine-grained control over resource allocation for individual steps. ```nextflow process { withName: 'BISMARK_ALIGN' { resourceLimits = [ cpus: 4, memory: '15.GB', time: '1.h' ] } } ``` -------------------------------- ### Set Nextflow JVM Memory Options Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md Limit the memory allocated to the Nextflow Java Virtual Machine. This is typically added to your shell's environment configuration file like ~/.bashrc. ```bash NXF_OPTS='-Xms1g -Xmx4g' ``` -------------------------------- ### Override Process Memory Limit Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md Increase the memory allocated to a specific process, such as 'BISMARK_ALIGN', by overriding its default or configured limit. This is useful when a process requires more memory than initially allocated. ```nextflow process { withName: 'BISMARK_ALIGN' { memory = 100.GB } } ``` -------------------------------- ### Override Docker Container for a Process Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md Use this configuration to specify a different Docker container for a particular Nextflow process. Identify the process name and set the desired container image. ```nextflow process { withName: PANGOLIN { container = 'quay.io/biocontainers/pangolin:3.0.5--pyhdfd78af_0' } } ``` -------------------------------- ### Override Singularity Container for a Process Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md This configuration allows you to specify an alternative Singularity container for a Nextflow process. Ensure you use the correct URL for the Singularity image. ```nextflow process { withName: PANGOLIN { container = 'https://depot.galaxyproject.org/singularity/pangolin:3.0.5--pyhdfd78af_0' } } ``` -------------------------------- ### Conditional Email Body Source: https://github.com/nf-core/methylseq/blob/master/assets/email_template.txt Generates the email body based on the pipeline's success or failure status. Includes exit status and error messages on failure. ```Groovy <% if (success) { out << "## nf-core/methylseq execution completed successfully! ##" } else { out << """#################################################### ## nf-core/methylseq execution completed unsuccessfully! ## #################################################### The exit status of the task that caused the workflow execution to fail was: $exitStatus. The full error message was: ${errorReport} """ } %> ``` -------------------------------- ### Override Conda Environment for a Process Source: https://github.com/nf-core/methylseq/blob/master/docs/usage.md Configure a specific Conda environment for a Nextflow process. This is useful for managing software dependencies that are available via Conda. ```nextflow process { withName: PANGOLIN { conda = 'bioconda::pangolin=3.0.5' } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.