Skip to content

Commit b422c87

Browse files
committed
Use module config
Signed-off-by: Ben Sherman <[email protected]>
1 parent 3bec233 commit b422c87

File tree

21 files changed

+1119
-1251
lines changed

21 files changed

+1119
-1251
lines changed

conf/modules.config

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

main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ WorkflowMain.initialise(workflow, params, log)
4343
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4444
*/
4545

46-
include { RNASEQ } from './workflows/rnaseq'
46+
include { RNASEQ } from './workflows/rnaseq/main'
4747

4848
//
4949
// WORKFLOW: Run main nf-core/rnaseq analysis pipeline

subworkflows/local/align_star.nf renamed to subworkflows/local/align_star/main.nf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// Alignment with STAR
33
//
44

5-
include { STAR_ALIGN } from '../../modules/nf-core/star/align/main'
6-
include { STAR_ALIGN_IGENOMES } from '../../modules/local/star_align_igenomes'
7-
include { BAM_SORT_STATS_SAMTOOLS } from '../nf-core/bam_sort_stats_samtools/main'
5+
include { STAR_ALIGN } from '../../../modules/nf-core/star/align/main'
6+
include { STAR_ALIGN_IGENOMES } from '../../../modules/local/star_align_igenomes'
7+
include { BAM_SORT_STATS_SAMTOOLS } from '../../nf-core/bam_sort_stats_samtools/main'
88

99
workflow ALIGN_STAR {
1010
take:
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
withName: 'STAR_ALIGN|STAR_ALIGN_IGENOMES' {
3+
ext.args = [
4+
'--quantMode TranscriptomeSAM',
5+
'--twopassMode Basic',
6+
'--outSAMtype BAM Unsorted',
7+
'--readFilesCommand zcat',
8+
'--runRNGseed 0',
9+
'--outFilterMultimapNmax 20',
10+
'--alignSJDBoverhangMin 1',
11+
'--outSAMattributes NH HI AS NM MD',
12+
'--quantTranscriptomeBan Singleend',
13+
'--outSAMstrandField intronMotif',
14+
params.save_unaligned ? '--outReadsUnmapped Fastx' : '',
15+
params.extra_star_align_args ? params.extra_star_align_args.split("\\s(?=--)") : ''
16+
].flatten().unique(false).join(' ').trim()
17+
publishDir = [
18+
[
19+
path: "${params.outdir}/${params.aligner}/log",
20+
mode: params.publish_dir_mode,
21+
pattern: '*.{out,tab}'
22+
],
23+
[
24+
path: "${params.outdir}/${params.aligner}",
25+
mode: params.publish_dir_mode,
26+
pattern: '*.bam',
27+
enabled: params.save_align_intermeds
28+
],
29+
[
30+
path: "${params.outdir}/${params.aligner}/unmapped",
31+
mode: params.publish_dir_mode,
32+
pattern: '*.fastq.gz',
33+
enabled: params.save_unaligned
34+
]
35+
]
36+
}

subworkflows/local/input_check.nf renamed to subworkflows/local/input_check/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Check input samplesheet and get read channels
33
//
44

5-
include { SAMPLESHEET_CHECK } from '../../modules/local/samplesheet_check'
5+
include { SAMPLESHEET_CHECK } from '../../../modules/local/samplesheet_check'
66

77
workflow INPUT_CHECK {
88
take:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
withName: 'SAMPLESHEET_CHECK' {
3+
publishDir = [
4+
path: "${params.outdir}/pipeline_info",
5+
mode: params.publish_dir_mode,
6+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
7+
]
8+
}

subworkflows/local/prepare_genome.nf renamed to subworkflows/local/prepare_genome/main.nf

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@
22
// Uncompress and prepare reference genome files
33
//
44

5-
include { GUNZIP as GUNZIP_FASTA } from '../../modules/nf-core/gunzip/main'
6-
include { GUNZIP as GUNZIP_GTF } from '../../modules/nf-core/gunzip/main'
7-
include { GUNZIP as GUNZIP_GFF } from '../../modules/nf-core/gunzip/main'
8-
include { GUNZIP as GUNZIP_GENE_BED } from '../../modules/nf-core/gunzip/main'
9-
include { GUNZIP as GUNZIP_TRANSCRIPT_FASTA } from '../../modules/nf-core/gunzip/main'
10-
include { GUNZIP as GUNZIP_ADDITIONAL_FASTA } from '../../modules/nf-core/gunzip/main'
5+
include { GUNZIP as GUNZIP_FASTA } from '../../../modules/nf-core/gunzip/main'
6+
include { GUNZIP as GUNZIP_GTF } from '../../../modules/nf-core/gunzip/main'
7+
include { GUNZIP as GUNZIP_GFF } from '../../../modules/nf-core/gunzip/main'
8+
include { GUNZIP as GUNZIP_GENE_BED } from '../../../modules/nf-core/gunzip/main'
9+
include { GUNZIP as GUNZIP_TRANSCRIPT_FASTA } from '../../../modules/nf-core/gunzip/main'
10+
include { GUNZIP as GUNZIP_ADDITIONAL_FASTA } from '../../../modules/nf-core/gunzip/main'
1111

12-
include { UNTAR as UNTAR_BBSPLIT_INDEX } from '../../modules/nf-core/untar/main'
13-
include { UNTAR as UNTAR_STAR_INDEX } from '../../modules/nf-core/untar/main'
14-
include { UNTAR as UNTAR_RSEM_INDEX } from '../../modules/nf-core/untar/main'
15-
include { UNTAR as UNTAR_HISAT2_INDEX } from '../../modules/nf-core/untar/main'
16-
include { UNTAR as UNTAR_SALMON_INDEX } from '../../modules/nf-core/untar/main'
12+
include { UNTAR as UNTAR_BBSPLIT_INDEX } from '../../../modules/nf-core/untar/main'
13+
include { UNTAR as UNTAR_STAR_INDEX } from '../../../modules/nf-core/untar/main'
14+
include { UNTAR as UNTAR_RSEM_INDEX } from '../../../modules/nf-core/untar/main'
15+
include { UNTAR as UNTAR_HISAT2_INDEX } from '../../../modules/nf-core/untar/main'
16+
include { UNTAR as UNTAR_SALMON_INDEX } from '../../../modules/nf-core/untar/main'
1717

18-
include { CUSTOM_GETCHROMSIZES } from '../../modules/nf-core/custom/getchromsizes/main'
19-
include { GFFREAD } from '../../modules/nf-core/gffread/main'
20-
include { BBMAP_BBSPLIT } from '../../modules/nf-core/bbmap/bbsplit/main'
21-
include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate/main'
22-
include { HISAT2_EXTRACTSPLICESITES } from '../../modules/nf-core/hisat2/extractsplicesites/main'
23-
include { HISAT2_BUILD } from '../../modules/nf-core/hisat2/build/main'
24-
include { SALMON_INDEX } from '../../modules/nf-core/salmon/index/main'
25-
include { RSEM_PREPAREREFERENCE as RSEM_PREPAREREFERENCE_GENOME } from '../../modules/nf-core/rsem/preparereference/main'
26-
include { RSEM_PREPAREREFERENCE as MAKE_TRANSCRIPTS_FASTA } from '../../modules/nf-core/rsem/preparereference/main'
18+
include { CUSTOM_GETCHROMSIZES } from '../../../modules/nf-core/custom/getchromsizes/main'
19+
include { GFFREAD } from '../../../modules/nf-core/gffread/main'
20+
include { BBMAP_BBSPLIT } from '../../../modules/nf-core/bbmap/bbsplit/main'
21+
include { STAR_GENOMEGENERATE } from '../../../modules/nf-core/star/genomegenerate/main'
22+
include { HISAT2_EXTRACTSPLICESITES } from '../../../modules/nf-core/hisat2/extractsplicesites/main'
23+
include { HISAT2_BUILD } from '../../../modules/nf-core/hisat2/build/main'
24+
include { SALMON_INDEX } from '../../../modules/nf-core/salmon/index/main'
25+
include { RSEM_PREPAREREFERENCE as RSEM_PREPAREREFERENCE_GENOME } from '../../../modules/nf-core/rsem/preparereference/main'
26+
include { RSEM_PREPAREREFERENCE as MAKE_TRANSCRIPTS_FASTA } from '../../../modules/nf-core/rsem/preparereference/main'
2727

28-
include { PREPROCESS_TRANSCRIPTS_FASTA_GENCODE } from '../../modules/local/preprocess_transcripts_fasta_gencode'
29-
include { GTF2BED } from '../../modules/local/gtf2bed'
30-
include { CAT_ADDITIONAL_FASTA } from '../../modules/local/cat_additional_fasta'
31-
include { GTF_GENE_FILTER } from '../../modules/local/gtf_gene_filter'
32-
include { STAR_GENOMEGENERATE_IGENOMES } from '../../modules/local/star_genomegenerate_igenomes'
28+
include { PREPROCESS_TRANSCRIPTS_FASTA_GENCODE } from '../../../modules/local/preprocess_transcripts_fasta_gencode'
29+
include { GTF2BED } from '../../../modules/local/gtf2bed'
30+
include { CAT_ADDITIONAL_FASTA } from '../../../modules/local/cat_additional_fasta'
31+
include { GTF_GENE_FILTER } from '../../../modules/local/gtf_gene_filter'
32+
include { STAR_GENOMEGENERATE_IGENOMES } from '../../../modules/local/star_genomegenerate_igenomes'
3333

3434
workflow PREPARE_GENOME {
3535
take:
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
2+
withName: 'GUNZIP_.*|MAKE_TRANSCRIPTS_FASTA' {
3+
publishDir = [
4+
path: "${params.outdir}/genome",
5+
mode: params.publish_dir_mode,
6+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
7+
enabled: params.save_reference
8+
]
9+
}
10+
11+
withName: 'UNTAR_.*' {
12+
ext.args2 = '--no-same-owner'
13+
}
14+
15+
withName: 'UNTAR_.*|STAR_GENOMEGENERATE|STAR_GENOMEGENERATE_IGENOMES|HISAT2_BUILD' {
16+
publishDir = [
17+
path: "${params.outdir}/genome/index",
18+
mode: params.publish_dir_mode,
19+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
20+
enabled: params.save_reference
21+
]
22+
}
23+
24+
withName: 'GFFREAD' {
25+
ext.args = '--keep-exon-attrs -F -T'
26+
publishDir = [
27+
path: "${params.outdir}/genome",
28+
mode: params.publish_dir_mode,
29+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
30+
enabled: params.save_reference
31+
]
32+
}
33+
34+
withName: 'HISAT2_EXTRACTSPLICESITES' {
35+
publishDir = [
36+
path: "${params.outdir}/genome/index",
37+
mode: params.publish_dir_mode,
38+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
39+
enabled: params.save_reference
40+
]
41+
}
42+
43+
withName: 'SALMON_INDEX' {
44+
ext.args = params.gencode ? '--gencode' : ''
45+
publishDir = [
46+
path: "${params.outdir}/genome/index",
47+
mode: params.publish_dir_mode,
48+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
49+
enabled: params.save_reference
50+
]
51+
}
52+
53+
withName: 'RSEM_PREPAREREFERENCE_GENOME' {
54+
ext.args = '--star'
55+
publishDir = [
56+
path: "${params.outdir}/genome/index",
57+
mode: params.publish_dir_mode,
58+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
59+
enabled: params.save_reference
60+
]
61+
}
62+
63+
withName: 'GTF2BED' {
64+
publishDir = [
65+
path: "${params.outdir}/genome",
66+
mode: params.publish_dir_mode,
67+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
68+
enabled: params.save_reference
69+
]
70+
}
71+
72+
withName: 'CAT_ADDITIONAL_FASTA|PREPROCESS_TRANSCRIPTS_FASTA_GENCODE' {
73+
publishDir = [
74+
path: "${params.outdir}/genome",
75+
mode: params.publish_dir_mode,
76+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
77+
enabled: params.save_reference
78+
]
79+
}
80+
81+
withName: 'GTF_GENE_FILTER' {
82+
publishDir = [
83+
path: "${params.outdir}/genome",
84+
mode: params.publish_dir_mode,
85+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
86+
enabled: params.save_reference
87+
]
88+
}
89+
90+
withName: 'CUSTOM_GETCHROMSIZES' {
91+
publishDir = [
92+
path: "${params.outdir}/genome",
93+
mode: params.publish_dir_mode,
94+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
95+
enabled: params.save_reference
96+
]
97+
}
98+
99+
withName: 'BBMAP_BBSPLIT' {
100+
ext.args = 'build=1'
101+
publishDir = [
102+
path: "${params.outdir}/genome/index",
103+
mode: params.publish_dir_mode,
104+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
105+
enabled: params.save_reference
106+
]
107+
}

subworkflows/local/quantify_rsem.nf renamed to subworkflows/local/quantify_rsem/main.nf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// Gene/transcript quantification with RSEM
33
//
44

5-
include { RSEM_CALCULATEEXPRESSION } from '../../modules/nf-core/rsem/calculateexpression/main'
6-
include { RSEM_MERGE_COUNTS } from '../../modules/local/rsem_merge_counts'
7-
include { BAM_SORT_STATS_SAMTOOLS } from '../nf-core/bam_sort_stats_samtools/main'
5+
include { RSEM_CALCULATEEXPRESSION } from '../../../modules/nf-core/rsem/calculateexpression/main'
6+
include { RSEM_MERGE_COUNTS } from '../../../modules/local/rsem_merge_counts'
7+
include { BAM_SORT_STATS_SAMTOOLS } from '../../nf-core/bam_sort_stats_samtools/main'
88

99
workflow QUANTIFY_RSEM {
1010
take:
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
withName: 'RSEM_CALCULATEEXPRESSION' {
3+
ext.args = [
4+
'--star',
5+
'--star-output-genome-bam',
6+
'--star-gzipped-read-file',
7+
'--estimate-rspd',
8+
'--seed 1'
9+
].join(' ').trim()
10+
publishDir = [
11+
[
12+
path: "${params.outdir}/${params.aligner}",
13+
mode: params.publish_dir_mode,
14+
pattern: "*.{stat,results}"
15+
],
16+
[
17+
path: "${params.outdir}/${params.aligner}",
18+
mode: params.publish_dir_mode,
19+
pattern: "*.bam",
20+
enabled: params.save_align_intermeds
21+
],
22+
[
23+
path: "${params.outdir}/${params.aligner}/log",
24+
mode: params.publish_dir_mode,
25+
pattern: "*.log"
26+
]
27+
]
28+
}
29+
30+
withName: 'RSEM_MERGE_COUNTS' {
31+
publishDir = [
32+
path: "${params.outdir}/${params.aligner}",
33+
mode: params.publish_dir_mode,
34+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
35+
]
36+
}

0 commit comments

Comments
 (0)