-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into remove_starfusion_download
- Loading branch information
Showing
5 changed files
with
199 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
115 changes: 115 additions & 0 deletions
115
subworkflows/local/starfusion_workflow/tests/main.nf.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
nextflow_workflow { | ||
|
||
name "Test Subworkflow STARFUSION_WORKFLOW" | ||
script "../main.nf" | ||
workflow "STARFUSION_WORKFLOW" | ||
tag "subworkflow" | ||
tag "star" | ||
tag "star/genomegenerate" | ||
tag "star/align" | ||
|
||
|
||
test("STARFUSION_WORKFLOW - Homo sapiens - FASTQs minigenome") { | ||
config './nextflow.config' | ||
|
||
setup { | ||
run("STAR_GENOMEGENERATE") { | ||
script "../../../../modules/nf-core/star/genomegenerate/main.nf" | ||
process { | ||
""" | ||
// FASTA | ||
input[0] = Channel.fromPath( | ||
"https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/master/minigenome.fa", checkIfExists: true | ||
) | ||
.map{ [[id: it.getName() ], it ]} | ||
// GTF | ||
input[1] = Channel.fromPath( | ||
"https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/master/minigenome.gtf", checkIfExists: true | ||
) | ||
.map{ [[id: it.getName() ], it ]} | ||
""" | ||
} | ||
} | ||
|
||
run("STARFUSION_BUILD") { | ||
script "../../../../modules/local/starfusion/build/main.nf" | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'minigenome fasta' ], | ||
file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/master/minigenome.fa") | ||
] | ||
input[1] = [ | ||
[ id:'minigenome gtf' ], | ||
file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/master/minigenome.gtf") | ||
] | ||
input [2] = file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/master/CTAT_HumanFusionLib.mini.dat.gz") | ||
input [3] = "human" | ||
""" | ||
} | ||
} | ||
} | ||
|
||
when { | ||
workflow { | ||
""" | ||
// ch_reads | ||
input[0] = Channel.of( | ||
[ | ||
[ id: "test_fastqs" ], | ||
[ | ||
file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/v0.0.1/rnaseq_1.fastq.gz", checkIfExists: true), | ||
file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/v0.0.1/rnaseq_2.fastq.gz", checkIfExists: true) | ||
] | ||
] ) | ||
// ch_gtf | ||
input[1] = | ||
Channel.fromPath( | ||
"https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/master/minigenome.gtf", checkIfExists: true | ||
) | ||
.map{ [ [ id: it.name ], it ] } | ||
// ch_starindex_ref | ||
input[2] = STAR_GENOMEGENERATE.out.index | ||
// ch_fasta | ||
input[3] = | ||
Channel.fromPath( | ||
"https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/master/minigenome.fa", checkIfExists: true | ||
) | ||
.map{ [ [ id: it.name ], it ] } | ||
// ch_starfusion_ref | ||
input[4] = STARFUSION_BUILD.out.reference | ||
""" | ||
} | ||
params { | ||
starfusion = true | ||
cram = 'starfusion' | ||
outdir = "$outputDir" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success }, | ||
{ assert snapshot( | ||
workflow.out.fusions, | ||
file(workflow.out.star_stats[0][1]).name, | ||
workflow.out.star_gene_count, | ||
workflow.out.ch_bam_sorted, | ||
workflow.out.ch_bam_sorted_indexed, | ||
workflow.out.versions | ||
).match() } | ||
) | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
} |
38 changes: 38 additions & 0 deletions
38
subworkflows/local/starfusion_workflow/tests/main.nf.test.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"STARFUSION_WORKFLOW - Homo sapiens - FASTQs minigenome": { | ||
"content": [ | ||
[ | ||
[ | ||
{ | ||
"id": "test_fastqs" | ||
}, | ||
"test_fastqs.starfusion.fusion_predictions.tsv:md5,abe17134a231642edf9351e4964e8a97" | ||
] | ||
], | ||
"test_fastqs.Log.final.out", | ||
[ | ||
[ | ||
{ | ||
"id": "test_fastqs" | ||
}, | ||
"test_fastqs.ReadsPerGene.out.tab:md5,8e0d42deeea09924d5c7ba3147bbfd78" | ||
] | ||
], | ||
[ | ||
|
||
], | ||
[ | ||
|
||
], | ||
[ | ||
"versions.yml:md5,afde4f2fd6056df81e322b3c35ab7a8a", | ||
"versions.yml:md5,e53f1ec32bc78a33f99892e42274833a" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2024-12-23T18:25:52.838411738" | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
subworkflows/local/starfusion_workflow/tests/nextflow.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
process { | ||
withName: 'STAR_FOR_STARFUSION' { | ||
ext.args = '--twopassMode Basic \ | ||
--outReadsUnmapped None \ | ||
--readFilesCommand zcat \ | ||
--outSAMtype BAM SortedByCoordinate \ | ||
--outSAMstrandField intronMotif \ | ||
--outSAMunmapped Within \ | ||
--chimSegmentMin 12 \ | ||
--chimJunctionOverhangMin 8 \ | ||
--chimOutJunctionFormat 1 \ | ||
--alignSJDBoverhangMin 10 \ | ||
--alignMatesGapMax 100000 \ | ||
--alignIntronMax 100000 \ | ||
--alignSJstitchMismatchNmax 5 -1 5 5 \ | ||
--chimMultimapScoreRange 3 \ | ||
--chimScoreJunctionNonGTAG -4 \ | ||
--chimMultimapNmax 20 \ | ||
--chimNonchimScoreDropMin 10 \ | ||
--peOverlapNbasesMin 12 \ | ||
--peOverlapMMp 0.1 \ | ||
--alignInsertionFlush Right \ | ||
--alignSplicedMateMapLminOverLmate 0 \ | ||
--alignSplicedMateMapLmin 30 \ | ||
--chimOutType Junctions \ | ||
--quantMode GeneCounts' | ||
} | ||
|
||
withName: 'SAMTOOLS_INDEX_FOR_STARFUSION_CRAM' { | ||
ext.prefix = { "${meta.id}.star_for_starfusion.Aligned.sortedByCoord.out" } | ||
} | ||
|
||
withName: 'SAMTOOLS_VIEW_FOR_STARFUSION' { | ||
ext.args = { "--output-fmt cram" } | ||
ext.prefix = { "${meta.id}.star_for_starfusion.Aligned.sortedByCoord.out" } | ||
} | ||
} |