Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#35](https://github.com/qbic-pipelines/vcftomaf/pull/35) - Template update to 3.2.0 (@famosab)
- [#37](https://github.com/qbic-pipelines/vcftomaf/pull/37) - Template update to 3.2.1 (@famosab)
- [#38](https://github.com/qbic-pipelines/vcftomaf/pull/38) - Template update to 3.5.1 (@famosab)
- [#39](https://github.com/qbic-pipelines/vcftomaf/pull/39) - Update all modules (@famosab)

### `Dependencies`

| Dependency | Old version | New version |
| ---------- | ----------- | ----------- |
| MultiQC | 1.25.1 | 1.32 |
| Dependency. | Old version | New version |
| -------------- | ----------- | ----------- |
| BCFtools | 1.20 | 1.22 |
| Gunzip | 1.1 | 1.13 |
| MultiQC | 1.25.1 | 1.33 |
| Picard | 3.3.0 | 3.4.0 |
| Tabix (HTSlib) | 1.20 | 1.21 |

### `Deprecated`

Expand Down
44 changes: 22 additions & 22 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

process {

cpus = { 1 * task.attempt }
memory = { 6.GB * task.attempt }
time = { 4.h * task.attempt }
cpus = { 1 * task.attempt }
memory = { 6.GB * task.attempt }
time = { 4.h * task.attempt }

errorStrategy = { task.exitStatus in ((130..145) + 104 + 175) ? 'retry' : 'finish' }
maxRetries = 1
Expand All @@ -23,43 +23,43 @@ process {
// These labels are used and recognised by default in DSL2 files hosted on nf-core/modules.
// If possible, it would be nice to keep the same label naming convention when
// adding in your local modules too.
withLabel:error_ignore {
withLabel: error_ignore {
errorStrategy = 'ignore'
}
withLabel:error_retry {
withLabel: error_retry {
errorStrategy = 'retry'
maxRetries = 2
}
withLabel:process_single {
cpus = { 1 }
withLabel: process_single {
cpus = { 1 }
memory = { 6.GB * task.attempt }
time = { 4.h * task.attempt }
time = { 4.h * task.attempt }
}
withLabel:process_low {
cpus = { 2 * task.attempt }
withLabel: process_low {
cpus = { 2 * task.attempt }
memory = { 12.GB * task.attempt }
time = { 4.h * task.attempt }
time = { 4.h * task.attempt }
}
withLabel:process_medium {
cpus = { 6 * task.attempt }
withLabel: process_medium {
cpus = { 6 * task.attempt }
memory = { 36.GB * task.attempt }
time = { 8.h * task.attempt }
time = { 8.h * task.attempt }
}
withLabel:process_high {
cpus = { 12 * task.attempt }
withLabel: process_high {
cpus = { 12 * task.attempt }
memory = { 72.GB * task.attempt }
time = { 16.h * task.attempt }
time = { 16.h * task.attempt }
}
withLabel:process_long {
time = { 20.h * task.attempt }
withLabel: process_long {
time = { 20.h * task.attempt }
}
withLabel:process_high_memory {
withLabel: process_high_memory {
memory = { 200.GB * task.attempt }
}
withLabel:error_ignore {
withLabel: error_ignore {
errorStrategy = 'ignore'
}
withLabel:error_retry {
withLabel: error_retry {
errorStrategy = 'retry'
maxRetries = 2
}
Expand Down
478 changes: 239 additions & 239 deletions conf/igenomes.config

Large diffs are not rendered by default.

64 changes: 33 additions & 31 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@ process {
publishDir = [
path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
]

withName: BCFTOOLS_VIEW {
ext.args = { [ "",
params.filter ? "-f PASS": "",
"--output-type z"
].join(" ").trim() }
ext.args = {
[
"",
params.filter ? "-f PASS" : "",
"--output-type z",
].join(" ").trim()
}
}

withName: GUNZIP {
publishDir = [
//specify to avoid publishing, overwritten otherwise
publishDir = [
enabled: false
]
}
Expand All @@ -37,61 +39,61 @@ process {
[
path: { "${params.outdir}/liftover/lifted/" },
mode: params.publish_dir_mode,
pattern: "*.lifted.vcf.gz"
pattern: "*.lifted.vcf.gz",
],
[
path: { "${params.outdir}/liftover/unlifted/" },
mode: params.publish_dir_mode,
pattern: "*.unlifted.vcf.gz"
pattern: "*.unlifted.vcf.gz",
],
[
path: { "${params.outdir}/liftover/logs/" },
mode: params.publish_dir_mode,
pattern: "*.log"
]
pattern: "*.log",
],
]
}

withName: TABIX_TABIX {
publishDir = [
//specify to avoid publishing, overwritten otherwise
publishDir = [
enabled: false
]
}

withName: UNTAR {
publishDir = [
//specify to avoid publishing, overwritten otherwise
publishDir = [
enabled: false
]
}

withName: VCF2MAF {
ext.args = { [ "",
params.run_vep ? "" : "--inhibit-vep",
meta.normal_id ? "--normal-id ${meta.normal_id} --vcf-normal-id ${meta.vcf_normal_id}" : "",
meta.tumor_id ? "--tumor-id ${meta.tumor_id} --vcf-tumor-id ${meta.vcf_tumor_id}" : "",
"--retain-fmt AD,AF,DP,GQ,GT,STR",
"--retain-info AS_FilterStatus,AS_SB_TABLE,DP,MBQ,POPAF,STR,ANN,LOF,NMD",
"--retain-ann Allele,Consequence,IMPACT,SYMBOL,Gene,Feature_type,Feature,BIOTYPE,EXON,INTRON,HGVSc,HGVSp,CDNA_position,CDS_position,Protein_position,Amino_acids,Codons,Existing_variation,DISTANCE,STRAND,FLAGS,VARIANT_CLASS,SYMBOL_SOURCE,HGNC_ID,CANONICAL,MANE,MANE_SELECT,MANE_PLUS_CLINICAL,TSL,APPRIS,CCDS,ENSP,SWISSPROT,TREMBL,UNIPARC,UNIPROT_ISOFORM,GENE_PHENO,SIFT,PolyPhen,DOMAINS,miRNA,AF,AFR_AF,AMR_AF,EAS_AF,EUR_AF,SAS_AF,gnomADe_AF,gnomADe_AFR_AF,gnomADe_AMR_AF,gnomADe_ASJ_AF,gnomADe_EAS_AF,gnomADe_FIN_AF,gnomADe_MID_AF,gnomADe_NFE_AF,gnomADe_REMAINING_AF,gnomADe_SAS_AF,gnomADg_AF,gnomADg_AFR_AF,gnomADg_AMI_AF,gnomADg_AMR_AF,gnomADg_ASJ_AFIgnomADg_EAS_AF,gnomADg_FIN_AF,gnomADg_MID_AF,gnomADg_NFE_AF,gnomADg_REMAINING_AF,gnomADg_SAS_AF,gnomADg_EAS_AF_POPS,FREQS,CLIN_SIG,SOMATIC,PHENO,PUBMED,MOTIF_NAME,MOTIF_POS,HIGH_INF_POS,MOTIF_SCORE_CHANGE,TRANSCRIPTION_FACTORS",
"--any-allele",
"--ncbi-build ${params.genome.tokenize('.')[-1]}",
"--species homo_sapiens"
].join(" ").trim() }
ext.args = {
[
"",
params.run_vep ? "" : "--inhibit-vep",
meta.normal_id ? "--normal-id ${meta.normal_id} --vcf-normal-id ${meta.vcf_normal_id}" : "",
meta.tumor_id ? "--tumor-id ${meta.tumor_id} --vcf-tumor-id ${meta.vcf_tumor_id}" : "",
"--retain-fmt AD,AF,DP,GQ,GT,STR",
"--retain-info AS_FilterStatus,AS_SB_TABLE,DP,MBQ,POPAF,STR,ANN,LOF,NMD",
"--retain-ann Allele,Consequence,IMPACT,SYMBOL,Gene,Feature_type,Feature,BIOTYPE,EXON,INTRON,HGVSc,HGVSp,CDNA_position,CDS_position,Protein_position,Amino_acids,Codons,Existing_variation,DISTANCE,STRAND,FLAGS,VARIANT_CLASS,SYMBOL_SOURCE,HGNC_ID,CANONICAL,MANE,MANE_SELECT,MANE_PLUS_CLINICAL,TSL,APPRIS,CCDS,ENSP,SWISSPROT,TREMBL,UNIPARC,UNIPROT_ISOFORM,GENE_PHENO,SIFT,PolyPhen,DOMAINS,miRNA,AF,AFR_AF,AMR_AF,EAS_AF,EUR_AF,SAS_AF,gnomADe_AF,gnomADe_AFR_AF,gnomADe_AMR_AF,gnomADe_ASJ_AF,gnomADe_EAS_AF,gnomADe_FIN_AF,gnomADe_MID_AF,gnomADe_NFE_AF,gnomADe_REMAINING_AF,gnomADe_SAS_AF,gnomADg_AF,gnomADg_AFR_AF,gnomADg_AMI_AF,gnomADg_AMR_AF,gnomADg_ASJ_AFIgnomADg_EAS_AF,gnomADg_FIN_AF,gnomADg_MID_AF,gnomADg_NFE_AF,gnomADg_REMAINING_AF,gnomADg_SAS_AF,gnomADg_EAS_AF_POPS,FREQS,CLIN_SIG,SOMATIC,PHENO,PUBMED,MOTIF_NAME,MOTIF_POS,HIGH_INF_POS,MOTIF_SCORE_CHANGE,TRANSCRIPTION_FACTORS",
"--any-allele",
"--ncbi-build ${params.genome.tokenize('.')[-1]}",
"--species homo_sapiens",
].join(" ").trim()
}
publishDir = [
path: { "${params.outdir}/maf" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
]
}

withName: 'MULTIQC' {
ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' }
withName: MULTIQC {
ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : '' }
publishDir = [
path: { "${params.outdir}/multiqc" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
]
}

}
13 changes: 6 additions & 7 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ process {
resourceLimits = [
cpus: 4,
memory: '15.GB',
time: '1.h'
time: '1.h',
]
}

Expand All @@ -23,10 +23,9 @@ params {
config_profile_description = 'Minimal test dataset to check pipeline function'

// Input data
input = "${projectDir}/tests/samplesheets/samplesheet.csv"
fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.fasta'
intervals = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.bed'
genome = 'GATK.GRCh38'
filter = false

input = "${projectDir}/tests/samplesheets/samplesheet.csv"
fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.fasta'
intervals = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.bed'
genome = 'GATK.GRCh38'
filter = false
}
111 changes: 48 additions & 63 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,46 @@ include { VCFTOMAF } from './workflows/vcftomaf'
include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_nfcore_vcftomaf_pipeline'
include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_vcftomaf_pipeline'
include { getGenomeAttribute } from './subworkflows/local/utils_nfcore_vcftomaf_pipeline'
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RUN MAIN WORKFLOW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

workflow {
//
// SUBWORKFLOW: Run initialisation tasks
//
PIPELINE_INITIALISATION(
params.version,
params.validate_params,
params.monochrome_logs,
args,
params.outdir,
params.input,
params.help,
params.help_full,
params.show_hidden,
)

//
// WORKFLOW: Run main workflow
//
QBICPIPELINES_VCFTOMAF(
PIPELINE_INITIALISATION.out.samplesheet
)

//
PIPELINE_COMPLETION(
params.email,
params.email_on_fail,
params.plaintext_email,
params.outdir,
params.monochrome_logs,
params.hook_url,
QBICPIPELINES_VCFTOMAF.out.multiqc_report,
)
}

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -28,97 +68,42 @@ include { getGenomeAttribute } from './subworkflows/local/utils_nfcore_vcft
// WORKFLOW: Run main analysis pipeline depending on type of input
//
workflow QBICPIPELINES_VCFTOMAF {

take:
samplesheet // channel: samplesheet read in from --input

main:

//
// SET PARAMETERS
//
params.fasta = getGenomeAttribute('fasta')
params.dict = getGenomeAttribute('dict')

// Extra files
intervals = params.intervals ? Channel.fromPath(params.intervals).collect() : Channel.value([])
liftover_chain = params.liftover_chain ? Channel.fromPath(params.liftover_chain).collect() : Channel.value([])
intervals = params.intervals ? channel.fromPath(params.intervals).collect() : channel.value([])
liftover_chain = params.liftover_chain ? channel.fromPath(params.liftover_chain).collect() : channel.value([])

// FASTA
fasta = params.fasta ? Channel.fromPath(params.fasta).collect() : Channel.value([])
dict = params.dict ? Channel.fromPath(params.dict).collect() : Channel.empty()

// Genome version
genome = params.genome ?: Channel.empty()
fasta = params.fasta ? channel.fromPath(params.fasta).collect() : channel.value([])
dict = params.dict ? channel.fromPath(params.dict).collect() : channel.empty()

// VEP cache
vep_cache = params.vep_cache ? Channel.fromPath(params.vep_cache).collect() : Channel.value([])
vep_cache_unpacked = Channel.value([])

vep_cache = params.vep_cache ? channel.fromPath(params.vep_cache).collect() : channel.value([])
vep_cache_unpacked = channel.value([])

//
// WORKFLOW: Run pipeline
//

VCFTOMAF (
VCFTOMAF(
samplesheet,
intervals,
fasta,
dict,
liftover_chain,
genome,
vep_cache,
vep_cache_unpacked
vep_cache_unpacked,
)

emit:
multiqc_report = VCFTOMAF.out.multiqc_report // channel: /path/to/multiqc_report.html
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RUN MAIN WORKFLOW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

workflow {

main:
//
// SUBWORKFLOW: Run initialisation tasks
//
PIPELINE_INITIALISATION (
params.version,
params.validate_params,
params.monochrome_logs,
args,
params.outdir,
params.input,
params.help,
params.help_full,
params.show_hidden
)

//
// WORKFLOW: Run main workflow
//
QBICPIPELINES_VCFTOMAF (
PIPELINE_INITIALISATION.out.samplesheet
)

//
PIPELINE_COMPLETION (
params.email,
params.email_on_fail,
params.plaintext_email,
params.outdir,
params.monochrome_logs,
params.hook_url,
QBICPIPELINES_VCFTOMAF.out.multiqc_report
)
}

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THE END
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
Loading