Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
951c50d
add ctatsplicing/prepgenomelib
anoronh4 Mar 26, 2025
61a6c79
add ctatsplicing/prepgenomelib
anoronh4 Mar 31, 2025
04f64e8
update descriptions for ctatsplicing/prepgenomelib
anoronh4 Apr 3, 2025
bb76c05
add ctatsplicing/startocancerintrons module
anoronh4 Apr 3, 2025
16c478d
configure skipping of conda test
anoronh4 Apr 3, 2025
d50cacf
fix meta.yml
anoronh4 Apr 3, 2025
1b4e82e
Merge branch 'master' into module/ctatsplicing
anoronh4 Apr 3, 2025
b04ef34
remove resource configs
anoronh4 Apr 3, 2025
e6aeda7
add author to meta yml files
anoronh4 Apr 3, 2025
b7700ce
add ontologies to meta.yml
anoronh4 Apr 9, 2025
dbacc2f
add comment clarifying that hard-coded version must be manually updated
anoronh4 Apr 9, 2025
2d56731
add description and long_description
anoronh4 Apr 9, 2025
df7277a
Merge branch 'master' into module/ctatsplicing
anoronh4 Apr 9, 2025
76c4f7b
Update container for `ctatsplicing` modules
delfiterradas Jul 29, 2025
6f45311
Fix linting error
delfiterradas Jul 29, 2025
9688644
Merge branch 'master' into module/ctatsplicing
delfiterradas Jul 29, 2025
31b8c63
Add full test for ctatsplicing/prepgenomelib module
delfiterradas Jul 29, 2025
a421cbd
Remove empty files and fix linting error
delfiterradas Jul 30, 2025
4ac5753
Remove unstable files from snapshot
delfiterradas Jul 30, 2025
a2eb5c9
Merge branch 'master' into module/ctatsplicing
delfiterradas Jul 30, 2025
4e939a7
Add full test for ctatsplicing/startocancerintrons module
delfiterradas Jul 30, 2025
63e02e1
Add optional output
delfiterradas Jul 30, 2025
9be9d8c
Update test
delfiterradas Jul 31, 2025
af4c472
Correct error message
delfiterradas Jul 31, 2025
6c8f7a5
Correct error message
delfiterradas Jul 31, 2025
e388a50
Merge branch 'master' into module/ctatsplicing
delfiterradas Jul 31, 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
2 changes: 2 additions & 0 deletions .github/skip_nf_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
"modules/nf-core/cellrangeratac/count",
"modules/nf-core/checkqc",
"modules/nf-core/coreograph",
"modules/nf-core/ctatsplicing/prepgenomelib",
"modules/nf-core/ctatsplicing/startocancerintrons",
"modules/nf-core/custom/dumpsoftwareversions",
"modules/nf-core/deepcell/mesmer",
"modules/nf-core/deepsomatic",
Expand Down
129 changes: 129 additions & 0 deletions modules/nf-core/ctatsplicing/prepgenomelib/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
process CTATSPLICING_PREPGENOMELIB {
tag "$meta.id"
label 'process_single'
stageInMode 'copy'

container "nf-core/ctatsplicing:0.0.3"

input:
tuple val(meta), path(genome_lib)
path(cancer_intron_tsv)

output:
tuple val(meta), path(genome_lib), emit: reference
path "versions.yml" , emit: versions

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

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "CTATSPLICING_PREPGENOMELIB module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '0.0.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
/usr/local/src/CTAT-SPLICING/prep_genome_lib/ctat-splicing-lib-integration.py \\
--cancer_introns_tsv $cancer_intron_tsv \\
--genome_lib_dir $genome_lib

cat <<-END_VERSIONS > versions.yml
"${task.process}":
ctatsplicing: $VERSION
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '0.0.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
mkdir -p $genome_lib/
mkdir -p $genome_lib/ref_genome.fa.star.idx
mkdir -p $genome_lib/__chkpts
mkdir -p $genome_lib/cancer_splicing_lib
touch $genome_lib/ref_genome.fa.star.idx/chrName.txt
touch $genome_lib/ref_genome.fa.star.idx/exonInfo.tab
touch $genome_lib/ref_genome.fa.star.idx/SAindex
touch $genome_lib/ref_genome.fa.star.idx/Genome
touch $genome_lib/ref_genome.fa.star.idx/geneInfo.tab
touch $genome_lib/ref_genome.fa.star.idx/sjdbList.out.tab
touch $genome_lib/ref_genome.fa.star.idx/sjdbInfo.txt
touch $genome_lib/ref_genome.fa.star.idx/transcriptInfo.tab
touch $genome_lib/ref_genome.fa.star.idx/sjdbList.fromGTF.out.tab
touch $genome_lib/ref_genome.fa.star.idx/build.ok
touch $genome_lib/ref_genome.fa.star.idx/chrLength.txt
touch $genome_lib/ref_genome.fa.star.idx/Log.out
touch $genome_lib/ref_genome.fa.star.idx/genomeParameters.txt
touch $genome_lib/ref_genome.fa.star.idx/chrStart.txt
touch $genome_lib/ref_genome.fa.star.idx/SA
touch $genome_lib/ref_genome.fa.star.idx/chrNameLength.txt
touch $genome_lib/ref_genome.fa.star.idx/exonGeTrInfo.tab
touch $genome_lib/ref_annot.cds
touch $genome_lib/ref_annot.gtf.gene_spans
touch $genome_lib/pfam_domains.dbm
touch $genome_lib/ref_annot.cdsplus.fa.idx
touch $genome_lib/ref_genome.fa.ndb
touch $genome_lib/ref_genome.fa.nin
touch $genome_lib/ref_genome.fa
touch $genome_lib/ref_annot.prot_info.dbm
echo | gzip > $genome_lib/PFAM.domtblout.dat.gz
touch $genome_lib/trans.blast.align_coords.align_coords.dat
touch $genome_lib/fusion_annot_lib.idx
touch $genome_lib/ref_annot.pep
touch $genome_lib/__chkpts/trans.blast.dat.cp.ok
touch $genome_lib/__chkpts/cp_ref_annot_cdna.ok
touch $genome_lib/__chkpts/ref_annot.cdsplus.dfam_masked.fa.cp.ok
touch $genome_lib/__chkpts/annotfiltrule_cp.ok
touch $genome_lib/__chkpts/validate_ctat_genome_lib.ok
touch $genome_lib/__chkpts/cp_pfam_dat.ok
touch $genome_lib/__chkpts/fusion_annot_lib.cp.ok
touch $genome_lib/__chkpts/ref_genome.fa.ok
touch $genome_lib/__chkpts/cp_gene_blast_pairs.ok
touch $genome_lib/__chkpts/mm2_genome_idx.ok
touch $genome_lib/__chkpts/trans.blast.dat.index.ok
touch $genome_lib/__chkpts/ref_genome_fai.ok
touch $genome_lib/__chkpts/index_ref_annot_cdna.ok
touch $genome_lib/__chkpts/ref_annot.gtf.ok
touch $genome_lib/__chkpts/blast_pairs.idx.ok
touch $genome_lib/__chkpts/ref_annot.cdsplus.dfam_masked.fa.idx.ok
touch $genome_lib/__chkpts/_prot_info_db.ok
touch $genome_lib/__chkpts/_fusion_annot_lib.idx.ok
touch $genome_lib/__chkpts/index_pfam_hits.ok
touch $genome_lib/__chkpts/makeblastdb.ok
touch $genome_lib/__chkpts/ref_annot.gtf.gene_spans.ok
touch $genome_lib/__chkpts/mm2.splice_bed.ok
touch $genome_lib/__chkpts/ref_annot.gtf.mini.sortu.ok
touch $genome_lib/ref_genome.fa.ntf
touch $genome_lib/ref_genome.fa.nto
touch $genome_lib/ref_annot.gtf
touch $genome_lib/ref_annot.gtf.mm2.splice.bed
touch $genome_lib/ref_genome.fa.mm2
echo | gzip > $genome_lib/fusion_annot_lib.gz
touch $genome_lib/ref_annot.cdsplus.fa
touch $genome_lib/AnnotFilterRule.pm
echo | gzip > $genome_lib/trans.blast.dat.gz
touch $genome_lib/ref_genome.fa.nhr
touch $genome_lib/blast_pairs.idx
touch $genome_lib/ref_genome.fa.nsq
echo | gzip > $genome_lib/blast_pairs.dat.gz
touch $genome_lib/ref_annot.cdna.fa.idx
touch $genome_lib/ref_genome.fa.not
touch $genome_lib/ref_annot.cdna.fa
touch $genome_lib/ref_annot.gtf.mini.sortu
touch $genome_lib/trans.blast.align_coords.align_coords.dbm
touch $genome_lib/ref_genome.fa.njs
touch $genome_lib/ref_genome.fa.fai
touch $genome_lib/refGene.bed
echo | gzip > $genome_lib/refGene.sort.bed.gz
echo | gzip > $genome_lib/refGene.sort.bed.gz.tbi
touch $genome_lib/cancer_splicing_lib/cancer_splicing.idx

cat <<-END_VERSIONS > versions.yml
"${task.process}":
ctatsplicing: $VERSION
END_VERSIONS
"""
}
57 changes: 57 additions & 0 deletions modules/nf-core/ctatsplicing/prepgenomelib/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "ctatsplicing_prepgenomelib"
description: Reference preparation for CTAT-splicing
long_description: |
This module prepares the CTAT genome library reference for splicing analysis by integrating cancer intron annotations.
It takes a CTAT genome library and a cancer intron TSV file as input, and outputs a modified genome library reference.
The output can be used in subsequent CTAT-splicing analyses to detect and annotate cancer splicing aberrations.
Make sure to provide the correct genome library and cancer intron data resource.
keywords:
- splicing
- cancer
- rna
- rnaseq
tools:
- "ctatsplicing":
description: "Detection and annotation of cancer splicing aberrations"
homepage: "https://github.com/TrinityCTAT/CTAT-SPLICING"
documentation: "https://github.com/TrinityCTAT/CTAT-SPLICING"
tool_dev_url: "https://github.com/TrinityCTAT/CTAT-SPLICING"

input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- genome_lib:
type: file
description: CTAT genome library reference
pattern: "*"
- cancer_intron_tsv:
type: file
description: CTAT-splicing data resource supplement

output:
reference:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- genome_lib:
type: file
description: Modified CTAT genome library reference
pattern: "*"
versions:
- "versions.yml":
type: file
description: File containing software versions
pattern: "versions.yml"

authors:
- "@anoronh4"
- "@nvnieuwk"
maintainers:
- "@anoronh4"
109 changes: 109 additions & 0 deletions modules/nf-core/ctatsplicing/prepgenomelib/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
nextflow_process {

name "Test Process CTATSPLICING_PREPGENOMELIB"
script "../main.nf"
process "CTATSPLICING_PREPGENOMELIB"

tag "modules"
tag "modules_nfcore"
tag "ctatsplicing"
tag "ctatsplicing/prepgenomelib"
tag "starfusion/build"

test("homo_sapiens - reference") {
setup {
run("STARFUSION_BUILD") {
script "../../../starfusion/build/main.nf"
process {
"""
input[0] = [
[ id:'minigenome_fasta' ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/minigenome.fa')
]
input[1] = [
[ id:'minigenome_gtf' ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/minigenome.gtf')
]
input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/CTAT_HumanFusionLib.mini.dat.gz')
input[3] = "homo_sapiens"
input[4] = "http://ftp.ebi.ac.uk/pub/databases/Pfam/releases/Pfam37.4/Pfam-A.hmm.gz"
input[5] = [
"https://www.dfam.org/releases/Dfam_3.8/infrastructure/dfamscan/homo_sapiens_dfam.hmm",
"https://www.dfam.org/releases/Dfam_3.8/infrastructure/dfamscan/homo_sapiens_dfam.hmm.h3f",
"https://www.dfam.org/releases/Dfam_3.8/infrastructure/dfamscan/homo_sapiens_dfam.hmm.h3i",
"https://www.dfam.org/releases/Dfam_3.8/infrastructure/dfamscan/homo_sapiens_dfam.hmm.h3m",
"https://www.dfam.org/releases/Dfam_3.8/infrastructure/dfamscan/homo_sapiens_dfam.hmm.h3p"
]
input[6] = "https://data.broadinstitute.org/Trinity/CTAT_RESOURCE_LIB/AnnotFilterRule.pm"
"""
}
}
}

when {
process {
"""
input[0] = STARFUSION_BUILD.out.reference
input[1] = [
file("https://data.broadinstitute.org/Trinity/CTAT_RESOURCE_LIB/CANCER_SPLICING_LIB_SUPPLEMENT/cancer_introns.GRCh38.Jun232020.tsv.gz", checkIfExists:true)
]
"""
}
}

then {
def stable_name = getAllFilesFromDir(process.out.reference.get(0).get(1), includeDir: true)
def stable_files = getAllFilesFromDir(process.out.reference.get(0).get(1), includeDir: false, include: ['*','**/*'],
ignore: ['refGene.sort.bed.gz.tbi','**/refGene.sort.bed.gz.tbi', 'refGene.bed', '**/cancer_splicing.idx', 'ref_annot.c*',
'PFAM.domtblout.dat.gz', 'blast_pairs*', 'fusion_annot_lib.idx', 'pfam_domains.dbm', 'ref_annot.gtf.gene_spans',
'ref_annot.prot_info.dbm', 'ref_annot.pep', 'ref_genome.fa.nin', 'ref_genome.fa.njs', '**/Log.out', '**/genomeParameters.txt', 'trans.blast.align_coords.align_coords.dbm'])
def stable_content = stable_files.findAll { it.size() > 0 }
assertAll(
{ assert process.success },
{
assert snapshot(
stable_name*.name,
stable_content,
process.out.versions
).match()
}
)

}
}

test("homo_sapiens - reference - stub") {

options "-stub"

when {
process {
"""
new File('ctat_genome_lib_build_dir').mkdirs()
input[0] = [[id:"ctat_genome_lib_build_dir"],file("ctat_genome_lib_build_dir/")]
input[1] = [
file("https://data.broadinstitute.org/Trinity/CTAT_RESOURCE_LIB/CANCER_SPLICING_LIB_SUPPLEMENT/cancer_introns.GRCh38.Jun232020.tsv.gz", checkIfExists:true)
]
"""
}
}

then {
def stable_name = getAllFilesFromDir(process.out.reference.get(0).get(1), includeDir: true)
def stable_content = getAllFilesFromDir(process.out.reference.get(0).get(1), includeDir: false, include: ['*','**/*'], ignore: ['refGene.sort.bed.gz.tbi','**/refGene.sort.bed.gz.tbi','**/cancer_splicing.idx'])
assertAll(
{ assert process.success },
{
assert snapshot(
stable_name*.name,
stable_content,
process.out.versions
).match()
}
)

}

}

}
Loading
Loading