Skip to content

Commit 64b8051

Browse files
authored
General refactor and format (#142)
* formatting * refactor tool config * remove unused params * use passed vals not params * fix bitwise or * remove unused channel * formatting * remove old unused htseq module * formatting * formatting * simplify closures for clarity * remove git ignore because lint * fix: add ch_reads back in * fix newline comments * harshil alignment * more harshil * fix harshil * fix newline comments
1 parent 798d38d commit 64b8051

File tree

22 files changed

+1114
-1175
lines changed

22 files changed

+1114
-1175
lines changed

conf/base.config

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
process {
1212

1313
// TODO nf-core: Check the defaults for all processes
14-
cpus = { 1 * task.attempt }
15-
memory = { 6.GB * task.attempt }
16-
time = { 4.h * task.attempt }
14+
cpus = { 1 * task.attempt }
15+
memory = { 6.GB * task.attempt }
16+
time = { 4.h * task.attempt }
1717

1818
errorStrategy = { task.exitStatus in ((130..145) + 104) ? 'retry' : 'finish' }
1919
maxRetries = 1
@@ -26,40 +26,40 @@ process {
2626
// adding in your local modules too.
2727
// TODO nf-core: Customise requirements for specific processes.
2828
// See https://www.nextflow.io/docs/latest/config.html#config-process-selectors
29-
withLabel:process_single {
30-
cpus = { 1 }
29+
withLabel: process_single {
30+
cpus = { 1 }
3131
memory = { 6.GB * task.attempt }
32-
time = { 4.h * task.attempt }
32+
time = { 4.h * task.attempt }
3333
}
34-
withLabel:process_low {
35-
cpus = { 2 * task.attempt }
34+
withLabel: process_low {
35+
cpus = { 2 * task.attempt }
3636
memory = { 12.GB * task.attempt }
37-
time = { 4.h * task.attempt }
37+
time = { 4.h * task.attempt }
3838
}
39-
withLabel:process_medium {
40-
cpus = { 6 * task.attempt }
39+
withLabel: process_medium {
40+
cpus = { 6 * task.attempt }
4141
memory = { 36.GB * task.attempt }
42-
time = { 8.h * task.attempt }
42+
time = { 8.h * task.attempt }
4343
}
44-
withLabel:process_high {
45-
cpus = { 12 * task.attempt }
44+
withLabel: process_high {
45+
cpus = { 12 * task.attempt }
4646
memory = { 72.GB * task.attempt }
47-
time = { 16.h * task.attempt }
47+
time = { 16.h * task.attempt }
4848
}
49-
withLabel:process_long {
50-
time = { 20.h * task.attempt }
49+
withLabel: process_long {
50+
time = { 20.h * task.attempt }
5151
}
52-
withLabel:process_high_memory {
52+
withLabel: process_high_memory {
5353
memory = { 200.GB * task.attempt }
5454
}
55-
withLabel:error_ignore {
55+
withLabel: error_ignore {
5656
errorStrategy = 'ignore'
5757
}
58-
withLabel:error_retry {
58+
withLabel: error_retry {
5959
errorStrategy = 'retry'
6060
maxRetries = 2
6161
}
62-
withName:CUSTOM_DUMPSOFTWAREVERSIONS {
62+
withName: CUSTOM_DUMPSOFTWAREVERSIONS {
6363
cache = false
6464
}
6565
}

conf/igenomes.config

Lines changed: 408 additions & 408 deletions
Large diffs are not rendered by default.

conf/modules.config

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ process {
7878
// SALMON SA
7979
// -----------------------------
8080

81-
if (params.run_salmon_SA) {
81+
if (params.salmon_sa) {
8282

8383
withName: 'NFCORE_DUALRNASEQ:DUALRNASEQ:SALMON_SELECTIVE_ALIGNMENT:SALMON_INDEX' {
8484
publishDir = [
@@ -128,12 +128,13 @@ process {
128128
// SALMON AB
129129
// -----------------------------
130130

131-
if (params.run_salmon_AB) {
131+
if (params.salmon_ab) {
132132

133133
withName: 'NFCORE_DUALRNASEQ:DUALRNASEQ:SALMON_ALIGNMENT_BASED:STAR_GENOMEGENERATE' {
134134
ext.args = '--sjdbGTFfeatureExon quant --sjdbGTFtagExonParentTranscript parent'
135135
publishDir = [
136136
path: { "${params.outdir}/salmon_AB/star/" },
137+
137138
mode: params.publish_dir_mode
138139
]
139140
}
@@ -196,7 +197,7 @@ process {
196197
// STAR GENOME
197198
// -----------------------------
198199

199-
if (params.run_star) {
200+
if (params.star) {
200201

201202
withName: 'NFCORE_DUALRNASEQ:DUALRNASEQ:STAR_ALIGNMENT:STAR_GENOMEGENERATE' {
202203
ext.args = '--sjdbGTFfeatureExon quant --sjdbGTFtagExonParentTranscript parent'
@@ -230,7 +231,7 @@ process {
230231
// HTSEQ
231232
// -----------------------------
232233

233-
if (params.run_htseq) {
234+
if (params.htseq) {
234235

235236
withName: 'NFCORE_DUALRNASEQ:DUALRNASEQ:PREPARE_REFERENCE_FILES:COMBINE_PATHOGEN_HOST_GFF_FILES_HTSEQ' {
236237
publishDir = [
@@ -281,7 +282,7 @@ process {
281282
${fastqc_args_value} \
282283
--quiet
283284
""".trim()
284-
ext.when = { !(params.skip_tools && params.skip_tools.split(',').contains('fastqc')) }
285+
ext.when = { params.fastqc }
285286
publishDir = [
286287
[
287288
path: { "${params.outdir}/fastqc/${meta.id}" },
@@ -297,7 +298,7 @@ process {
297298
${fastqc_args_value} \
298299
--quiet
299300
""".trim()
300-
ext.when = { !(params.skip_tools && (params.skip_tools.split(',').contains('fastqc') || params.skip_tools.split(',').contains('cutadapt'))) }
301+
ext.when = { params.fastqc && (params.cutadapt) }
301302
publishDir = [
302303
[
303304
path: { "${params.outdir}/fastqc_after_trimming/${meta.id}" },
@@ -317,7 +318,7 @@ process {
317318
${cutadapt_args_value} \
318319
--quiet
319320
""".trim()
320-
ext.when = { !(params.skip_tools && params.skip_tools.split(',').contains('cutadapt')) }
321+
ext.when = { params.cutadapt }
321322
publishDir = [
322323
[
323324
path: { "${params.outdir}/cutadapt/${meta.id}" },

conf/test.config

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ process {
1414
resourceLimits = [
1515
cpus: 2,
1616
memory: '6.GB',
17-
time: '1.h'
17+
time: '1.h',
1818
]
1919
}
2020

@@ -31,19 +31,19 @@ params {
3131
// TODO nf-core: Specify the paths to your test data on nf-core/test-datasets
3232
// TODO nf-core: Give any required params for the test so that command line flags are not needed
3333
//input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv'
34-
igenomes_ignore = true
34+
igenomes_ignore = true
3535

36-
input = "data/samplesheet_test_local.csv"
36+
input = "data/samplesheet_test_local.csv"
3737

3838
// Genome references
3939
//genome = 'R64-1-1'
40-
host_fasta_genome = "data/GRCh38.p13_sub.fasta"
41-
host_gff = "data/Human_gencode.v33_sub.gff3"
40+
host_fasta_genome = "data/GRCh38.p13_sub.fasta"
41+
host_gff = "data/Human_gencode.v33_sub.gff3"
4242

4343
pathogen_fasta_transcripts = "data/SL1344_sub_transcriptome.fasta"
44-
host_fasta_transcripts = "data/Human_gencode.v33_sub_transcriptome.fasta"
45-
libtype = ""
44+
host_fasta_transcripts = "data/Human_gencode.v33_sub_transcriptome.fasta"
45+
libtype = ""
4646

47-
pathogen_fasta_genome = "data/SL1344_sub.fasta"
48-
pathogen_gff = "data/SL1344_sub.gff3"
47+
pathogen_fasta_genome = "data/SL1344_sub.fasta"
48+
pathogen_gff = "data/SL1344_sub.gff3"
4949
}

conf/test_2_fasta_pathogen.config

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Defines input files and everything required to run a fast and simple pipeline test.
66

77
Use as follows:
8-
nextflow run nf-core/dualrnaseq -profile test_hackathon,<docker/singularity> --outdir <OUTDIR>
8+
nextflow run nf-core/dualrnaseq -profile test_2_fasta_pathogen,<docker/singularity> --outdir <OUTDIR>
99

1010
----------------------------------------------------------------------------------------
1111
*/
@@ -15,21 +15,21 @@ params {
1515
config_profile_description = 'Minimal test dataset to check pipeline function'
1616

1717
// Limit resources so that this can run on GitHub Actions
18-
max_cpus = 2
19-
max_memory = '6.GB'
20-
max_time = '6.h'
18+
max_cpus = 2
19+
max_memory = '6.GB'
20+
max_time = '6.h'
2121

22-
input = "https://raw.githubusercontent.com/nf-core/test-datasets/dualrnaseq/spreadsheet/spreadsheet.csv"
22+
input = "https://raw.githubusercontent.com/nf-core/test-datasets/dualrnaseq/spreadsheet/spreadsheet.csv"
2323

2424
// Genome references
2525

26-
fasta_host = "https://github.com/nf-core/test-datasets/raw/dualrnaseq/references/GRCh38.p13_sub.fasta"
27-
gff_host = "https://github.com/nf-core/test-datasets/raw/dualrnaseq/references/Human_gencode.v33_sub.gff3"
28-
gff_host_tRNA = "data/human.tRNAs.gff.gz"
29-
transcript_fasta_pathogen = "data/SL1344_sub_transcriptome.fasta"
30-
transcript_fasta_host = "data/Human_gencode.v33_sub_transcriptome.fasta"
31-
libtype = ""
26+
fasta_host = "https://github.com/nf-core/test-datasets/raw/dualrnaseq/references/GRCh38.p13_sub.fasta"
27+
gff_host = "https://github.com/nf-core/test-datasets/raw/dualrnaseq/references/Human_gencode.v33_sub.gff3"
28+
gff_host_tRNA = "data/human.tRNAs.gff.gz"
29+
transcript_fasta_pathogen = "data/SL1344_sub_transcriptome.fasta"
30+
transcript_fasta_host = "data/Human_gencode.v33_sub_transcriptome.fasta"
31+
libtype = ""
3232

33-
fasta_pathogen = "data/SL1344*sub.fasta.gz"
34-
gff_pathogen = "https://github.com/nf-core/test-datasets/raw/dualrnaseq/references/SL1344_sub.gff3"
33+
fasta_pathogen = "data/SL1344*sub.fasta.gz"
34+
gff_pathogen = "https://github.com/nf-core/test-datasets/raw/dualrnaseq/references/SL1344_sub.gff3"
3535
}

conf/test_full.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ params {
1717
// Input data for full size test
1818
// TODO nf-core: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA)
1919
// TODO nf-core: Give any required params for the test so that command line flags are not needed
20-
input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_full_illumina_amplicon.csv'
20+
input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_full_illumina_amplicon.csv'
2121

2222
// Genome references
23-
genome = 'R64-1-1'
23+
genome = 'R64-1-1'
2424
}

conf/test_local.config

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Defines input files and everything required to run a fast and simple pipeline test.
66

77
Use as follows:
8-
nextflow run nf-core/dualrnaseq -profile test_hackathon,<docker/singularity> --outdir <OUTDIR>
8+
nextflow run nf-core/dualrnaseq -profile test_local,<docker/singularity> --outdir <OUTDIR>
99

1010
----------------------------------------------------------------------------------------
1111
*/
@@ -15,61 +15,60 @@ params {
1515
config_profile_description = 'Minimal test dataset to check pipeline function'
1616

1717
// Ignore igenomes
18-
igenomes_ignore = true
18+
igenomes_ignore = true
1919

2020
//dockerImage = 'nfcore/python:3.9.5'
2121

2222
// input = "https://raw.githubusercontent.com/nf-core/test-datasets/dualrnaseq/spreadsheet/spreadsheet.csv"
23-
input = "data/samplesheet_test_local.csv"
23+
input = "data/samplesheet_test_local.csv"
2424
//input = "data/samplesheet_validated.csv"
2525

2626
// Genome references
2727

2828
// fasta_host = "https://github.com/nf-core/test-datasets/raw/dualrnaseq/references/GRCh38.p13_sub.fasta"
29-
host_fasta_genome = "data/GRCh38.p13_sub.fasta"
30-
host_gff = "data/Human_gencode.v33_sub.gff3"
29+
host_fasta_genome = "data/GRCh38.p13_sub.fasta"
30+
host_gff = "data/Human_gencode.v33_sub.gff3"
3131
// gff_host = "https://github.com/nf-core/test-datasets/raw/dualrnaseq/references/Human_gencode.v33_sub.gff3"
3232
// gff_host_tRNA = 'data/human.tRNAs.gff'
3333
pathogen_fasta_transcripts = "data/SL1344_sub_transcriptome.fasta"
34-
host_fasta_transcripts = "data/Human_gencode.v33_sub_transcriptome.fasta"
35-
libtype = ""
34+
host_fasta_transcripts = "data/Human_gencode.v33_sub_transcriptome.fasta"
35+
libtype = ""
3636

3737
// fasta_pathogen = "https://github.com/nf-core/test-datasets/raw/dualrnaseq/references/SL1344_sub.fasta"
3838
// gff_pathogen = "https://github.com/nf-core/test-datasets/raw/dualrnaseq/references/SL1344_sub.gff3"
39-
pathogen_fasta_genome = "data/SL1344_sub.fasta"
40-
pathogen_gff = "data/SL1344_sub.gff3"
41-
39+
pathogen_fasta_genome = "data/SL1344_sub.fasta"
40+
pathogen_gff = "data/SL1344_sub.gff3"
4241
}
4342

4443
process {
45-
// Override the label definitions so can run locally
46-
withLabel:process_single {
47-
cpus = 1
48-
memory = 2.GB
49-
time = '5m'
44+
// Override the label definitions so can run locally
45+
withLabel: process_single {
46+
cpus = 1
47+
memory = 2.GB
48+
time = '5m'
5049
}
5150

52-
withLabel:process_low {
53-
cpus = 1
54-
memory = 4.GB
55-
time = '5m'
51+
withLabel: process_low {
52+
cpus = 1
53+
memory = 4.GB
54+
time = '5m'
5655
}
5756

58-
withLabel:process_medium {
59-
cpus = 2
60-
memory = 6.GB
61-
time = '5m'
57+
withLabel: process_medium {
58+
cpus = 2
59+
memory = 6.GB
60+
time = '5m'
6261
}
6362

64-
withLabel:process_high {
65-
cpus = 2
66-
memory = 6.GB
67-
time = '5m'
63+
withLabel: process_high {
64+
cpus = 2
65+
memory = 6.GB
66+
time = '5m'
6867
}
6968

70-
withLabel:process_high_memory {
71-
cpus = 2
72-
memory = 6.GB
73-
time = '5m'
69+
withLabel: process_high_memory {
70+
cpus = 2
71+
memory = 6.GB
72+
time = '5m'
7473
}
7574
}

0 commit comments

Comments
 (0)