+
Skip to content

Change remaining parameters from camel_case to snakeCase #427

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

Merged
merged 5 commits into from
Oct 16, 2019
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
* Add UCSC genomes to `igenomes.config` and add paths to all genome indices
* Change `maxMultiqcEmailFileSize` parameter to `max_multiqc_email_size`
* Export conda environment in Docker file [#349](https://github.com/nf-core/tools/issues/349)
* Change remaining parameters from `camelCase` to `snakeCase` [#39](https://github.com/nf-core/hic/issues/39)
* `--singleEnd` to `--single_end`
* `--igenomesIgnore` to `--igenomes_ignore`
* Add `autoMounts=true` to default singularity profile

### Other

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* -------------------------------------------------
* Defines bundled input files and everything required
* to run a fast and simple test. Use as follows:
* nextflow run {{ cookiecutter.name }} -profile test
* nextflow run {{ cookiecutter.name }} -profile test,<docker/singularity>
*/

params {
Expand All @@ -14,11 +14,11 @@ params {
max_cpus = 2
max_memory = 6.GB
max_time = 48.h

// Input data
// TODO nf-core: Specify the paths to your test data on nf-core/test-datasets
// TODO nf-core: Give any required params for the test so that command line flags are not needed
singleEnd = false
single_end = false
readPaths = [
['Testdata', ['https://github.com/nf-core/test-datasets/raw/exoseq/testdata/Testdata_R1.tiny.fastq.gz', 'https://github.com/nf-core/test-datasets/raw/exoseq/testdata/Testdata_R2.tiny.fastq.gz']],
['SRR389222', ['https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub1.fastq.gz', 'https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub2.fastq.gz']]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
* [Main arguments](#main-arguments)
* [`-profile`](#-profile)
* [`--reads`](#--reads)
* [`--singleEnd`](#--singleend)
* [`--single_end`](#--single_end)
* [Reference genomes](#reference-genomes)
* [`--genome` (using iGenomes)](#--genome-using-igenomes)
* [`--fasta`](#--fasta)
* [`--igenomesIgnore`](#--igenomesignore)
* [`--igenomes_ignore`](#--igenomes_ignore)
* [Job resources](#job-resources)
* [Automatic resubmission](#automatic-resubmission)
* [Custom resource requests](#custom-resource-requests)
Expand Down Expand Up @@ -125,11 +125,11 @@ Please note the following requirements:

If left unspecified, a default pattern is used: `data/*{1,2}.fastq.gz`

### `--singleEnd`
By default, the pipeline expects paired-end data. If you have single-end data, you need to specify `--singleEnd` on the command line when you launch the pipeline. A normal glob pattern, enclosed in quotation marks, can then be used for `--reads`. For example:
### `--single_end`
By default, the pipeline expects paired-end data. If you have single-end data, you need to specify `--single_end` on the command line when you launch the pipeline. A normal glob pattern, enclosed in quotation marks, can then be used for `--reads`. For example:

```bash
--singleEnd --reads '*.fastq'
--single_end --reads '*.fastq'
```

It is not possible to run a mixture of single-end and paired-end files in one run.
Expand Down Expand Up @@ -180,7 +180,7 @@ If you prefer, you can specify the full path to your reference genome when you r
--fasta '[path to Fasta reference]'
```

### `--igenomesIgnore`
### `--igenomes_ignore`
Do not load `igenomes.config` when running the pipeline. You may choose this option if you observe clashes between custom parameters and those supplied in `igenomes.config`.

## Job resources
Expand Down
32 changes: 16 additions & 16 deletions nf_core/pipeline-template/{{cookiecutter.name_noslash}}/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ def helpMessage() {
Mandatory arguments:
--reads Path to input data (must be surrounded with quotes)
-profile Configuration profile to use. Can use multiple (comma separated)
Available: conda, docker, singularity, awsbatch, test and more.
Available: conda, docker, singularity, awsbatch, test and more

Options:
--genome Name of iGenomes reference
--singleEnd Specifies that the input is single end reads
--single_end Specifies that the input is single-end reads

References If not specified in the configuration file or you wish to overwrite any of the references.
--fasta Path to Fasta reference
References If not specified in the configuration file or you wish to overwrite any of the references
--fasta Path to fasta reference

Other options:
--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_on_fail Same as --email, except only send mail if the workflow is not successful
--max_multiqc_email_size 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 Name for the pipeline run. If not specified, Nextflow will automatically generate a random mnemonic

AWSBatch options:
--awsqueue The AWSBatch JobQueue that needs to be set when running on AWSBatch
Expand Down Expand Up @@ -78,7 +78,7 @@ if (!(workflow.runName ==~ /[a-z]+_[a-z]+/)) {
custom_runName = workflow.runName
}

if ( workflow.profile == 'awsbatch') {
if (workflow.profile == 'awsbatch') {
// AWSBatch sanity checking
if (!params.awsqueue || !params.awsregion) exit 1, "Specify correct --awsqueue and --awsregion parameters on AWSBatch!"
// Check outdir paths to be S3 buckets if running on AWSBatch
Expand All @@ -96,7 +96,7 @@ ch_output_docs = file("$baseDir/docs/output.md", checkIfExists: true)
* Create a channel for input read files
*/
if (params.readPaths) {
if (params.singleEnd) {
if (params.single_end) {
Channel
.from(params.readPaths)
.map { row -> [ row[0], [ file(row[1][0], checkIfExists: true) ] ] }
Expand All @@ -111,8 +111,8 @@ if (params.readPaths) {
}
} else {
Channel
.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." }
.fromFilePairs(params.reads, size: params.single_end ? 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 --single_end on the command line." }
.into { ch_read_files_fastqc; ch_read_files_trimming }
}

Expand All @@ -124,7 +124,7 @@ summary['Run Name'] = custom_runName ?: workflow.runName
// TODO nf-core: Report custom parameters here
summary['Reads'] = params.reads
summary['Fasta Ref'] = params.fasta
summary['Data Type'] = params.singleEnd ? 'Single-End' : 'Paired-End'
summary['Data Type'] = params.single_end ? 'Single-End' : 'Paired-End'
summary['Max Resources'] = "$params.max_memory memory, $params.max_cpus cpus, $params.max_time time per job"
if (workflow.containerEngine) summary['Container'] = "$workflow.containerEngine - $workflow.container"
summary['Output dir'] = params.outdir
Expand Down Expand Up @@ -334,7 +334,7 @@ workflow.onComplete {
// Send the HTML e-mail
if (email_address) {
try {
if ( params.plaintext_email ){ throw GroovyException('Send plaintext e-mail, not HTML') }
if (params.plaintext_email) { throw GroovyException('Send plaintext e-mail, not HTML') }
// Try to send HTML e-mail using sendmail
[ 'sendmail', '-t' ].execute() << sendmail_html
log.info "[{{ cookiecutter.name }}] Sent summary e-mail to $email_address (sendmail)"
Expand All @@ -346,13 +346,13 @@ workflow.onComplete {
}

// Write summary e-mail HTML to a file
def output_d = new File( "${params.outdir}/pipeline_info/" )
def output_d = new File("${params.outdir}/pipeline_info/")
if (!output_d.exists()) {
output_d.mkdirs()
}
def output_hf = new File( output_d, "pipeline_report.html" )
def output_hf = new File(output_d, "pipeline_report.html")
output_hf.withWriter { w -> w << email_html }
def output_tf = new File( output_d, "pipeline_report.txt" )
def output_tf = new File(output_d, "pipeline_report.txt")
output_tf.withWriter { w -> w << email_txt }

c_reset = params.monochrome_logs ? '' : "\033[0m";
Expand All @@ -376,7 +376,7 @@ workflow.onComplete {
}


def nfcoreHeader(){
def nfcoreHeader() {
// Log colors ANSI codes
c_reset = params.monochrome_logs ? '' : "\033[0m";
c_dim = params.monochrome_logs ? '' : "\033[2m";
Expand All @@ -399,7 +399,7 @@ def nfcoreHeader(){
""".stripIndent()
}

def checkHostname(){
def checkHostname() {
def c_reset = params.monochrome_logs ? '' : "\033[0m"
def c_white = params.monochrome_logs ? '' : "\033[0;37m"
def c_red = params.monochrome_logs ? '' : "\033[1;91m"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ params {
// TODO nf-core: Specify your pipeline's command line flags
genome = false
reads = "data/*{1,2}.fastq.gz"
singleEnd = false
single_end = false
outdir = './results'

// Boilerplate options
Expand All @@ -28,7 +28,7 @@ params {
tracedir = "${params.outdir}/pipeline_info"
awsqueue = false
awsregion = 'eu-west-1'
igenomesIgnore = false
igenomes_ignore = false
custom_config_version = 'master'
custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
hostnames = false
Expand Down Expand Up @@ -56,7 +56,8 @@ profiles {
conda { process.conda = "$baseDir/environment.yml" }
debug { process.beforeScript = 'echo $HOSTNAME' }
docker { docker.enabled = true }
singularity { singularity.enabled = true }
singularity { singularity.enabled = true
singularity.autoMounts = true }
test { includeConfig 'conf/test.config' }
}

Expand All @@ -66,7 +67,7 @@ profiles {
docker.runOptions = '-u \$(id -u):\$(id -g)'

// Load igenomes.config if required
if (!params.igenomesIgnore) {
if (!params.igenomes_ignore) {
includeConfig 'conf/igenomes.config'
}

Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载