Skip to content

Commit

Permalink
Fix indents
Browse files Browse the repository at this point in the history
  • Loading branch information
drpatelh committed May 4, 2021
1 parent b003e6e commit 988b651
Show file tree
Hide file tree
Showing 12 changed files with 111 additions and 121 deletions.
38 changes: 19 additions & 19 deletions lib/NfcoreSchema.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -448,27 +448,27 @@ class NfcoreSchema {
def Map schema_properties = (Map) new JsonSlurper().parseText(json).get('properties')
/* Tree looks like this in nf-core schema
* definitions <- this is what the first get('definitions') gets us
group 1
title
description
properties
parameter 1
type
description
parameter 2
type
description
group 2
title
description
properties
parameter 1
type
description
group 1
title
description
properties
parameter 1
type
description
parameter 2
type
description
group 2
title
description
properties
parameter 1
type
description
* properties <- parameters can also be ungrouped, outside of definitions
parameter 1
type
description
type
description
*/

// Grouped params
Expand Down
8 changes: 4 additions & 4 deletions lib/NfcoreTemplate.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ class NfcoreTemplate {
hnames.each { hname ->
if (hostname.contains(hname) && !workflow.profile.contains(prof)) {
log.info "=${colors.yellow}====================================================${colors.reset}=\n" +
"${colors.yellow}WARN: You are running with `-profile $workflow.profile`\n" +
" but your machine hostname is ${colors.white}'$hostname'${colors.reset}.\n" +
" ${colors.yellow_bold}Please use `-profile $prof${colors.reset}`\n" +
"=${colors.yellow}====================================================${colors.reset}="
"${colors.yellow}WARN: You are running with `-profile $workflow.profile`\n" +
" but your machine hostname is ${colors.white}'$hostname'${colors.reset}.\n" +
" ${colors.yellow_bold}Please use `-profile $prof${colors.reset}`\n" +
"=${colors.yellow}====================================================${colors.reset}="
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions lib/Utils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ class Utils {

if (conda_check_failed) {
log.warn "=============================================================================\n" +
" There is a problem with your Conda configuration!\n\n" +
" You will need to set-up the conda-forge and bioconda channels correctly.\n" +
" Please refer to https://bioconda.github.io/user/install.html#set-up-channels\n" +
" NB: The order of the channels matters!\n" +
"==================================================================================="
" There is a problem with your Conda configuration!\n\n" +
" You will need to set-up the conda-forge and bioconda channels correctly.\n" +
" Please refer to https://bioconda.github.io/user/install.html#set-up-channels\n" +
" NB: The order of the channels matters!\n" +
"==================================================================================="
}
}

Expand All @@ -44,4 +44,4 @@ class Utils {
public static String joinModuleArgs(args_list) {
return ' ' + args_list.join(' ')
}
}
}
24 changes: 11 additions & 13 deletions lib/WorkflowCommons.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class WorkflowCommons {
private static void genomeExistsError(params, log) {
if (params.genomes && params.genome && !params.genomes.containsKey(params.genome)) {
log.error "=============================================================================\n" +
" Genome '${params.genome}' not found in any config files provided to the pipeline.\n" +
" Currently, the available genome keys are:\n" +
" ${params.genomes.keySet().join(", ")}\n" +
"==================================================================================="
" Genome '${params.genome}' not found in any config files provided to the pipeline.\n" +
" Currently, the available genome keys are:\n" +
" ${params.genomes.keySet().join(", ")}\n" +
"==================================================================================="
System.exit(1)
}
}
Expand Down Expand Up @@ -63,15 +63,13 @@ class WorkflowCommons {
}
if (total != (left + right)) {
log.warn "=============================================================================\n" +
" Please check the name field (column 4) in the file supplied via --primer_bed.\n\n" +
" All of the values in that column do not end with those supplied by:\n" +
" --primer_left_suffix : $primer_left_suffix\n" +
" --primer_right_suffix: $primer_right_suffix\n\n" +
" This information is required to collapse the primer intervals into amplicons\n" +
" for the coverage plots generated by the pipeline.\n" +
"==================================================================================="
" Please check the name field (column 4) in the file supplied via --primer_bed.\n\n" +
" All of the values in that column do not end with those supplied by:\n" +
" --primer_left_suffix : $primer_left_suffix\n" +
" --primer_right_suffix: $primer_right_suffix\n\n" +
" This information is required to collapse the primer intervals into amplicons\n" +
" for the coverage plots generated by the pipeline.\n" +
"==================================================================================="
}
}
}


20 changes: 9 additions & 11 deletions lib/WorkflowIllumina.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ class WorkflowIllumina {
count++
if (count > 1) {
log.warn "=============================================================================\n" +
" This pipeline does not officially support multi-fasta genome files!\n\n" +
" The parameters and processes are tailored for viral genome analysis.\n" +
" Please amend the '--fasta' parameter.\n" +
"==================================================================================="
" This pipeline does not officially support multi-fasta genome files!\n\n" +
" The parameters and processes are tailored for viral genome analysis.\n" +
" Please amend the '--fasta' parameter.\n" +
"==================================================================================="
break
}
}
Expand Down Expand Up @@ -110,11 +110,11 @@ class WorkflowIllumina {
count++
if (count > 1) {
log.warn "=============================================================================\n" +
" Found '${name_prefix}' in the name field of the primer BED file!\n" +
" This suggests that you have used the SWIFT/SNAP protocol to prep your samples.\n" +
" If so, please set '--ivar_trim_offset 5' as suggested in the issue below:\n" +
" https://github.com/nf-core/viralrecon/issues/170\n" +
"==================================================================================="
" Found '${name_prefix}' in the name field of the primer BED file!\n" +
" This suggests that you have used the SWIFT/SNAP protocol to prep your samples.\n" +
" If so, please set '--ivar_trim_offset 5' as suggested in the issue below:\n" +
" https://github.com/nf-core/viralrecon/issues/170\n" +
"==================================================================================="
break
}
}
Expand All @@ -130,5 +130,3 @@ class WorkflowIllumina {
return json['after_filtering']['total_reads'].toInteger()
}
}


58 changes: 28 additions & 30 deletions lib/WorkflowMain.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ class WorkflowMain {
*/
public static String citation(workflow) {
return "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" +
"* The pipeline\n" +
" https://doi.org/10.5281/zenodo.3901628\n\n" +
"* The nf-core framework\n" +
" https://doi.org/10.1038/s41587-020-0439-x\n\n" +
"* Software dependencies\n" +
" https://github.com/${workflow.manifest.name}/blob/master/CITATIONS.md"
"* The pipeline\n" +
" https://doi.org/10.5281/zenodo.3901628\n\n" +
"* The nf-core framework\n" +
" https://doi.org/10.1038/s41587-020-0439-x\n\n" +
"* Software dependencies\n" +
" https://github.com/${workflow.manifest.name}/blob/master/CITATIONS.md"
}

/*
Expand Down Expand Up @@ -89,11 +89,11 @@ class WorkflowMain {
*/
public static String getGenomeAttribute(params, attribute, log, primer_set='', primer_set_version=0) {
def val = ''
def support_str = " The default genome config used by the pipeline can be found here:\n" +
" - https://github.com/nf-core/configs/blob/master/conf/pipeline/viralrecon/genomes.config\n\n" +
" If you would still like to blame us please come and find us on nf-core Slack:\n" +
" - https://nf-co.re/viralrecon#contributions-and-support\n" +
"============================================================================="
def support_link = " The default genome config used by the pipeline can be found here:\n" +
" - https://github.com/nf-core/configs/blob/master/conf/pipeline/viralrecon/genomes.config\n\n" +
" If you would still like to blame us please come and find us on nf-core Slack:\n" +
" - https://nf-co.re/viralrecon#contributions-and-support\n" +
"============================================================================="
if (params.genomes && params.genome && params.genomes.containsKey(params.genome)) {
def genome_map = params.genomes[ params.genome ]
if (primer_set) {
Expand All @@ -106,31 +106,31 @@ class WorkflowMain {
genome_map = genome_map[ primer_set_version ]
} else {
log.error "=============================================================================\n" +
" --primer_set_version '${primer_set_version}' not found!\n\n" +
" Currently, the available primer set version keys are: ${genome_map.keySet().join(", ")}\n\n" +
" Please check:\n" +
" - The value provided to --primer_set_version (currently '${primer_set_version}')\n" +
" - The value provided to --primer_set (currently '${primer_set}')\n" +
" - The value provided to --genome (currently '${params.genome}')\n" +
" - Any custom config files provided to the pipeline.\n\n" + support_str
" --primer_set_version '${primer_set_version}' not found!\n\n" +
" Currently, the available primer set version keys are: ${genome_map.keySet().join(", ")}\n\n" +
" Please check:\n" +
" - The value provided to --primer_set_version (currently '${primer_set_version}')\n" +
" - The value provided to --primer_set (currently '${primer_set}')\n" +
" - The value provided to --genome (currently '${params.genome}')\n" +
" - Any custom config files provided to the pipeline.\n\n" + support_link
System.exit(1)
}
} else {
log.error "=============================================================================\n" +
" --primer_set '${primer_set}' not found!\n\n" +
" Currently, the available primer set keys are: ${genome_map.keySet().join(", ")}\n\n" +
" Please check:\n" +
" - The value provided to --primer_set (currently '${primer_set}')\n" +
" - The value provided to --genome (currently '${params.genome}')\n" +
" - Any custom config files provided to the pipeline.\n\n" + support_str
" --primer_set '${primer_set}' not found!\n\n" +
" Currently, the available primer set keys are: ${genome_map.keySet().join(", ")}\n\n" +
" Please check:\n" +
" - The value provided to --primer_set (currently '${primer_set}')\n" +
" - The value provided to --genome (currently '${params.genome}')\n" +
" - Any custom config files provided to the pipeline.\n\n" + support_link
System.exit(1)
}
} else {
log.error "=============================================================================\n" +
" Genome '${params.genome}' does not contain any primer sets!\n\n" +
" Please check:\n" +
" - The value provided to --genome (currently '${params.genome}')\n" +
" - Any custom config files provided to the pipeline.\n\n" + support_str
" Genome '${params.genome}' does not contain any primer sets!\n\n" +
" Please check:\n" +
" - The value provided to --genome (currently '${params.genome}')\n" +
" - Any custom config files provided to the pipeline.\n\n" + support_link
System.exit(1)
}
}
Expand All @@ -141,5 +141,3 @@ class WorkflowMain {
return val
}
}


2 changes: 0 additions & 2 deletions lib/WorkflowNanopore.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,3 @@ class WorkflowNanopore {
}
}
}


14 changes: 6 additions & 8 deletions lib/WorkflowSraDownload.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ class WorkflowSraDownload {
*/
public static void sraDownloadWarn(log) {
log.warn "=============================================================================\n" +
" Please double-check the samplesheet that has been auto-created using the\n" +
" public database ids provided via the '--public_data_ids' parameter.\n\n" +
" All of the sample metadata obtained from the ENA has been appended\n" +
" as additional columns to help you manually curate the samplesheet before\n" +
" you run the main workflow(s) in the pipeline.\n" +
"==================================================================================="
" Please double-check the samplesheet that has been auto-created using the\n" +
" public database ids provided via the '--public_data_ids' parameter.\n\n" +
" All of the sample metadata obtained from the ENA has been appended\n" +
" as additional columns to help you manually curate the samplesheet before\n" +
" you run the main workflow(s) in the pipeline.\n" +
"==================================================================================="
}
}


18 changes: 9 additions & 9 deletions main.nf
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/usr/bin/env nextflow
/*
========================================================================================
nf-core/viralrecon
nf-core/viralrecon
========================================================================================
Github : https://github.com/nf-core/viralrecon
Website: https://nf-co.re/viralrecon
Slack : https://nfcore.slack.com/channels/viralrecon
Github : https://github.com/nf-core/viralrecon
Website: https://nf-co.re/viralrecon
Slack : https://nfcore.slack.com/channels/viralrecon
----------------------------------------------------------------------------------------
*/

nextflow.enable.dsl = 2

/*
========================================================================================
GENOME PARAMETER VALUES
GENOME PARAMETER VALUES
========================================================================================
*/

Expand All @@ -35,15 +35,15 @@ params.primer_bed = WorkflowMain.getGenomeAttribute(params, 'primer_bed', log

/*
========================================================================================
VALIDATE & PRINT PARAMETER SUMMARY
VALIDATE & PRINT PARAMETER SUMMARY
========================================================================================
*/

WorkflowMain.initialise(workflow, params, log)

/*
========================================================================================
NAMED WORKFLOW FOR PIPELINE
NAMED WORKFLOW FOR PIPELINE
========================================================================================
*/

Expand Down Expand Up @@ -74,7 +74,7 @@ workflow NFCORE_VIRALRECON {

/*
========================================================================================
RUN ALL WORKFLOWS
RUN ALL WORKFLOWS
========================================================================================
*/

Expand All @@ -88,6 +88,6 @@ workflow {

/*
========================================================================================
THE END
THE END
========================================================================================
*/
Loading

0 comments on commit 988b651

Please sign in to comment.