Skip to content

fix starfusion local module from rnafusion to migrate it to nf-core/m… #8521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 1 deletion modules/nf-core/starfusion/build/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ dependencies:
- bioconda::dfam=3.7
- bioconda::hmmer=3.4
- bioconda::minimap2=2.28
- bioconda::star-fusion=1.14.0
- bioconda::star-fusion=1.15.0
23 changes: 19 additions & 4 deletions modules/nf-core/starfusion/build/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ process STARFUSION_BUILD {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/be/bed86145102fdf7e381e1a506a4723676f98b4bbe1db5085d02213cef18525c9/data' :
'community.wave.seqera.io/library/dfam_hmmer_minimap2_star-fusion:aa3a8e3951498552'}"
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/b0/b0a58b9d30f9c72b22135f85746e10596d568c40a7d9634b13e0a0749cacd21b/data' :
'community.wave.seqera.io/library/dfam_hmmer_minimap2_star-fusion:c2bc5374f142ac93'}"

input:
tuple val(meta), path(fasta)
tuple val(meta2), path(gtf)
path fusion_annot_lib
val dfam_species
val dfam_version
val pfam_version

output:
tuple val(meta), path("${prefix}_genome_lib_build_dir"), emit: reference
Expand All @@ -24,18 +26,30 @@ process STARFUSION_BUILD {
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
"""
wget http://ftp.ebi.ac.uk/pub/databases/Pfam/releases/Pfam${pfam_version}/Pfam-A.hmm.gz --no-check-certificate
wget https://www.dfam.org/releases/Dfam_${dfam_version}/infrastructure/dfamscan/${dfam_species}_dfam.hmm --no-check-certificate
wget https://www.dfam.org/releases/Dfam_${dfam_version}/infrastructure/dfamscan/${dfam_species}_dfam.hmm.h3f --no-check-certificate
wget https://www.dfam.org/releases/Dfam_${dfam_version}/infrastructure/dfamscan/${dfam_species}_dfam.hmm.h3i --no-check-certificate
wget https://www.dfam.org/releases/Dfam_${dfam_version}/infrastructure/dfamscan/${dfam_species}_dfam.hmm.h3m --no-check-certificate
wget https://www.dfam.org/releases/Dfam_${dfam_version}/infrastructure/dfamscan/${dfam_species}_dfam.hmm.h3p --no-check-certificate
gunzip Pfam-A.hmm.gz && hmmpress Pfam-A.hmm
wget https://data.broadinstitute.org/Trinity/CTAT_RESOURCE_LIB/AnnotFilterRule.pm -O AnnotFilterRule.pm --no-check-certificate
Comment on lines +29 to +36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be better to have these as inputs for your process. Hardcoding URLs is wildly considered to be a bad practice as the longevity of these cannot be guaranteed.



prep_genome_lib.pl \\
--genome_fa $fasta \\
--gtf $gtf \\
--dfam_db ${dfam_species} \\
--pfam_db current \\
--dfam_db ${dfam_species}_dfam.hmm \\
--pfam_db Pfam-A.hmm \\
--fusion_annot_lib $fusion_annot_lib \\
--annot_filter_rule AnnotFilterRule.pm \\
--CPU $task.cpus \\
--output_dir ${prefix}_genome_lib_build_dir \\
${args}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
wget: \$(wget --version | head -1 | cut -d ' ' -f 3)
STAR-Fusion: \$(STAR-Fusion --version 2>&1 | grep -i 'version' | sed 's/STAR-Fusion version: //')
END_VERSIONS
"""
Expand Down Expand Up @@ -128,6 +142,7 @@ process STARFUSION_BUILD {

cat <<-END_VERSIONS > versions.yml
"${task.process}":
wget: \$(wget --version | head -1 | cut -d ' ' -f 3)
STAR-Fusion: \$(STAR-Fusion --version 2>&1 | grep -i 'version' | sed 's/STAR-Fusion version: //')
END_VERSIONS
"""
Expand Down
9 changes: 9 additions & 0 deletions modules/nf-core/starfusion/build/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ input:
- - dfam_species:
type: string
description: Dfam species name
- - dfam_version:
type: string
description: DNA transposable element database version, required for repeat
masking. Values such as '3.4' are accepted (will automatically pull the resources
from dfam).
- - pfam_version:
type: string
description: Protein families database version, to get domain information. Values
such as '37.4' are accepted (will automatically pull the resources from Pfam).
output:
- reference:
- meta:
Expand Down
10 changes: 8 additions & 2 deletions modules/nf-core/starfusion/build/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ nextflow_process {
]

input [2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/CTAT_HumanFusionLib.mini.dat.gz')
input [3] = "human"
input [3] = "homo_sapiens"
input [4] = "3.8"
input [5] = "37.4"

"""
}
}
Expand Down Expand Up @@ -124,7 +127,10 @@ nextflow_process {
]

input [2] = file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/master/CTAT_HumanFusionLib.mini.dat.gz")
input [3] = "human"
input [3] = "homo_sapiens"
input [4] = "3.8"
input [5] = "37.4"

"""
}
}
Expand Down
16 changes: 8 additions & 8 deletions modules/nf-core/starfusion/build/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"STARFUSION_BUILD - human - minigenome": {
"content": [
"AnnotFilterRule.pm:md5,5391fcc58d9c71cd1f0e45668c5ec597",
"AnnotFilterRule.pm:md5,f94966013cd0df9624a6dda0b75fefa0",
"blast_pairs.dat.gz",
"blast_pairs.idx",
"annotfiltrule_cp.ok",
Expand Down Expand Up @@ -75,14 +75,14 @@
"trans.blast.align_coords.align_coords.dbm",
"trans.blast.dat.gz:md5,85ba5ea96c566f751ad83a3e4b8ab128",
[
"versions.yml:md5,4a6ed47cb345f2a5af4d9f12b7918cdb"
"versions.yml:md5,99533491facb961016dafc1d45a8101e"
]
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
"nextflow": "25.04.2"
},
"timestamp": "2025-03-31T19:58:54.583793842"
"timestamp": "2025-05-20T17:11:52.797058494"
},
"STARFUSION_BUILD - human - minigenome - stub": {
"content": [
Expand Down Expand Up @@ -173,7 +173,7 @@
]
],
"1": [
"versions.yml:md5,4a6ed47cb345f2a5af4d9f12b7918cdb"
"versions.yml:md5,99533491facb961016dafc1d45a8101e"
],
"reference": [
[
Expand Down Expand Up @@ -261,14 +261,14 @@
]
],
"versions": [
"versions.yml:md5,4a6ed47cb345f2a5af4d9f12b7918cdb"
"versions.yml:md5,99533491facb961016dafc1d45a8101e"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
"nextflow": "25.04.2"
},
"timestamp": "2025-03-28T23:09:01.034159236"
"timestamp": "2025-05-19T19:52:36.457569412"
}
}
Loading