Skip to content

Commit

Permalink
Merge pull request #1 from mahesh-panchal/use_publishDir_nofunctions
Browse files Browse the repository at this point in the history
Use publish dir but with no functions.nf
  • Loading branch information
mahesh-panchal authored Oct 12, 2021
2 parents 35908e6 + 553705c commit a06315a
Show file tree
Hide file tree
Showing 57 changed files with 132 additions and 315 deletions.
36 changes: 18 additions & 18 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
process {

publishDir = [
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
Expand All @@ -22,7 +22,7 @@ process {
withName: BEDTOOLS_GENOMECOV {
ext.args = '-split -du'
publishDir = [
path: { "${params.outdir}/${getSoftwareName(task.process)}/${meta.id}" },
path: { "${params.outdir}/bedtools/${meta.id}" },
enabled: false
]
}
Expand Down Expand Up @@ -108,7 +108,7 @@ process {
ext.args = params.multiqc_title ? "--title \"$params.multiqc_title\"" : ''
publishDir = [
path: { [
"${params.outdir}/${getSoftwareName(task.process)}",
"${params.outdir}/multiqc",
params.skip_alignment? '' : "/${params.aligner}"
].join('') },
mode: params.publish_dir_mode,
Expand All @@ -124,13 +124,13 @@ process {
}
withName: MULTIQC_TSV_FAIL_MAPPED {
publishDir = [
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/multiqc" },
enabled: false
]
}
withName: MULTIQC_TSV_STRAND_CHECK {
publishDir = [
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/multiqc" },
enabled: false
]
}
Expand Down Expand Up @@ -180,7 +180,7 @@ process {
}
withName: HISAT2_EXTRACTSPLICESITES {
publishDir = [
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/hisat2" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: params.save_reference
Expand Down Expand Up @@ -347,7 +347,7 @@ process {
// QUANTIFY_SALMON workflow
withName: '.*:QUANTIFY_SALMON:SALMON_QUANT' {
publishDir = [
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/salmon" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
Expand All @@ -362,21 +362,21 @@ process {
}
withName: '.*:QUANTIFY_SALMON:SALMON_TXIMPORT' {
publishDir = [
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/salmon" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: '.*:QUANTIFY_SALMON:SALMON_MERGE_COUNTS' {
publishDir = [
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/salmon" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: '.*:QUANTIFY_SALMON:SALMON_SE_.*' {
publishDir = [
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/salmon" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
Expand Down Expand Up @@ -411,7 +411,7 @@ process {
ext.args = '-n'
ext.suffix = '.umi_dedup.transcriptome'
publishDir = [
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/samtools" },
enabled: false
]
}
Expand Down Expand Up @@ -441,12 +441,12 @@ process {
ext.args = '--num_alignments 1 --fastx -v'
publishDir = [
[
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/sortmerna" },
mode: params.publish_dir_mode,
pattern: "*.log"
],
[
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/sortmerna" },
mode: params.publish_dir_mode,
pattern: "*.fastq.gz",
enabled: params.save_non_ribo_reads
Expand Down Expand Up @@ -488,12 +488,12 @@ process {
].join(' ').trim()
publishDir = [
[
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/umitools" },
mode: params.publish_dir_mode,
pattern: "*.log"
],
[
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/umitools" },
mode: params.publish_dir_mode,
pattern: "*.fastq.gz",
enabled: params.save_umi_intermeds
Expand All @@ -507,18 +507,18 @@ process {
].join(' ').trim()
publishDir = [
[
path: { "${params.outdir}/${getSoftwareName(task.process)}/fastqc" },
path: { "${params.outdir}/trimgalore/fastqc" },
mode: params.publish_dir_mode,
pattern: "*.{html,zip}"
],
[
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/trimgalore" },
mode: params.publish_dir_mode,
pattern: "*.fq.gz",
enabled: params.save_trimmed
],
[
path: { "${params.outdir}/${getSoftwareName(task.process)}" },
path: { "${params.outdir}/trimgalore" },
mode: params.publish_dir_mode,
pattern: "*.txt"
]
Expand Down
18 changes: 0 additions & 18 deletions lib/functions.nf

This file was deleted.

7 changes: 2 additions & 5 deletions modules/local/bedtools_genomecov.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import generic module functions
include { getSoftwareName; getProcessName } from "$projectDir/lib/functions"

process BEDTOOLS_GENOMECOV {
tag "$meta.id"
label 'process_medium'
Expand Down Expand Up @@ -48,8 +45,8 @@ process BEDTOOLS_GENOMECOV {
| bedtools sort > ${prefix_reverse}.bedGraph
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(bedtools --version | sed -e "s/bedtools v//g")
BEDTOOLS_GENOMECOV:
bedtools: \$(bedtools --version | sed -e "s/bedtools v//g")
END_VERSIONS
"""
}
5 changes: 1 addition & 4 deletions modules/local/cat_additional_fasta.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import generic module functions
include { getSoftwareName; getProcessName } from "$projectDir/lib/functions"

process CAT_ADDITIONAL_FASTA {
tag "$add_fasta"

Expand Down Expand Up @@ -37,7 +34,7 @@ process CAT_ADDITIONAL_FASTA {
cat $gtf ${add_fasta.baseName}.gtf > ${name}.gtf
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
CAT_ADDITIONAL_FASTA:
python: \$(python --version | sed 's/Python //g')
END_VERSIONS
"""
Expand Down
5 changes: 1 addition & 4 deletions modules/local/deseq2_qc.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import generic module functions
include { getSoftwareName; getProcessName } from "$projectDir/lib/functions"

params.multiqc_label = ''

process DESEQ2_QC {
Expand Down Expand Up @@ -53,7 +50,7 @@ process DESEQ2_QC {
fi
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
DESEQ2_QC:
r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//')
bioconductor-deseq2: \$(Rscript -e "library(DESeq2); cat(as.character(packageVersion('DESeq2')))")
END_VERSIONS
Expand Down
5 changes: 1 addition & 4 deletions modules/local/dupradar.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import generic module functions
include { getSoftwareName; getProcessName } from "$projectDir/lib/functions"

process DUPRADAR {
tag "$meta.id"
label 'process_long'
Expand Down Expand Up @@ -42,7 +39,7 @@ process DUPRADAR {
$task.cpus
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
DUPRADAR:
r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//')
bioconductor-dupradar: \$(Rscript -e "library(dupRadar); cat(as.character(packageVersion('dupRadar')))")
END_VERSIONS
Expand Down
5 changes: 1 addition & 4 deletions modules/local/get_chrom_sizes.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import generic module functions
include { getSoftwareName; getProcessName } from "$projectDir/lib/functions"

process GET_CHROM_SIZES {
tag "$fasta"

Expand Down Expand Up @@ -28,7 +25,7 @@ process GET_CHROM_SIZES {
cut -f 1,2 ${fasta}.fai > ${fasta}.sizes
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
GET_CHROM_SIZES:
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
Expand Down
5 changes: 1 addition & 4 deletions modules/local/gtf2bed.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import generic module functions
include { getSoftwareName; getProcessName } from "$projectDir/lib/functions"

process GTF2BED {
tag "$gtf"
label 'process_low'
Expand All @@ -26,7 +23,7 @@ process GTF2BED {
> ${gtf.baseName}.bed
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
GTF2BED:
perl: \$(echo \$(perl --version 2>&1) | sed 's/.*v\\(.*\\)) built.*/\\1/')
END_VERSIONS
"""
Expand Down
5 changes: 1 addition & 4 deletions modules/local/gtf_gene_filter.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import generic module functions
include { getSoftwareName; getProcessName } from "$projectDir/lib/functions"

process GTF_GENE_FILTER {
tag "$fasta"

Expand All @@ -27,7 +24,7 @@ process GTF_GENE_FILTER {
-o ${fasta.baseName}_genes.gtf
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
GTF_GENE_FILTER:
python: \$(python --version | sed 's/Python //g')
END_VERSIONS
"""
Expand Down
7 changes: 2 additions & 5 deletions modules/local/multiqc.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import generic module functions
include { getSoftwareName; getProcessName } from "$projectDir/lib/functions"

process MULTIQC {
label 'process_medium'

Expand Down Expand Up @@ -63,8 +60,8 @@ process MULTIQC {
.
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$( multiqc --version | sed -e "s/multiqc, version //g" )
MULTIQC:
multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" )
END_VERSIONS
"""
}
5 changes: 1 addition & 4 deletions modules/local/multiqc_custom_biotype.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import generic module functions
include { getSoftwareName; getProcessName } from "$projectDir/lib/functions"

process MULTIQC_CUSTOM_BIOTYPE {
tag "$meta.id"

Expand Down Expand Up @@ -31,7 +28,7 @@ process MULTIQC_CUSTOM_BIOTYPE {
-o ${prefix}.biotype_counts_rrna_mqc.tsv
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
MULTIQC_CUSTOM_BIOTYPE:
python: \$(python --version | sed 's/Python //g')
END_VERSIONS
"""
Expand Down
3 changes: 0 additions & 3 deletions modules/local/multiqc_tsv_from_list.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import generic module functions
include { getSoftwareName; getProcessName } from "$projectDir/lib/functions"

process MULTIQC_TSV_FROM_LIST {

memory 100.MB
Expand Down
5 changes: 1 addition & 4 deletions modules/local/rsem_merge_counts.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import generic module functions
include { getSoftwareName; getProcessName } from "$projectDir/lib/functions"

process RSEM_MERGE_COUNTS {
label "process_medium"

Expand Down Expand Up @@ -50,7 +47,7 @@ process RSEM_MERGE_COUNTS {
paste transcript_ids.txt tmp/isoforms/*.tpm.txt > rsem.merged.transcript_tpm.tsv
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
RSEM_MERGE_COUNTS:
sed: \$(echo \$(sed --version 2>&1) | sed 's/^.*GNU sed) //; s/ .*\$//')
END_VERSIONS
"""
Expand Down
5 changes: 1 addition & 4 deletions modules/local/salmon_merge_counts.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import generic module functions
include { getSoftwareName; getProcessName } from "$projectDir/lib/functions"

process SALMON_MERGE_COUNTS {
label "process_medium"

Expand Down Expand Up @@ -90,7 +87,7 @@ process SALMON_MERGE_COUNTS {
paste transcript_ids.txt tmp/isoforms_tpm/* > salmon.merged.transcript_tpm.tsv
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
SALMON_MERGE_COUNTS:
sed: \$(echo \$(sed --version 2>&1) | sed 's/^.*GNU sed) //; s/ .*\$//')
END_VERSIONS
"""
Expand Down
5 changes: 1 addition & 4 deletions modules/local/salmon_summarizedexperiment.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import generic module functions
include { getSoftwareName; getProcessName } from "$projectDir/lib/functions"

process SALMON_SUMMARIZEDEXPERIMENT {
tag "$tx2gene"
label "process_medium"
Expand Down Expand Up @@ -29,7 +26,7 @@ process SALMON_SUMMARIZEDEXPERIMENT {
$tpm
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
SALMON_SUMMARIZEDEXPERIMENT:
r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//')
bioconductor-summarizedexperiment: \$(Rscript -e "library(SummarizedExperiment); cat(as.character(packageVersion('SummarizedExperiment')))")
END_VERSIONS
Expand Down
5 changes: 1 addition & 4 deletions modules/local/salmon_tx2gene.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Import generic module functions
include { getSoftwareName; getProcessName } from "$projectDir/lib/functions"

process SALMON_TX2GENE {
tag "$gtf"
label "process_low"
Expand Down Expand Up @@ -30,7 +27,7 @@ process SALMON_TX2GENE {
-o salmon_tx2gene.tsv
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
SALMON_TX2GENE:
python: \$(python --version | sed 's/Python //g')
END_VERSIONS
"""
Expand Down
Loading

0 comments on commit a06315a

Please sign in to comment.