Skip to content

Commit

Permalink
Use module config
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman committed Nov 13, 2023
1 parent 3bec233 commit b422c87
Show file tree
Hide file tree
Showing 21 changed files with 1,119 additions and 1,251 deletions.
1,176 changes: 0 additions & 1,176 deletions conf/modules.config

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ WorkflowMain.initialise(workflow, params, log)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

include { RNASEQ } from './workflows/rnaseq'
include { RNASEQ } from './workflows/rnaseq/main'

//
// WORKFLOW: Run main nf-core/rnaseq analysis pipeline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Alignment with STAR
//

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

workflow ALIGN_STAR {
take:
Expand Down
36 changes: 36 additions & 0 deletions subworkflows/local/align_star/module.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

withName: 'STAR_ALIGN|STAR_ALIGN_IGENOMES' {
ext.args = [
'--quantMode TranscriptomeSAM',
'--twopassMode Basic',
'--outSAMtype BAM Unsorted',
'--readFilesCommand zcat',
'--runRNGseed 0',
'--outFilterMultimapNmax 20',
'--alignSJDBoverhangMin 1',
'--outSAMattributes NH HI AS NM MD',
'--quantTranscriptomeBan Singleend',
'--outSAMstrandField intronMotif',
params.save_unaligned ? '--outReadsUnmapped Fastx' : '',
params.extra_star_align_args ? params.extra_star_align_args.split("\\s(?=--)") : ''
].flatten().unique(false).join(' ').trim()
publishDir = [
[
path: "${params.outdir}/${params.aligner}/log",
mode: params.publish_dir_mode,
pattern: '*.{out,tab}'
],
[
path: "${params.outdir}/${params.aligner}",
mode: params.publish_dir_mode,
pattern: '*.bam',
enabled: params.save_align_intermeds
],
[
path: "${params.outdir}/${params.aligner}/unmapped",
mode: params.publish_dir_mode,
pattern: '*.fastq.gz',
enabled: params.save_unaligned
]
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Check input samplesheet and get read channels
//

include { SAMPLESHEET_CHECK } from '../../modules/local/samplesheet_check'
include { SAMPLESHEET_CHECK } from '../../../modules/local/samplesheet_check'

workflow INPUT_CHECK {
take:
Expand Down
8 changes: 8 additions & 0 deletions subworkflows/local/input_check/module.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

withName: 'SAMPLESHEET_CHECK' {
publishDir = [
path: "${params.outdir}/pipeline_info",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@
// Uncompress and prepare reference genome files
//

include { GUNZIP as GUNZIP_FASTA } from '../../modules/nf-core/gunzip/main'
include { GUNZIP as GUNZIP_GTF } from '../../modules/nf-core/gunzip/main'
include { GUNZIP as GUNZIP_GFF } from '../../modules/nf-core/gunzip/main'
include { GUNZIP as GUNZIP_GENE_BED } from '../../modules/nf-core/gunzip/main'
include { GUNZIP as GUNZIP_TRANSCRIPT_FASTA } from '../../modules/nf-core/gunzip/main'
include { GUNZIP as GUNZIP_ADDITIONAL_FASTA } from '../../modules/nf-core/gunzip/main'
include { GUNZIP as GUNZIP_FASTA } from '../../../modules/nf-core/gunzip/main'
include { GUNZIP as GUNZIP_GTF } from '../../../modules/nf-core/gunzip/main'
include { GUNZIP as GUNZIP_GFF } from '../../../modules/nf-core/gunzip/main'
include { GUNZIP as GUNZIP_GENE_BED } from '../../../modules/nf-core/gunzip/main'
include { GUNZIP as GUNZIP_TRANSCRIPT_FASTA } from '../../../modules/nf-core/gunzip/main'
include { GUNZIP as GUNZIP_ADDITIONAL_FASTA } from '../../../modules/nf-core/gunzip/main'

include { UNTAR as UNTAR_BBSPLIT_INDEX } from '../../modules/nf-core/untar/main'
include { UNTAR as UNTAR_STAR_INDEX } from '../../modules/nf-core/untar/main'
include { UNTAR as UNTAR_RSEM_INDEX } from '../../modules/nf-core/untar/main'
include { UNTAR as UNTAR_HISAT2_INDEX } from '../../modules/nf-core/untar/main'
include { UNTAR as UNTAR_SALMON_INDEX } from '../../modules/nf-core/untar/main'
include { UNTAR as UNTAR_BBSPLIT_INDEX } from '../../../modules/nf-core/untar/main'
include { UNTAR as UNTAR_STAR_INDEX } from '../../../modules/nf-core/untar/main'
include { UNTAR as UNTAR_RSEM_INDEX } from '../../../modules/nf-core/untar/main'
include { UNTAR as UNTAR_HISAT2_INDEX } from '../../../modules/nf-core/untar/main'
include { UNTAR as UNTAR_SALMON_INDEX } from '../../../modules/nf-core/untar/main'

include { CUSTOM_GETCHROMSIZES } from '../../modules/nf-core/custom/getchromsizes/main'
include { GFFREAD } from '../../modules/nf-core/gffread/main'
include { BBMAP_BBSPLIT } from '../../modules/nf-core/bbmap/bbsplit/main'
include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate/main'
include { HISAT2_EXTRACTSPLICESITES } from '../../modules/nf-core/hisat2/extractsplicesites/main'
include { HISAT2_BUILD } from '../../modules/nf-core/hisat2/build/main'
include { SALMON_INDEX } from '../../modules/nf-core/salmon/index/main'
include { RSEM_PREPAREREFERENCE as RSEM_PREPAREREFERENCE_GENOME } from '../../modules/nf-core/rsem/preparereference/main'
include { RSEM_PREPAREREFERENCE as MAKE_TRANSCRIPTS_FASTA } from '../../modules/nf-core/rsem/preparereference/main'
include { CUSTOM_GETCHROMSIZES } from '../../../modules/nf-core/custom/getchromsizes/main'
include { GFFREAD } from '../../../modules/nf-core/gffread/main'
include { BBMAP_BBSPLIT } from '../../../modules/nf-core/bbmap/bbsplit/main'
include { STAR_GENOMEGENERATE } from '../../../modules/nf-core/star/genomegenerate/main'
include { HISAT2_EXTRACTSPLICESITES } from '../../../modules/nf-core/hisat2/extractsplicesites/main'
include { HISAT2_BUILD } from '../../../modules/nf-core/hisat2/build/main'
include { SALMON_INDEX } from '../../../modules/nf-core/salmon/index/main'
include { RSEM_PREPAREREFERENCE as RSEM_PREPAREREFERENCE_GENOME } from '../../../modules/nf-core/rsem/preparereference/main'
include { RSEM_PREPAREREFERENCE as MAKE_TRANSCRIPTS_FASTA } from '../../../modules/nf-core/rsem/preparereference/main'

include { PREPROCESS_TRANSCRIPTS_FASTA_GENCODE } from '../../modules/local/preprocess_transcripts_fasta_gencode'
include { GTF2BED } from '../../modules/local/gtf2bed'
include { CAT_ADDITIONAL_FASTA } from '../../modules/local/cat_additional_fasta'
include { GTF_GENE_FILTER } from '../../modules/local/gtf_gene_filter'
include { STAR_GENOMEGENERATE_IGENOMES } from '../../modules/local/star_genomegenerate_igenomes'
include { PREPROCESS_TRANSCRIPTS_FASTA_GENCODE } from '../../../modules/local/preprocess_transcripts_fasta_gencode'
include { GTF2BED } from '../../../modules/local/gtf2bed'
include { CAT_ADDITIONAL_FASTA } from '../../../modules/local/cat_additional_fasta'
include { GTF_GENE_FILTER } from '../../../modules/local/gtf_gene_filter'
include { STAR_GENOMEGENERATE_IGENOMES } from '../../../modules/local/star_genomegenerate_igenomes'

workflow PREPARE_GENOME {
take:
Expand Down
107 changes: 107 additions & 0 deletions subworkflows/local/prepare_genome/module.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@

withName: 'GUNZIP_.*|MAKE_TRANSCRIPTS_FASTA' {
publishDir = [
path: "${params.outdir}/genome",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: params.save_reference
]
}

withName: 'UNTAR_.*' {
ext.args2 = '--no-same-owner'
}

withName: 'UNTAR_.*|STAR_GENOMEGENERATE|STAR_GENOMEGENERATE_IGENOMES|HISAT2_BUILD' {
publishDir = [
path: "${params.outdir}/genome/index",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: params.save_reference
]
}

withName: 'GFFREAD' {
ext.args = '--keep-exon-attrs -F -T'
publishDir = [
path: "${params.outdir}/genome",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: params.save_reference
]
}

withName: 'HISAT2_EXTRACTSPLICESITES' {
publishDir = [
path: "${params.outdir}/genome/index",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: params.save_reference
]
}

withName: 'SALMON_INDEX' {
ext.args = params.gencode ? '--gencode' : ''
publishDir = [
path: "${params.outdir}/genome/index",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: params.save_reference
]
}

withName: 'RSEM_PREPAREREFERENCE_GENOME' {
ext.args = '--star'
publishDir = [
path: "${params.outdir}/genome/index",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: params.save_reference
]
}

withName: 'GTF2BED' {
publishDir = [
path: "${params.outdir}/genome",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: params.save_reference
]
}

withName: 'CAT_ADDITIONAL_FASTA|PREPROCESS_TRANSCRIPTS_FASTA_GENCODE' {
publishDir = [
path: "${params.outdir}/genome",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: params.save_reference
]
}

withName: 'GTF_GENE_FILTER' {
publishDir = [
path: "${params.outdir}/genome",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: params.save_reference
]
}

withName: 'CUSTOM_GETCHROMSIZES' {
publishDir = [
path: "${params.outdir}/genome",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: params.save_reference
]
}

withName: 'BBMAP_BBSPLIT' {
ext.args = 'build=1'
publishDir = [
path: "${params.outdir}/genome/index",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: params.save_reference
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Gene/transcript quantification with RSEM
//

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

workflow QUANTIFY_RSEM {
take:
Expand Down
36 changes: 36 additions & 0 deletions subworkflows/local/quantify_rsem/module.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

withName: 'RSEM_CALCULATEEXPRESSION' {
ext.args = [
'--star',
'--star-output-genome-bam',
'--star-gzipped-read-file',
'--estimate-rspd',
'--seed 1'
].join(' ').trim()
publishDir = [
[
path: "${params.outdir}/${params.aligner}",
mode: params.publish_dir_mode,
pattern: "*.{stat,results}"
],
[
path: "${params.outdir}/${params.aligner}",
mode: params.publish_dir_mode,
pattern: "*.bam",
enabled: params.save_align_intermeds
],
[
path: "${params.outdir}/${params.aligner}/log",
mode: params.publish_dir_mode,
pattern: "*.log"
]
]
}

withName: 'RSEM_MERGE_COUNTS' {
publishDir = [
path: "${params.outdir}/${params.aligner}",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// Pseudo-alignment and quantification with Salmon
//

include { SALMON_QUANT } from '../../modules/nf-core/salmon/quant/main'
include { SALMON_TX2GENE } from '../../modules/local/salmon_tx2gene'
include { SALMON_TXIMPORT } from '../../modules/local/salmon_tximport'

include { SALMON_SUMMARIZEDEXPERIMENT as SALMON_SE_GENE } from '../../modules/local/salmon_summarizedexperiment'
include { SALMON_SUMMARIZEDEXPERIMENT as SALMON_SE_GENE_LENGTH_SCALED } from '../../modules/local/salmon_summarizedexperiment'
include { SALMON_SUMMARIZEDEXPERIMENT as SALMON_SE_GENE_SCALED } from '../../modules/local/salmon_summarizedexperiment'
include { SALMON_SUMMARIZEDEXPERIMENT as SALMON_SE_TRANSCRIPT } from '../../modules/local/salmon_summarizedexperiment'
include { SALMON_QUANT } from '../../../modules/nf-core/salmon/quant/main'
include { SALMON_TX2GENE } from '../../../modules/local/salmon_tx2gene'
include { SALMON_TXIMPORT } from '../../../modules/local/salmon_tximport'

include { SALMON_SUMMARIZEDEXPERIMENT as SALMON_SE_GENE } from '../../../modules/local/salmon_summarizedexperiment'
include { SALMON_SUMMARIZEDEXPERIMENT as SALMON_SE_GENE_LENGTH_SCALED } from '../../../modules/local/salmon_summarizedexperiment'
include { SALMON_SUMMARIZEDEXPERIMENT as SALMON_SE_GENE_SCALED } from '../../../modules/local/salmon_summarizedexperiment'
include { SALMON_SUMMARIZEDEXPERIMENT as SALMON_SE_TRANSCRIPT } from '../../../modules/local/salmon_summarizedexperiment'

workflow QUANTIFY_SALMON {
take:
Expand Down
33 changes: 33 additions & 0 deletions subworkflows/local/quantify_salmon/module.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

withName: 'SALMON_QUANT' {
ext.args = params.extra_salmon_quant_args ?: ''
publishDir = [
path: "${params.outdir}/${params.pseudo_aligner}",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('_meta_info.json') ? null : filename }
]
}

withName: 'SALMON_TX2GENE' {
publishDir = [
path: "${params.outdir}/${params.pseudo_aligner}",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'SALMON_TXIMPORT' {
publishDir = [
path: "${params.outdir}/${params.pseudo_aligner}",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'SALMON_SE_.*' {
publishDir = [
path: "${params.outdir}/${params.pseudo_aligner}",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
36 changes: 36 additions & 0 deletions subworkflows/nf-core/bam_markduplicates_picard/module.config

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b422c87

Please sign in to comment.