Skip to content
Closed
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
39 changes: 39 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@ process {
time = { 10.m + (1.ms * reads.sum { it.size() } / reads.count { it } / 1000) * task.attempt }
}

withName: FUSIONINSPECTOR {
cpus = { 12 }
memory = { 40.GB * task.attempt }
time = { 4.h * task.attempt }


ext.args = { params.fusioninspector_limitSjdbInsertNsj != 1000000 ? "--STAR_xtra_params \"--limitSjdbInsertNsj ${params.fusioninspector_limitSjdbInsertNsj}\"" : '' }
ext.args2 = '--annotate --examine_coding_effect'
publishDir = [
path: { "${params.outdir}/fusions/fusioninspector/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}


withName: MULTIQC {
clusterOptions = "${params.cluster_options}"
ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : "--title \"${params.analysis_id}\"" }
Expand Down Expand Up @@ -230,6 +246,7 @@ process {
}
withName: FUSIONREPORT_DETECT {
ext.args = {'--no-cosmic'}
ext.args2 = "--export csv"

publishDir = [
path: { "${params.outdir}/fusions/fusion_report/${meta.id}/" },
Expand Down Expand Up @@ -395,4 +412,26 @@ process {
]
}


withName: HGNC_DOWNLOAD {
cpus = 1
memory = { 1.GB }
time = { 5.m * task.attempt }
}

withName: VCF_COLLECT {
cpus = 2
memory = { 5.GB }
time = { 10.m * task.attempt }

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


}
10 changes: 10 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"https://github.com/nf-core/modules.git": {
"modules": {
"nf-core": {
"agat/convertspgff2tsv": {
"branch": "master",
"git_sha": "55ed5f4aabcdcd7a4cc44e1700f956756c7e8532",
"installed_by": ["modules"]
},
"arriba/arriba": {
"branch": "master",
"git_sha": "025a6f75e1f72e4ab60abb4bd65b3f289d4ad910",
Expand All @@ -15,6 +20,11 @@
"git_sha": "dc94b6ee04a05ddb9f7ae050712ff30a13149164",
"installed_by": ["modules"]
},
"fusioninspector": {
"branch": "master",
"git_sha": "310a7a59c7f2362d25070e5928f3139f92377eaf",
"installed_by": ["modules"]
},
"fusionreport/detect": {
"branch": "master",
"git_sha": "e753770db613ce014b3c4bc94f6cba443427b726",
Expand Down
38 changes: 38 additions & 0 deletions modules/local/hgnc_download/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
process HGNC_DOWNLOAD {
tag "hgnc"
label 'process_low'

conda "bioconda::gnu-wget=1.18"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/3b/3b54fa9135194c72a18d00db6b399c03248103f87e43ca75e4b50d61179994b3/data' :
'community.wave.seqera.io/library/wget:1.21.4--8b0fcde81c17be5e' }"

output:
path "hgnc_complete_set.txt" , emit: hgnc_ref
path "HGNC-DB-timestamp.txt" , emit: hgnc_date
path "versions.yml" , emit: versions


script:
"""
wget --no-check-certificate https://storage.googleapis.com/public-download-files/hgnc/tsv/tsv/hgnc_complete_set.txt
date +%Y-%m-%d/%H:%M > HGNC-DB-timestamp.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
wget: \$(wget --version | head -1 | cut -d ' ' -f 3)
END_VERSIONS
"""

stub:
"""
touch "hgnc_complete_set.txt"
touch "HGNC-DB-timestamp.txt"

cat <<-END_VERSIONS > versions.yml
"${task.process}":
wget: \$(wget --version | head -1 | cut -d ' ' -f 3)
END_VERSIONS
"""

}
46 changes: 46 additions & 0 deletions modules/local/vcf_collect/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
process VCF_COLLECT {
tag "$meta.id"
label 'process_single'

conda "conda-forge::pandas=1.5.2"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pandas:1.5.2' :
'biocontainers/pandas:1.5.2' }"

input:
tuple val(meta), path(fusioninspector_tsv), path(fusioninspector_gtf_tsv), path(fusionreport_report), path(fusionreport_csv)
tuple val(meta2), path(hgnc_ref)
tuple val(meta3), path(hgnc_date)

output:
path "versions.yml" , emit: versions
tuple val(meta), path("*vcf") , emit: vcf

when:
task.ext.when == null || task.ext.when

script:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
vcf_collect.py --fusioninspector $fusioninspector_tsv --fusionreport $fusionreport_report --fusioninspector_gtf $fusioninspector_gtf_tsv --fusionreport_csv $fusionreport_csv --hgnc $hgnc_ref --sample ${prefix} --out ${prefix}_fusion_data.vcf

cat <<-END_VERSIONS > versions.yml
"${task.process}":
python: \$(python --version | sed 's/Python //g')
vcf_collect: 0.1
HGNC DB retrieval: \$(cat $hgnc_date)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_fusion_data.vcf

cat <<-END_VERSIONS > versions.yml
"${task.process}":
python: \$(python --version | sed 's/Python //g')
vcf_collect: 0.1
END_VERSIONS
"""
}
Loading