Skip to content

Commit

Permalink
Handling extraexons
Browse files Browse the repository at this point in the history
  • Loading branch information
toniher committed Nov 27, 2024
1 parent 3a991bf commit 3dcc801
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
3 changes: 1 addition & 2 deletions modules/local/exorthist/generate_annotations.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ process GENERATE_ANNOTATIONS {
label 'publish'

input:
tuple val(genomeid), path(genome), path(annotation)
path extraexons
tuple val(genomeid), path(genome), path(annotation), path(extraexons)

output:
tuple val(genomeid), path("${genomeid}"), emit: idfolders
Expand Down
2 changes: 1 addition & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"extraexons": {
"type": "string",
"description": "Extra exons (e.g. from VastDB)",
"format": "file-path"
"format": "file-path-pattern"
},
"bonafide_pairs": {
"type": "string",
Expand Down
14 changes: 10 additions & 4 deletions subworkflows/local/exorthist/prepare.nf
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,20 @@ workflow PREPARE {

// We join channels. If no extraexons, then it's empty, so no problem
data_to_annotation = genomes.join(annotations)
// TODO: To check what's goiing on here - check extraexons_ch
// data_to_annotation = data_to_annotation.join(extraexons_ch, remainder: true)

// print("EXTRAEXONS")

if (extraexons) {
GENERATE_ANNOTATIONS(data_to_annotation, extraexons_ch)
data_to_annotation = data_to_annotation.join(extraexons_ch, remainder: true)
// data_to_annotation.view()
GENERATE_ANNOTATIONS(data_to_annotation)
} else {
// Sic: https://nextflow-io.github.io/patterns/optional-input/
GENERATE_ANNOTATIONS(data_to_annotation, Channel.fromPath("/path/to/NO_FILE").collect())
data_to_annotation.map { entry ->
entry.add(['/path/to/NO_FILE'])
}
data_to_annotation.view()
GENERATE_ANNOTATIONS(data_to_annotation)
}

clusters_split_ch = GENERATE_ANNOTATIONS.out.idfolders.toList().map{ [it, it].combinations().findAll{ a, b -> a[0] < b[0]} }
Expand Down

0 comments on commit 3dcc801

Please sign in to comment.