Skip to content

Commit

Permalink
Move circeplorer reference creation to shared location
Browse files Browse the repository at this point in the history
  • Loading branch information
nictru committed Jan 19, 2025
1 parent b1930f5 commit bab9e00
Show file tree
Hide file tree
Showing 14 changed files with 299 additions and 92 deletions.
18 changes: 18 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ process {
]
}

withName: UCSC_GTFTOGENEPRED {
publishDir = [
path: { "${params.outdir}/references/genome/genepred" },
mode: params.publish_dir_mode,
saveAs: { filename -> ( filename != 'versions.yml' && params.save_reference ) ? filename : null }
]
}

withName: SEQKIT_SPLIT {
ext.args = "-i --by-id-prefix \"\""
publishDir = [
Expand Down Expand Up @@ -157,6 +165,16 @@ process {
]
}

withName: CIRCEXPLORER2_REFERENCE {
ext.args = "-v OFS='\\t' '{print \$12, \$1, \$2, \$3, \$4, \$5, \$6, \$7, \$8, \$9, \$10}'"
ext.suffix = "circexplorer2.txt"
publishDir = [
path: { "${params.outdir}/references/index" },
mode: params.publish_dir_mode,
saveAs: { filename -> ( filename != 'versions.yml' && params.save_reference ) ? filename : null }
]
}

// circRNA

withName: '.*:SEGEMEHL:INDEX' {
Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@
"branch": "master",
"git_sha": "5d095e8413da1f4c72b7d07ce87f75c09482486f",
"installed_by": ["modules"]
},
"ucsc/gtftogenepred": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
}
}
},
Expand Down
38 changes: 0 additions & 38 deletions modules/local/circexplorer2/reference/main.nf

This file was deleted.

5 changes: 5 additions & 0 deletions modules/nf-core/ucsc/gtftogenepred/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions modules/nf-core/ucsc/gtftogenepred/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions modules/nf-core/ucsc/gtftogenepred/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions modules/nf-core/ucsc/gtftogenepred/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions modules/nf-core/ucsc/gtftogenepred/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions modules/nf-core/ucsc/gtftogenepred/tests/nextflow.config

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions subworkflows/local/bsj_detection.nf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ workflow BSJ_DETECTION {
chromosomes
hisat2_index
star_index
circexplorer2_index
bsj_reads

main:
Expand Down Expand Up @@ -70,7 +71,7 @@ workflow BSJ_DETECTION {
}

if (tools_selected.contains('circexplorer2')) {
CIRCEXPLORER2( gtf, fasta, STAR2PASS.out.junction )
CIRCEXPLORER2( fasta, STAR2PASS.out.junction, circexplorer2_index )
ch_versions = ch_versions.mix(CIRCEXPLORER2.out.versions)
ch_bsj_bed_per_sample_tool = ch_bsj_bed_per_sample_tool.mix(CIRCEXPLORER2.out.bed)
}
Expand Down Expand Up @@ -103,7 +104,7 @@ workflow BSJ_DETECTION {

if (tools_selected.contains('mapsplice')) {
MAPSPLICE( reads, gtf, fasta, bowtie_index, chromosomes,
STAR2PASS.out.junction )
STAR2PASS.out.junction, circexplorer2_index )
ch_versions = ch_versions.mix(MAPSPLICE.out.versions)
ch_bsj_bed_per_sample_tool = ch_bsj_bed_per_sample_tool.mix(MAPSPLICE.out.bed)
}
Expand Down
14 changes: 6 additions & 8 deletions subworkflows/local/detection_tools/circexplorer2.nf
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
include { CIRCEXPLORER2_REFERENCE as REFERENCE } from '../../../modules/local/circexplorer2/reference'
include { CIRCEXPLORER2_PARSE as PARSE } from '../../../modules/nf-core/circexplorer2/parse'
include { CIRCEXPLORER2_ANNOTATE as ANNOTATE } from '../../../modules/nf-core/circexplorer2/annotate'
include { GAWK as UNIFY } from '../../../modules/nf-core/gawk'

workflow CIRCEXPLORER2 {
take:
gtf
fasta
star_junctions
circexplorer2_index

main:
ch_versions = Channel.empty()

REFERENCE( gtf )
PARSE( star_junctions )
ANNOTATE( PARSE.out.junction, fasta, REFERENCE.out.txt )
UNIFY( ANNOTATE.out.txt
.map{ meta, txt -> [ meta + [tool: "circexplorer2"], txt ] }, [] )

ch_versions = ch_versions.mix(REFERENCE.out.versions)
ch_versions = ch_versions.mix(PARSE.out.versions)

ANNOTATE( PARSE.out.junction, fasta, circexplorer2_index )
ch_versions = ch_versions.mix(ANNOTATE.out.versions)

UNIFY( ANNOTATE.out.txt
.map{ meta, txt -> [ meta + [tool: "circexplorer2"], txt ] }, [] )
ch_versions = ch_versions.mix(UNIFY.out.versions)

emit:
Expand Down
6 changes: 2 additions & 4 deletions subworkflows/local/detection_tools/mapsplice.nf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include { CIRCEXPLORER2_REFERENCE as REFERENCE } from '../../../modules/local/circexplorer2/reference'
include { MAPSPLICE_ALIGN as ALIGN } from '../../../modules/local/mapsplice/align'
include { CIRCEXPLORER2_PARSE as PARSE } from '../../../modules/nf-core/circexplorer2/parse'
include { CIRCEXPLORER2_ANNOTATE as ANNOTATE } from '../../../modules/nf-core/circexplorer2/annotate'
Expand All @@ -12,18 +11,17 @@ workflow MAPSPLICE {
bowtie_index
chromosomes
star_junctions
circexplorer2_index

main:
ch_versions = Channel.empty()

REFERENCE( gtf )
ALIGN( reads, bowtie_index, chromosomes, gtf )
PARSE( ALIGN.out.raw_fusions )
ANNOTATE( PARSE.out.junction, fasta, REFERENCE.out.txt )
ANNOTATE( PARSE.out.junction, fasta, circexplorer2_index )
UNIFY( ANNOTATE.out.txt.map{ meta, txt ->
[ meta + [tool: "mapsplice"], txt ] }, [] )

ch_versions = ch_versions.mix(REFERENCE.out.versions)
ch_versions = ch_versions.mix(ALIGN.out.versions)
ch_versions = ch_versions.mix(PARSE.out.versions)
ch_versions = ch_versions.mix(ANNOTATE.out.versions)
Expand Down
Loading

0 comments on commit bab9e00

Please sign in to comment.