Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
d6948f1
Add psirc indexing to genome preparation
nictru Apr 29, 2025
c04f690
Add basic psirc detection
nictru Apr 29, 2025
3dddc8a
Update CIRI implementation
nictru Apr 29, 2025
8b9b76a
Add CIRIAS
nictru Apr 29, 2025
00710b7
Add cirifull ro1 and ro2
nictru Apr 29, 2025
6f237b9
Implement read length trimming
nictru Apr 29, 2025
aa6b35a
Make CIRIfull RO1 work
nictru Apr 30, 2025
4ad6b67
Attempt CIRIfull Ro2 implementation
nictru May 1, 2025
051ee35
Improve CIRI implementation
nictru May 1, 2025
419f3f6
Implement PSIRC FLI detection
nictru May 1, 2025
6446bfe
Improve PSIRC FLI implementation
nictru May 1, 2025
296301a
Add trinity for JCCIRC
nictru May 1, 2025
8931df9
Add basic JCcirc implemenation
nictru May 1, 2025
cbf9d08
Implement jccirc prep
nictru May 3, 2025
fbdd0e8
Improve jccirc channel structure
nictru May 3, 2025
59d423c
Improve jccirc implementation
nictru May 3, 2025
bf18b65
Improve outdir definitions
nictru May 3, 2025
26f91ed
Improve FLI parameter treatment
nictru May 3, 2025
e0bbae3
Improve FLI parameter handling
nictru May 3, 2025
d3ee733
Improve CIRI implementation
nictru May 3, 2025
7d5610f
Fix some issues with annotation/bed2gtf
nictru May 16, 2025
e453fde
Implement psirc unification
nictru May 16, 2025
9c5a664
Another small bed2gtf fix
nictru May 16, 2025
1e1354d
Improve star2pass structure
nictru May 16, 2025
88b80c5
Fix circrna_finder caching issue
nictru May 17, 2025
2671e64
Remove circrna_finder unnecessary input
nictru May 17, 2025
bae91e5
Improve CIRI FLI implementation
nictru May 17, 2025
13cdd1a
Fix CIRI2 detection issues
nictru May 18, 2025
ec90fcd
Fix remaining CIRI compatibility issues
nictru May 18, 2025
edb0a8a
Improve CIRI outdir structure
nictru May 18, 2025
5006382
Implement CIRIfull merge
nictru May 18, 2025
aaba2f1
Improve CIRI output structure
nictru May 18, 2025
a8024e4
Implement CIRI-vis
nictru May 18, 2025
4b33bc6
Improve psirc implementation
nictru May 18, 2025
614ed56
Disable jccirc
nictru May 19, 2025
abe2c7d
Run CIRI-vis across all samples
nictru May 19, 2025
446456f
Implement separate FLI subworkflow
nictru May 19, 2025
4dc2859
Only produce CIRI FLI for consensus BSJs
nictru May 19, 2025
69d079e
Improve empty handling
nictru May 19, 2025
f4940af
Fix ciri-vis error
nictru May 19, 2025
47f87a6
Switch to per-sample ciri-vis
nictru May 24, 2025
31e934f
Transition DCC to circtools
nictru May 24, 2025
b4e4678
Implement circtools FLI detection
nictru May 24, 2025
2b08c22
Improve circtools outdir definition
nictru May 24, 2025
3ea9fa3
Slightly further improve circtools FLI output structure
nictru May 24, 2025
a5a379b
Implement circtools FASTA extraction
nictru May 24, 2025
5cfc6a6
Make circtools reconstruct more robust towards empty outputs
nictru May 24, 2025
3905892
Update save_intermediates usage in modules.config
nictru May 25, 2025
7094376
Fix circtools reconstruct output structure
nictru May 25, 2025
1db3647
Limit CIRIfull to consensus
nictru May 25, 2025
0e830bf
Add basic longread support
nictru Jun 30, 2025
125afb8
Implement cirivis-unification
nictru Jun 30, 2025
0023e70
Implement psirc unification
nictru Jun 30, 2025
15ca479
Fix psirc unify outdir definition
nictru Jun 30, 2025
7b72a99
Standardize fli detection interfaces
nictru Jun 30, 2025
b9f68d9
Relocate some things in main workflow
nictru Jun 30, 2025
ebac2bc
Fix psirc channel structure bug
nictru Jun 30, 2025
5b97a3e
Make psirc only write circular transcripts
nictru Jun 30, 2025
447a03f
Update circtools/nanopore
nictru Jul 21, 2025
b4ee27c
Fix test configuration
nictru Sep 1, 2025
e185dcf
Merge remote-tracking branch 'origin/dev' into 136-implement-psirc-fo…
nictru Sep 1, 2025
7a5e987
Fix editorconfig issue
nictru Sep 1, 2025
c2888d3
Fix nf-core linting issue
nictru Sep 1, 2025
f1089c6
Prettier
nictru Sep 1, 2025
d35a0a4
Remove fli_tools default value
nictru Sep 1, 2025
02b0bed
Prettier
nictru Sep 1, 2025
4db5ec5
Add back fli_tools default
nictru Sep 1, 2025
b559371
Add back fli_tools empty string default value
nictru Sep 1, 2025
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
4 changes: 2 additions & 2 deletions conf/full.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
*/

params {
tools = 'circexplorer2,ciriquant,find_circ,circrna_finder,mapsplice,dcc,segemehl'
min_tools = 2
tools = 'psirc,circexplorer2,ciri,find_circ,circrna_finder,mapsplice,circtools,segemehl'
min_tools = 2
}
410 changes: 294 additions & 116 deletions conf/modules.config

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
"git_sha": "15a93581f7f81d05c04b828954004a089360ea9b",
"installed_by": ["modules"]
},
"bwa/mem": {
"branch": "master",
"git_sha": "a29f18660f5e3748d44d6f716241e70c942c065d",
"installed_by": ["modules"],
"patch": "modules/nf-core/bwa/mem/bwa-mem.diff"
},
"cat/cat": {
"branch": "master",
"git_sha": "81880787133db07d9b4c1febd152c090eb8325dc",
Expand Down Expand Up @@ -111,11 +117,21 @@
"git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358",
"installed_by": ["modules"]
},
"fastp": {
"branch": "master",
"git_sha": "d082103d7976a2804f21225446cc110cbd822f4c",
"installed_by": ["modules"]
},
"fastqc": {
"branch": "master",
"git_sha": "81880787133db07d9b4c1febd152c090eb8325dc",
"installed_by": ["modules"]
},
"filtlong": {
"branch": "master",
"git_sha": "81880787133db07d9b4c1febd152c090eb8325dc",
"installed_by": ["modules"]
},
"gawk": {
"branch": "master",
"git_sha": "27be1be5a87724096b51e1fe579ecbd773f53f1b",
Expand Down Expand Up @@ -201,6 +217,16 @@
"git_sha": "81880787133db07d9b4c1febd152c090eb8325dc",
"installed_by": ["modules"]
},
"seqkit/fx2tab": {
"branch": "master",
"git_sha": "05954dab2ff481bcb999f24455da29a5828af08d",
"installed_by": ["modules"]
},
"seqkit/stats": {
"branch": "master",
"git_sha": "9fe7867a4f012db581d7bd560228ded1074eb0e5",
"installed_by": ["modules"]
},
"star/align": {
"branch": "master",
"git_sha": "81880787133db07d9b4c1febd152c090eb8325dc",
Expand All @@ -221,6 +247,11 @@
"git_sha": "81880787133db07d9b4c1febd152c090eb8325dc",
"installed_by": ["modules"]
},
"trinity": {
"branch": "master",
"git_sha": "05954dab2ff481bcb999f24455da29a5828af08d",
"installed_by": ["modules"]
},
"tximeta/tximport": {
"branch": "master",
"git_sha": "81880787133db07d9b4c1febd152c090eb8325dc",
Expand Down
7 changes: 3 additions & 4 deletions modules/local/annotation/bed2gtf/templates/bed2gtf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import yaml

import polars as pl
import yaml

# Versions

Expand All @@ -17,8 +18,6 @@
with open("versions.yml", "w") as f:
f.write(yaml.dump(versions))

# Main

exons_only = bool("${exons_only}")

columns = ['chr', 'start', 'end', 'name', 'score', 'strand',
Expand All @@ -41,8 +40,8 @@

if exons_only:
df_exons = df.with_columns(
exonSizes = pl.col('exonSizes').str.split(','),
exonStarts = pl.col('exonStarts').str.split(',')
exonSizes = pl.col('exonSizes').cast(pl.Utf8).str.split(','),
exonStarts = pl.col('exonStarts').cast(pl.Utf8).str.split(',')
).explode('exonSizes', 'exonStarts')
df_exons = df_exons.with_columns(
type = pl.lit('exon'),
Expand Down
6 changes: 6 additions & 0 deletions modules/local/circtools/annotation/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::gtfparse=2.5.0
- conda-forge::pyyaml=6.0.2
20 changes: 20 additions & 0 deletions modules/local/circtools/annotation/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
process CIRCTOOLS_ANNOTATION {
tag "${meta.id}"
label 'process_single'

conda "environment.yml"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'oras://community.wave.seqera.io/library/gtfparse_pyyaml:e3b66ef529a096e7'
: 'community.wave.seqera.io/library/gtfparse_pyyaml:508c7607beb17f69'}"

input:
tuple val(meta), path(gtf)

output:
tuple val(meta), path("${prefix}.bed"), emit: bed
path "versions.yml" , emit: versions

script:
prefix = task.ext.prefix ?: "${meta.id}"
template 'annotation.py'
}
65 changes: 65 additions & 0 deletions modules/local/circtools/annotation/templates/annotation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#! /usr/bin/env python3

import platform

import gtfparse
import polars as pl
import yaml

# Read GTF file
df_gtf = gtfparse.read_gtf("${gtf}")

# Filter for exon features only
exons = df_gtf.filter(pl.col("feature") == "exon")

# Convert to polars DataFrame for better performance
exons_pl = pl.DataFrame(exons)

# Add 0-based start for BED format
exons_pl = exons_pl.with_columns(
start_0based=pl.col("start") - 1
)

# Number exons within each gene
exons_pl = (
exons_pl
.sort(["gene_id", "start"])
.with_columns([
pl.col("gene_id").cumcount().over("gene_id").alias("exon_number")
])
)

# Create name column in the required format
exons_pl = exons_pl.with_columns([
(
pl.col("gene_id") + "_exon_" +
pl.col("exon_number").cast(pl.Utf8) + "_0_chr" +
pl.col("seqname") + "_" +
(pl.col("start")).cast(pl.Utf8) + "_" +
pl.when(pl.col("strand") == "+").then(pl.lit("f")).otherwise(pl.lit("r"))
).alias("name")
])

# Select and rename columns for BED format
bed_df = exons_pl.select([
pl.col("seqname").alias("chrom"),
pl.col("start_0based").alias("start"),
pl.col("end"),
pl.col("name"),
pl.lit(0).alias("score"),
pl.col("strand")
])

# Write to BED file
bed_df.write_csv("${prefix}.bed", separator="\\t", include_header=False)

# Log versions
versions = {
"${task.process}": {
"python": platform.python_version(),
"polars": pl.__version__
}
}

with open("versions.yml", "w") as f:
yaml.dump(versions, f)
5 changes: 5 additions & 0 deletions modules/local/circtools/detect/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::circtools=2.0
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
process DCC {
process CIRCTOOLS_DETECT {
tag "${meta.id}"
label 'process_high'

conda "bioconda::circtools=2.0"
conda "environment.yml"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/circtools:2.0--pyhdfd78af_0'
: 'biocontainers/circtools:2.0--pyhdfd78af_0'}"
Expand All @@ -19,9 +19,6 @@ process DCC {

path "versions.yml", emit: versions

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

script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
Expand Down
9 changes: 9 additions & 0 deletions modules/local/circtools/nanopore/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::bedtools=2.31.1
- bioconda::circtools=2.0.1
- bioconda::nanofilt=2.8.0
- bioconda::pblat=2.5.1
- bioconda::samtools=1.22
37 changes: 37 additions & 0 deletions modules/local/circtools/nanopore/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
process CIRCTOOLS_NANOPORE {
tag "${meta.id}"
label 'process_high'

conda "environment.yml"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/16/162d301bf9771dcc9bd647e7ea00cc9a959a933fc4b2bc0232fcb195acb09477/data'
: 'community.wave.seqera.io/library/bedtools_circtools_nanofilt_pblat_samtools:20d0bb8a94c47e28'}"

input:
tuple val(meta), path(reads)
path(reference)
val(genome)

output:
path "versions.yml", emit: versions

script:
prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir -p temp
export TMPDIR="\$(pwd)/temp"

circtools nanopore \
-r \
-s ${reads} \
-R ${reference} \
-C ${genome} \
-O ${prefix} \
-t ${task.cpus}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
circtools: \$(circtools -V)
END_VERSIONS
"""
}
5 changes: 5 additions & 0 deletions modules/local/circtools/reconstruct/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::circtools=2.0
46 changes: 46 additions & 0 deletions modules/local/circtools/reconstruct/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
process CIRCTOOLS_RECONSTRUCT {
tag "${meta.id}"
label 'process_high'

conda "environment.yml"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'oras://community.wave.seqera.io/library/circtools:2.0--b33a23b50d9f0697'
: 'community.wave.seqera.io/library/circtools:2.0--f5bc60d7f93fefae'}"

input:
tuple val(meta), path(bed), path(bam), path(bai), path(junction)
tuple val(meta2), path(annotation)

output:
tuple val(meta), path("${prefix}.alternative_splicing.txt"), emit: alternative_splicing
tuple val(meta), path("${prefix}.exon_counts.bed"), emit: exon_counts_bed
tuple val(meta), path("${prefix}.exon_counts.txt"), emit: exon_counts_txt
tuple val(meta), path("${prefix}.mate_status.txt"), emit: mate_status
tuple val(meta), path("${prefix}.skipped_exons.bed"), emit: skipped_exons_bed
tuple val(meta), path("${prefix}.skipped_exons.txt"), emit: skipped_exons_txt
tuple val(meta), path("${prefix}/*.bam"), emit: bam, optional: true
tuple val(meta), path("${prefix}.coverage_pictures/*.pdf"), emit: coverage_pictures, optional: true
tuple val(meta), path("${prefix}.coverage_profiles/*.txt"), emit: coverage_profiles_txt, optional: true
tuple val(meta), path("${prefix}.coverage_profiles/*.pdf"), emit: coverage_profiles_pdf, optional: true
tuple val(meta), path("${prefix}.coverage_profiles/*.tsv"), emit: coverage_profiles_tsv, optional: true
path "versions.yml", emit: versions

script:
prefix = task.ext.prefix ?: "${meta.id}"
"""
circtools reconstruct \
--bamfile ${bam} \
--annotation ${annotation} \
--sampleName ${meta.id} \
-D ${bed} \
-J ${junction} \
-T ./temp \
-O . \
-P ${task.cpus}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
circtools: \$(circtools -V)
END_VERSIONS
"""
}
5 changes: 5 additions & 0 deletions modules/local/circtools/reference/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::circtools=2.0
28 changes: 28 additions & 0 deletions modules/local/circtools/reference/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
process CIRCTOOLS_REFERENCE {
tag "${genome}"
label 'process_low'

conda "environment.yml"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'oras://community.wave.seqera.io/library/circtools:2.0--b33a23b50d9f0697'
: 'community.wave.seqera.io/library/circtools:2.0--f5bc60d7f93fefae'}"

input:
val(genome)

output:
path "reference", emit: reference
path "versions.yml", emit: versions

script:
"""
mkdir -p temp
export TMPDIR=./temp
circtools nanopore -d -R reference/ -C ${genome}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
circtools: \$(circtools -V)
END_VERSIONS
"""
}
File renamed without changes.
6 changes: 6 additions & 0 deletions modules/local/ciri/build_list/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
channels:
- conda-forge
- bioconda
dependencies:
- conda-forge::polars=1.8.2
- conda-forge::upsetplot=0.9.0
21 changes: 21 additions & 0 deletions modules/local/ciri/build_list/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
process BUILD_LIST {
tag "${meta.id}"
label "process_low"

conda "${moduleDir}/environment.yml"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'oras://community.wave.seqera.io/library/polars_pyyaml:153427379c542734'
: 'community.wave.seqera.io/library/polars_pyyaml:57e6c66da323f22b'}"

input:
tuple val(meta), path(ciri_annotation), path(consensus)

output:
tuple val(meta), path("${prefix}.txt"), emit: list
path "versions.yml", emit: versions

script:
prefix = task.ext.prefix ?: "${meta.id}"
max_shift = task.ext.max_shift ?: 0
template "build_list.py"
}
Loading