From a31752950e168b58dd5bdb9ac243eef11866e892 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 21 Jan 2025 14:55:01 +0100 Subject: [PATCH 1/5] add cancer splicing lib to starfusion ref --- conf/modules.config | 15 ++++++- .../local/ctatsplicing/prepgenomelib/main.nf | 45 +++++++++++++++++++ nextflow.config | 1 - subworkflows/local/build_references.nf | 11 ++++- 4 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 modules/local/ctatsplicing/prepgenomelib/main.nf diff --git a/conf/modules.config b/conf/modules.config index 967e820a..c66cafad 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -360,7 +360,20 @@ process { ] } - withName: 'NFCORE_RNAFUSION:BUILD_REFERENCES:STARFUSION_BUILD' { + withName: 'STARFUSION_BUILD' { + cpus = { 24 * task.attempt } + memory = { 100.GB * task.attempt } + time = { 2.d * task.attempt } + publishDir = [ + enabled: !params.ctatsplicing && !params.all, + path: { "${params.genomes_base}/starfusion" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, + ] + ext.args = "--max_readlength ${params.read_length} --human_gencode_filter" + } + + withName: 'CTATSPLICING_PREPGENOMELIB' { cpus = { 24 * task.attempt } memory = { 100.GB * task.attempt } time = { 2.d * task.attempt } diff --git a/modules/local/ctatsplicing/prepgenomelib/main.nf b/modules/local/ctatsplicing/prepgenomelib/main.nf new file mode 100644 index 00000000..fd7feebc --- /dev/null +++ b/modules/local/ctatsplicing/prepgenomelib/main.nf @@ -0,0 +1,45 @@ +process CTATSPLICING_PREPGENOMELIB { + tag "$meta.id" + label 'process_single' + + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://data.broadinstitute.org/Trinity/CTAT_SINGULARITY/CTAT-SPLICING/ctat_splicing.v0.0.2.simg' : + 'docker.io/trinityctat/ctat_splicing:0.0.2' }" + + input: + tuple val(meta), path(genome_lib) + + output: + tuple val(meta), path(genome_lib, includeInputs:true), emit: reference + path "versions.yml" , emit: versions + + script: + def VERSION = '0.0.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + """ + wget https://data.broadinstitute.org/Trinity/CTAT_RESOURCE_LIB/CANCER_SPLICING_LIB_SUPPLEMENT/cancer_introns.GRCh38.Jun232020.tsv.gz + + /usr/local/src/CTAT-SPLICING/prep_genome_lib/ctat-splicing-lib-integration.py \\ + --cancer_introns_tsv cancer_introns.*.tsv.gz \\ + --genome_lib_dir $genome_lib + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ctat-splicing: $VERSION + END_VERSIONS + """ + + stub: + def VERSION = '0.0.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + """ + touch $genome_lib/refGene.bed + touch $genome_lib/refGene.sort.bed.gz + touch $genome_lib/refGene.sort.bed.gz.tbi + mkdir $genome_lib/cancer_splicing_lib + touch $genome_lib/cancer_splicing_lib/cancer_splicing.idx + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ctat-splicing: $VERSION + END_VERSIONS + """ +} diff --git a/nextflow.config b/nextflow.config index 1bd38be6..d83ceecd 100644 --- a/nextflow.config +++ b/nextflow.config @@ -91,7 +91,6 @@ params { starindex_ref = "${params.genomes_base}/star" fusionreport_ref = "${params.genomes_base}/fusion_report_db" - // Internal file presence checks salmon_index_stub_check = "${params.genomes_base}/salmon/salmon/complete_ref_lens.bin" starindex_ref_stub_check = "${params.genomes_base}/star/star/Genome" diff --git a/subworkflows/local/build_references.nf b/subworkflows/local/build_references.nf index 56fd8eb2..c7cb3c31 100644 --- a/subworkflows/local/build_references.nf +++ b/subworkflows/local/build_references.nf @@ -11,6 +11,7 @@ include { HGNC_DOWNLOAD } from '../../modules/local/hgnc/main' include { STARFUSION_BUILD } from '../../modules/local/starfusion/build/main' include { GTF_TO_REFFLAT } from '../../modules/local/uscs/custom_gtftogenepred/main' include { GET_RRNA_TRANSCRIPTS } from '../../modules/local/get_rrna_transcript/main' +include { CTATSPLICING_PREPGENOMELIB } from '../../modules/local/ctatsplicing/prepgenomelib/main.nf' /* ======================================================================================== @@ -142,7 +143,15 @@ workflow BUILD_REFERENCES { !file(params.starfusion_ref_stub_check).exists() || file(params.starfusion_ref_stub_check).isEmpty() )) { STARFUSION_BUILD(ch_fasta, ch_gtf, params.fusion_annot_lib, params.species) ch_versions = ch_versions.mix(STARFUSION_BUILD.out.versions) - ch_starfusion_ref = STARFUSION_BUILD.out.reference + if (params.ctatsplicing || params.all) { + CTATSPLICING_PREPGENOMELIB( + STARFUSION_BUILD.out.reference + ) + 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) From 43b6045db4f743c9b3b0fc001095c4f2f8170d12 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 21 Jan 2025 14:57:07 +0100 Subject: [PATCH 2/5] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 010d1619..39c7f0ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add nf-test to local subworkflow: `FUSIONCATCHER_WORKFLOW` [#591](https://github.com/nf-core/rnafusion/pull/591) - Add nf-test to local subworkflow: `STARFUSION_WORKFLOW`. [#597](https://github.com/nf-core/rnafusion/pull/597) - Add nf-test to local module: `FUSIONINSPECTOR`. [#601](https://github.com/nf-core/rnafusion/pull/601) +- Added `CTATSPLICING_PREPGENOMELIB` to update the starfusion genome library directory with a cancer splicing index. [#610](https://github.com/nf-core/rnafusion/pull/610) ### Changed From 472da39e9ad2d5f4b7590012ca332902956d04d2 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 21 Jan 2025 15:09:40 +0100 Subject: [PATCH 3/5] update prepgenomelib resources --- conf/modules.config | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index c66cafad..c13cb3d2 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -374,9 +374,8 @@ process { } withName: 'CTATSPLICING_PREPGENOMELIB' { - cpus = { 24 * task.attempt } - memory = { 100.GB * task.attempt } - time = { 2.d * task.attempt } + cpus = { 1 * task.attempt } + memory = { 20.GB * task.attempt } publishDir = [ path: { "${params.genomes_base}/starfusion" }, mode: params.publish_dir_mode, From 0915989fc0bd19f27f6f9d1a612e1ba5cf33a88b Mon Sep 17 00:00:00 2001 From: nvnieuwk Date: Tue, 21 Jan 2025 15:55:03 +0000 Subject: [PATCH 4/5] fix stub test snapshot --- tests/test_stub.nf.test.snap | 330 ++++++++++++++++++----------------- 1 file changed, 174 insertions(+), 156 deletions(-) diff --git a/tests/test_stub.nf.test.snap b/tests/test_stub.nf.test.snap index 3a425748..cd8cd92c 100644 --- a/tests/test_stub.nf.test.snap +++ b/tests/test_stub.nf.test.snap @@ -1,7 +1,7 @@ { "stub test no fastp trim": { "content": [ - 31, + 32, { "ARRIBA_ARRIBA": { "arriba": "2.4.0" @@ -9,6 +9,9 @@ "ARRIBA_DOWNLOAD": { "arriba_download": "2.4.0" }, + "CTATSPLICING_PREPGENOMELIB": { + "ctat-splicing": "0.0.2" + }, "CTATSPLICING_STARTOCANCERINTRONS": { "ctat-splicing": "0.0.2" }, @@ -224,6 +227,87 @@ "references/star/sjdbList.fromGTF.out.tab", "references/star/sjdbList.out.tab", "references/star/transcriptInfo.tab", + "references/starfusion", + "references/starfusion/ctat_genome_lib_build_dir", + "references/starfusion/ctat_genome_lib_build_dir/AnnotFilterRule.pm", + "references/starfusion/ctat_genome_lib_build_dir/PFAM.domtblout.dat.gz", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/_fusion_annot_lib.idx.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/_prot_info_db.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/annotfiltrule_cp.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/blast_pairs.idx.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/cp_gene_blast_pairs.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/cp_pfam_dat.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/cp_ref_annot_cdna.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/fusion_annot_lib.cp.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/index_pfam_hits.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/index_ref_annot_cdna.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/makeblastdb.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/mm2.splice_bed.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/mm2_genome_idx.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.cdsplus.dfam_masked.fa.cp.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.cdsplus.dfam_masked.fa.idx.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.gtf.gene_spans.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.gtf.mini.sortu.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.gtf.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/ref_genome.fa.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/ref_genome_fai.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/trans.blast.dat.cp.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/trans.blast.dat.index.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/validate_ctat_genome_lib.ok", + "references/starfusion/ctat_genome_lib_build_dir/blast_pairs.dat.gz", + "references/starfusion/ctat_genome_lib_build_dir/blast_pairs.idx", + "references/starfusion/ctat_genome_lib_build_dir/cancer_splicing_lib", + "references/starfusion/ctat_genome_lib_build_dir/cancer_splicing_lib/cancer_splicing.idx", + "references/starfusion/ctat_genome_lib_build_dir/fusion_annot_lib.gz", + "references/starfusion/ctat_genome_lib_build_dir/fusion_annot_lib.idx", + "references/starfusion/ctat_genome_lib_build_dir/pfam_domains.dbm", + "references/starfusion/ctat_genome_lib_build_dir/refGene.bed", + "references/starfusion/ctat_genome_lib_build_dir/refGene.sort.bed.gz", + "references/starfusion/ctat_genome_lib_build_dir/refGene.sort.bed.gz.tbi", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.cdna.fa", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.cdna.fa.idx", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.cds", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.cdsplus.fa", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.cdsplus.fa.idx", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.gtf", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.gtf.gene_spans", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.gtf.mini.sortu", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.gtf.mm2.splice.bed", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.pep", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.prot_info.dbm", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.fai", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.mm2", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.ndb", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nhr", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nin", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.njs", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.not", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nsq", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.ntf", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nto", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/Genome", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/Log.out", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/SA", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/SAindex", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/build.ok", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrLength.txt", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrName.txt", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrNameLength.txt", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrStart.txt", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/exonGeTrInfo.tab", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/exonInfo.tab", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/geneInfo.tab", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/genomeParameters.txt", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/sjdbInfo.txt", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/sjdbList.fromGTF.out.tab", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/sjdbList.out.tab", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/transcriptInfo.tab", + "references/starfusion/ctat_genome_lib_build_dir/trans.blast.align_coords.align_coords.dat", + "references/starfusion/ctat_genome_lib_build_dir/trans.blast.align_coords.align_coords.dbm", + "references/starfusion/ctat_genome_lib_build_dir/trans.blast.dat.gz", "salmon", "salmon/test", "salmon/test_lib_format_counts.json", @@ -266,81 +350,6 @@ "star_for_starfusion/test.unmapped_2.fastq.gz", "star_for_starfusion/testXd.out.bam", "starfusion", - "starfusion/ctat_genome_lib_build_dir", - "starfusion/ctat_genome_lib_build_dir/AnnotFilterRule.pm", - "starfusion/ctat_genome_lib_build_dir/PFAM.domtblout.dat.gz", - "starfusion/ctat_genome_lib_build_dir/__chkpts", - "starfusion/ctat_genome_lib_build_dir/__chkpts/_fusion_annot_lib.idx.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/_prot_info_db.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/annotfiltrule_cp.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/blast_pairs.idx.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/cp_gene_blast_pairs.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/cp_pfam_dat.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/cp_ref_annot_cdna.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/fusion_annot_lib.cp.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/index_pfam_hits.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/index_ref_annot_cdna.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/makeblastdb.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/mm2.splice_bed.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/mm2_genome_idx.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.cdsplus.dfam_masked.fa.cp.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.cdsplus.dfam_masked.fa.idx.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.gtf.gene_spans.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.gtf.mini.sortu.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.gtf.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/ref_genome.fa.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/ref_genome_fai.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/trans.blast.dat.cp.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/trans.blast.dat.index.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/validate_ctat_genome_lib.ok", - "starfusion/ctat_genome_lib_build_dir/blast_pairs.dat.gz", - "starfusion/ctat_genome_lib_build_dir/blast_pairs.idx", - "starfusion/ctat_genome_lib_build_dir/fusion_annot_lib.gz", - "starfusion/ctat_genome_lib_build_dir/fusion_annot_lib.idx", - "starfusion/ctat_genome_lib_build_dir/pfam_domains.dbm", - "starfusion/ctat_genome_lib_build_dir/ref_annot.cdna.fa", - "starfusion/ctat_genome_lib_build_dir/ref_annot.cdna.fa.idx", - "starfusion/ctat_genome_lib_build_dir/ref_annot.cds", - "starfusion/ctat_genome_lib_build_dir/ref_annot.cdsplus.fa", - "starfusion/ctat_genome_lib_build_dir/ref_annot.cdsplus.fa.idx", - "starfusion/ctat_genome_lib_build_dir/ref_annot.gtf", - "starfusion/ctat_genome_lib_build_dir/ref_annot.gtf.gene_spans", - "starfusion/ctat_genome_lib_build_dir/ref_annot.gtf.mini.sortu", - "starfusion/ctat_genome_lib_build_dir/ref_annot.gtf.mm2.splice.bed", - "starfusion/ctat_genome_lib_build_dir/ref_annot.pep", - "starfusion/ctat_genome_lib_build_dir/ref_annot.prot_info.dbm", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.fai", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.mm2", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.ndb", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nhr", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nin", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.njs", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.not", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nsq", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.ntf", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nto", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/Genome", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/Log.out", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/SA", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/SAindex", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/build.ok", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrLength.txt", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrName.txt", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrNameLength.txt", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrStart.txt", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/exonGeTrInfo.tab", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/exonInfo.tab", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/geneInfo.tab", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/genomeParameters.txt", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/sjdbInfo.txt", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/sjdbList.fromGTF.out.tab", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/sjdbList.out.tab", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/transcriptInfo.tab", - "starfusion/ctat_genome_lib_build_dir/trans.blast.align_coords.align_coords.dat", - "starfusion/ctat_genome_lib_build_dir/trans.blast.align_coords.align_coords.dbm", - "starfusion/ctat_genome_lib_build_dir/trans.blast.dat.gz", "starfusion/test.starfusion.abridged.coding_effect.tsv", "starfusion/test.starfusion.abridged.tsv", "starfusion/test.starfusion.fusion_predictions.tsv", @@ -355,13 +364,13 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.3" + "nextflow": "24.10.4" }, - "timestamp": "2025-01-07T13:16:02.754052" + "timestamp": "2025-01-21T15:53:57.652134536" }, "stub test with fastp trim": { "content": [ - 33, + 34, { "ARRIBA_ARRIBA": { "arriba": "2.4.0" @@ -369,6 +378,9 @@ "ARRIBA_DOWNLOAD": { "arriba_download": "2.4.0" }, + "CTATSPLICING_PREPGENOMELIB": { + "ctat-splicing": "0.0.2" + }, "CTATSPLICING_STARTOCANCERINTRONS": { "ctat-splicing": "0.0.2" }, @@ -599,6 +611,87 @@ "references/star/sjdbList.fromGTF.out.tab", "references/star/sjdbList.out.tab", "references/star/transcriptInfo.tab", + "references/starfusion", + "references/starfusion/ctat_genome_lib_build_dir", + "references/starfusion/ctat_genome_lib_build_dir/AnnotFilterRule.pm", + "references/starfusion/ctat_genome_lib_build_dir/PFAM.domtblout.dat.gz", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/_fusion_annot_lib.idx.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/_prot_info_db.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/annotfiltrule_cp.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/blast_pairs.idx.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/cp_gene_blast_pairs.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/cp_pfam_dat.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/cp_ref_annot_cdna.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/fusion_annot_lib.cp.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/index_pfam_hits.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/index_ref_annot_cdna.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/makeblastdb.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/mm2.splice_bed.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/mm2_genome_idx.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.cdsplus.dfam_masked.fa.cp.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.cdsplus.dfam_masked.fa.idx.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.gtf.gene_spans.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.gtf.mini.sortu.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.gtf.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/ref_genome.fa.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/ref_genome_fai.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/trans.blast.dat.cp.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/trans.blast.dat.index.ok", + "references/starfusion/ctat_genome_lib_build_dir/__chkpts/validate_ctat_genome_lib.ok", + "references/starfusion/ctat_genome_lib_build_dir/blast_pairs.dat.gz", + "references/starfusion/ctat_genome_lib_build_dir/blast_pairs.idx", + "references/starfusion/ctat_genome_lib_build_dir/cancer_splicing_lib", + "references/starfusion/ctat_genome_lib_build_dir/cancer_splicing_lib/cancer_splicing.idx", + "references/starfusion/ctat_genome_lib_build_dir/fusion_annot_lib.gz", + "references/starfusion/ctat_genome_lib_build_dir/fusion_annot_lib.idx", + "references/starfusion/ctat_genome_lib_build_dir/pfam_domains.dbm", + "references/starfusion/ctat_genome_lib_build_dir/refGene.bed", + "references/starfusion/ctat_genome_lib_build_dir/refGene.sort.bed.gz", + "references/starfusion/ctat_genome_lib_build_dir/refGene.sort.bed.gz.tbi", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.cdna.fa", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.cdna.fa.idx", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.cds", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.cdsplus.fa", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.cdsplus.fa.idx", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.gtf", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.gtf.gene_spans", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.gtf.mini.sortu", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.gtf.mm2.splice.bed", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.pep", + "references/starfusion/ctat_genome_lib_build_dir/ref_annot.prot_info.dbm", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.fai", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.mm2", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.ndb", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nhr", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nin", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.njs", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.not", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nsq", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.ntf", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nto", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/Genome", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/Log.out", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/SA", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/SAindex", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/build.ok", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrLength.txt", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrName.txt", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrNameLength.txt", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrStart.txt", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/exonGeTrInfo.tab", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/exonInfo.tab", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/geneInfo.tab", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/genomeParameters.txt", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/sjdbInfo.txt", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/sjdbList.fromGTF.out.tab", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/sjdbList.out.tab", + "references/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/transcriptInfo.tab", + "references/starfusion/ctat_genome_lib_build_dir/trans.blast.align_coords.align_coords.dat", + "references/starfusion/ctat_genome_lib_build_dir/trans.blast.align_coords.align_coords.dbm", + "references/starfusion/ctat_genome_lib_build_dir/trans.blast.dat.gz", "salmon", "salmon/test", "salmon/test_lib_format_counts.json", @@ -641,81 +734,6 @@ "star_for_starfusion/test.unmapped_2.fastq.gz", "star_for_starfusion/testXd.out.bam", "starfusion", - "starfusion/ctat_genome_lib_build_dir", - "starfusion/ctat_genome_lib_build_dir/AnnotFilterRule.pm", - "starfusion/ctat_genome_lib_build_dir/PFAM.domtblout.dat.gz", - "starfusion/ctat_genome_lib_build_dir/__chkpts", - "starfusion/ctat_genome_lib_build_dir/__chkpts/_fusion_annot_lib.idx.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/_prot_info_db.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/annotfiltrule_cp.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/blast_pairs.idx.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/cp_gene_blast_pairs.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/cp_pfam_dat.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/cp_ref_annot_cdna.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/fusion_annot_lib.cp.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/index_pfam_hits.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/index_ref_annot_cdna.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/makeblastdb.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/mm2.splice_bed.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/mm2_genome_idx.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.cdsplus.dfam_masked.fa.cp.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.cdsplus.dfam_masked.fa.idx.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.gtf.gene_spans.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.gtf.mini.sortu.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/ref_annot.gtf.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/ref_genome.fa.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/ref_genome_fai.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/trans.blast.dat.cp.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/trans.blast.dat.index.ok", - "starfusion/ctat_genome_lib_build_dir/__chkpts/validate_ctat_genome_lib.ok", - "starfusion/ctat_genome_lib_build_dir/blast_pairs.dat.gz", - "starfusion/ctat_genome_lib_build_dir/blast_pairs.idx", - "starfusion/ctat_genome_lib_build_dir/fusion_annot_lib.gz", - "starfusion/ctat_genome_lib_build_dir/fusion_annot_lib.idx", - "starfusion/ctat_genome_lib_build_dir/pfam_domains.dbm", - "starfusion/ctat_genome_lib_build_dir/ref_annot.cdna.fa", - "starfusion/ctat_genome_lib_build_dir/ref_annot.cdna.fa.idx", - "starfusion/ctat_genome_lib_build_dir/ref_annot.cds", - "starfusion/ctat_genome_lib_build_dir/ref_annot.cdsplus.fa", - "starfusion/ctat_genome_lib_build_dir/ref_annot.cdsplus.fa.idx", - "starfusion/ctat_genome_lib_build_dir/ref_annot.gtf", - "starfusion/ctat_genome_lib_build_dir/ref_annot.gtf.gene_spans", - "starfusion/ctat_genome_lib_build_dir/ref_annot.gtf.mini.sortu", - "starfusion/ctat_genome_lib_build_dir/ref_annot.gtf.mm2.splice.bed", - "starfusion/ctat_genome_lib_build_dir/ref_annot.pep", - "starfusion/ctat_genome_lib_build_dir/ref_annot.prot_info.dbm", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.fai", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.mm2", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.ndb", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nhr", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nin", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.njs", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.not", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nsq", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.ntf", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.nto", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/Genome", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/Log.out", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/SA", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/SAindex", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/build.ok", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrLength.txt", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrName.txt", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrNameLength.txt", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/chrStart.txt", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/exonGeTrInfo.tab", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/exonInfo.tab", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/geneInfo.tab", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/genomeParameters.txt", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/sjdbInfo.txt", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/sjdbList.fromGTF.out.tab", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/sjdbList.out.tab", - "starfusion/ctat_genome_lib_build_dir/ref_genome.fa.star.idx/transcriptInfo.tab", - "starfusion/ctat_genome_lib_build_dir/trans.blast.align_coords.align_coords.dat", - "starfusion/ctat_genome_lib_build_dir/trans.blast.align_coords.align_coords.dbm", - "starfusion/ctat_genome_lib_build_dir/trans.blast.dat.gz", "starfusion/test.starfusion.abridged.coding_effect.tsv", "starfusion/test.starfusion.abridged.tsv", "starfusion/test.starfusion.fusion_predictions.tsv", @@ -730,8 +748,8 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.3" + "nextflow": "24.10.4" }, - "timestamp": "2025-01-07T13:13:38.690939" + "timestamp": "2025-01-21T15:53:10.332117615" } } \ No newline at end of file From 10d431d184aa768d00799f19eb18362f2386628b Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 22 Jan 2025 16:55:30 +0100 Subject: [PATCH 5/5] add param instead of hardcoded url --- modules/local/ctatsplicing/prepgenomelib/main.nf | 3 +-- nextflow.config | 1 + nextflow_schema.json | 7 +++++++ subworkflows/local/build_references.nf | 3 ++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/local/ctatsplicing/prepgenomelib/main.nf b/modules/local/ctatsplicing/prepgenomelib/main.nf index fd7feebc..0fbf5e9e 100644 --- a/modules/local/ctatsplicing/prepgenomelib/main.nf +++ b/modules/local/ctatsplicing/prepgenomelib/main.nf @@ -8,6 +8,7 @@ process CTATSPLICING_PREPGENOMELIB { input: tuple val(meta), path(genome_lib) + path(cancer_intron_tsv) output: tuple val(meta), path(genome_lib, includeInputs:true), emit: reference @@ -16,8 +17,6 @@ process CTATSPLICING_PREPGENOMELIB { script: def VERSION = '0.0.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ - wget https://data.broadinstitute.org/Trinity/CTAT_RESOURCE_LIB/CANCER_SPLICING_LIB_SUPPLEMENT/cancer_introns.GRCh38.Jun232020.tsv.gz - /usr/local/src/CTAT-SPLICING/prep_genome_lib/ctat-splicing-lib-integration.py \\ --cancer_introns_tsv cancer_introns.*.tsv.gz \\ --genome_lib_dir $genome_lib diff --git a/nextflow.config b/nextflow.config index d83ceecd..fafd6ac2 100644 --- a/nextflow.config +++ b/nextflow.config @@ -90,6 +90,7 @@ params { starfusion_ref = "${params.genomes_base}/starfusion/ctat_genome_lib_build_dir" starindex_ref = "${params.genomes_base}/star" fusionreport_ref = "${params.genomes_base}/fusion_report_db" + ctatsplicing_cancer_introns = "https://data.broadinstitute.org/Trinity/CTAT_RESOURCE_LIB/CANCER_SPLICING_LIB_SUPPLEMENT/cancer_introns.GRCh38.Jun232020.tsv.gz" // Internal file presence checks salmon_index_stub_check = "${params.genomes_base}/salmon/salmon/complete_ref_lens.bin" diff --git a/nextflow_schema.json b/nextflow_schema.json index 0f59e214..aaf8a64a 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -247,6 +247,13 @@ "fa_icon": "far fa-file-code", "description": "Path to file in starfusion references" }, + "ctatsplicing_cancer_introns": { + "type": "string", + "format": "file-path", + "exists": true, + "description": "Path to the cancer introns CSV file to create the CTAT-SPLICING reference with", + "default": "https://data.broadinstitute.org/Trinity/CTAT_RESOURCE_LIB/CANCER_SPLICING_LIB_SUPPLEMENT/cancer_introns.GRCh38.Jun232020.tsv.gz" + }, "starindex": { "type": "boolean", "fa_icon": "far fa-file-code", diff --git a/subworkflows/local/build_references.nf b/subworkflows/local/build_references.nf index c7cb3c31..6ad2c190 100644 --- a/subworkflows/local/build_references.nf +++ b/subworkflows/local/build_references.nf @@ -145,7 +145,8 @@ workflow BUILD_REFERENCES { ch_versions = ch_versions.mix(STARFUSION_BUILD.out.versions) if (params.ctatsplicing || params.all) { CTATSPLICING_PREPGENOMELIB( - STARFUSION_BUILD.out.reference + STARFUSION_BUILD.out.reference, + params.ctatsplicing_cancer_introns ) ch_versions = ch_versions.mix(CTATSPLICING_PREPGENOMELIB.out.versions) ch_starfusion_ref = CTATSPLICING_PREPGENOMELIB.out.reference