Commit f0a9708a authored by Celine Noirot's avatar Celine Noirot
Browse files

WIP add licence

parent 7bf31003
Pipeline #37595 passed with stages
in 5 minutes and 34 seconds
This diff is collapsed.
#!/usr/bin/env nextflow #!/usr/bin/env nextflow
/*
Copyright INRAE 2021
This software is a computer program whose purpose is to
analyze high-throughput sequencing data.
You can use, modify and/ or redistribute the software under the terms
of license (see the LICENSE file for more details).
The software is distributed in the hope that it will be useful,
but "AS IS" WITHOUT ANY WARRANTY OF ANY KIND.
Users are therefore encouraged to test the software's suitability as regards
their requirements in conditions enabling the security of their systems and/or data.
The fact that you are presently reading this means that you have had knowledge
of the license and that you accept its terms.
This script is based on :
- the nf-core guidelines . See https://nf-co.re/ for more information
- the institut cury template https://github.com/bioinfo-pf-curie/geniac-template/
*/
/* /*
======================================================================================== ========================================================================================
GeT/template GeT/template
...@@ -16,27 +38,31 @@ def helpMessage() { ...@@ -16,27 +38,31 @@ def helpMessage() {
The typical command for running the pipeline is as follows: The typical command for running the pipeline is as follows:
nextflow run nf-core/template --reads '*_R{1,2}.fastq.gz' -profile docker nextflow run nf-core/template --inputdir '/path/to/data' --samplesheet 'samples.csv' -profile docker
Mandatory arguments: Mandatory arguments:
--reads Path to input data (must be surrounded with quotes) --inputdir Path to input directory
-profile Configuration profile to use. Can use multiple (comma separated) -profile Configuration profile to use. Can use multiple (comma separated)
Available: conda, docker, singularity, genotoul, test and more. Available: conda, docker, singularity, path, genotoul, test and more.
Options: Options:
--genome Name of iGenomes reference --samplesheet Default inputdir/samples.csv eg: SAMPLE_ID,SAMPLE_NAME,path/to/R1/fastq/file,path/to/R2/fastq/file (for paired-end only)
--singleEnd Specifies that the input is single end reads --contaminant Name of iGenomes // To be discussed ????
References If not specified in the configuration file or you wish to overwrite any of the references.
--fasta Path to Fasta reference
Other options:
--genome_base Path to databases
--outdir The output directory where the results will be saved --outdir The output directory where the results will be saved
--email Set this parameter to your e-mail address to get a summary e-mail with details of the run sent to you when the workflow exits --email Set this parameter to your e-mail address to get a summary e-mail with details of the run sent to you when the workflow exits
--email_on_fail Same as --email, except only send mail if the workflow is not successful --email_on_fail Same as --email, except only send mail if the workflow is not successful
--maxMultiqcEmailFileSize Theshold size for MultiQC report to be attached in notification email. If file generated by pipeline exceeds the threshold, it will not be attached (Default: 25MB) --maxMultiqcEmailFileSize Theshold size for MultiQC report to be attached in notification email. If file generated by pipeline exceeds the threshold, it will not be attached (Default: 25MB)
-name Name for the pipeline run. If not specified, Nextflow will automatically generate a random mnemonic. -name [str] Name for the pipeline run. If not specified, Nextflow will automatically generate a random mnemonic.
=======================================================
Available profiles
-profile test Run the test dataset
-profile conda Build a new conda environment before running the pipeline. Use `--condaCacheDir` to define the conda cache path
-profile path Use the installation path defined for all tools. Use `--globalPath` to define the installation path
-profile docker Use the Docker images for each process
-profile singularity Use the singularity images for each process
-profile genologin Run the workflow on the cluster, instead of locally
""".stripIndent() """.stripIndent()
} }
...@@ -49,35 +75,60 @@ if (params.help) { ...@@ -49,35 +75,60 @@ if (params.help) {
// NOTE - THIS IS NOT USED IN THIS PIPELINE, EXAMPLE ONLY // NOTE - THIS IS NOT USED IN THIS PIPELINE, EXAMPLE ONLY
/*
* Create a channel for input read files
*/
// If you want to use the channel below in a process, define the following: // If you want to use the channel below in a process, define the following:
// input: // input:
// file fasta from ch_fasta // file dir from inputDirCh
// //
if (params.fasta) { ch_fasta = file(params.fasta, checkIfExists: true) }
/* inputDirCh = Channel.fromPath(params.inputdir, checkIfExists: true) : Channel.empty()
* Create a channel for input read files if (! params.samplesheet){
*/ params.samplesheet = params.inputdir + "/samples.csv"
if (params.readPaths) { }
if (params.singleEnd) {
samplesheetCh = Channel.fromPath(params.samplesheet, checkIfExists: true) : Channel.empty()
// Create a channel for input read files
if(params.samplesheet){
if(params.singleEnd){
Channel
.from(file("${params.samplePlan}"))
.splitCsv(header: false)
.map{ row -> [ row[0], [file(row[2])]] }
.set { rawReadsFastqcCh }
}else{
Channel
.from(file("${params.samplePlan}"))
.splitCsv(header: false)
.map{ row -> [ row[0], [file(row[2]), file(row[3])]] }
.set { rawReadsFastqcCh }
}
params.reads=false
}
else if(params.readPaths){
if(params.singleEnd){
Channel Channel
.from(params.readPaths) .from(params.readPaths)
.map { row -> [ row[0], [ file(row[1][0], checkIfExists: true) ] ] } .map { row -> [ row[0], [file(row[1][0])]] }
.ifEmpty { exit 1, "params.readPaths was empty - no input files supplied" } .ifEmpty { exit 1, "params.readPaths was empty - no input files supplied." }
.into { read_files_fastqc; read_files_trimming ; raw_reads_fastqc; raw_reads_assembly} .set { rawReadsFastqcCh }
} else { } else {
Channel Channel
.from(params.readPaths) .from(params.readPaths)
.map { row -> [ row[0], [ file(row[1][0], checkIfExists: true), file(row[1][1], checkIfExists: true) ] ] } .map { row -> [ row[0], [file(row[1][0]), file(row[1][1])]] }
.ifEmpty { exit 1, "params.readPaths was empty - no input files supplied" } .ifEmpty { exit 1, "params.readPaths was empty - no input files supplied." }
.into { read_files_fastqc; read_files_trimming; raw_reads_fastqc; raw_reads_assembly} .set { rawReadsFastqcCh }
} }
} else { } else {
Channel Channel
.fromFilePairs( params.reads, size: params.singleEnd ? 1 : 2 ) .fromFilePairs( params.reads, size: params.singleEnd ? 1 : 2 )
.ifEmpty { exit 1, "Cannot find any reads matching: ${params.reads}\nNB: Path needs to be enclosed in quotes!\nIf this is single-end data, please specify --singleEnd on the command line." } .ifEmpty { exit 1, "Cannot find any reads matching: ${params.reads}\nNB: Path needs to be enclosed in quotes!\nNB: Path requires at least one * wildcard!\nIf this is single-end data, please specify --singleEnd on the command line." }
.into { read_files_fastqc; read_files_trimming; raw_reads_fastqc; raw_reads_assembly } .set { rawReadsFastqcCh }
} }
/* In case of modular pipeline*/ /* In case of modular pipeline*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment