Skip to content
Draft
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
6 changes: 6 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@
"fa_icon": "far fa-file-code",
"description": "Path to arriba output"
},
"ctatsplicing_ref": {
"type": "string",
"format": "directory-path",
"fa_icon": "far fa-file-code",
"description": "Path to ctatsplicing references"
},
"download_refs": {
"type": "boolean",
"fa_icon": "far fa-file-code",
Expand Down
24 changes: 11 additions & 13 deletions subworkflows/local/build_references/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ workflow BUILD_REFERENCES {

def ch_starfusion_ref = Channel.empty()
if (tools.intersect(["starfusion", "ctatsplicing", "fusioninspector"])) {
if (!exists_not_empty(params.starfusion_ref)) {
if (exists_not_empty(params.starfusion_ref)) {
ch_starfusion_ref = Channel.fromPath(params.starfusion_ref).map { it -> [[id:it.name], it] }
}
else {
if(!params.fusion_annot_lib) {
error("Expected --fusion_annot_lib to be specified when using StarFusion or any tools that depend on it")
}
Expand Down Expand Up @@ -178,19 +181,14 @@ workflow BUILD_REFERENCES {

STARFUSION_BUILD(ch_fasta, ch_gtf, params.fusion_annot_lib, params.species, pfam_file, dfam_urls_ch, params.annot_filter_url)
ch_versions = ch_versions.mix(STARFUSION_BUILD.out.versions)
if (tools.contains("ctatsplicing")) {
CTATSPLICING_PREPGENOMELIB(
STARFUSION_BUILD.out.reference,
params.ctatsplicing_cancer_introns
)
ch_versions = ch_versions.mix(CTATSPLICING_PREPGENOMELIB.out.versions)
ch_starfusion_ref = CTATSPLICING_PREPGENOMELIB.out.reference
} else {
ch_starfusion_ref = STARFUSION_BUILD.out.reference
}
}
else {
ch_starfusion_ref = Channel.fromPath(params.starfusion_ref).map { it -> [[id:it.name], it] }
if (tools.contains("ctatsplicing") && !exists_not_empty(params.ctatsplicing_ref)) {
CTATSPLICING_PREPGENOMELIB(
ch_starfusion_ref,
params.ctatsplicing_cancer_introns
)
ch_versions = ch_versions.mix(CTATSPLICING_PREPGENOMELIB.out.versions)
ch_starfusion_ref = CTATSPLICING_PREPGENOMELIB.out.reference
}
}

Expand Down
Loading