Skip to content

Commit

Permalink
fix: Make sure the gtf is unzipped
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundmiller committed Apr 27, 2024
1 parent ca68e9b commit 9940414
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
5 changes: 4 additions & 1 deletion workflows/nascent.nf
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ workflow NASCENT {
ch_versions = ch_versions.mix(FASTQ_ALIGN_HISAT2.out.versions)
} else if (!params.skip_alignment && params.aligner == 'star') {
if(!ch_star_index) {
ch_star_index = STAR_GENOMEGENERATE ( ch_fasta, [ [:], ch_gtf ] ).index
ch_star_index = STAR_GENOMEGENERATE (
ch_fasta,
PREPARE_GENOME.out.gtf.map { [[:], it] }
).index
} else if (ch_star_index.endsWith('.tar.gz')) {
ch_star_index = UNTAR_STAR_INDEX ( [ [:], ch_star_index ] ).untar
ch_versions = ch_versions.mix(UNTAR_STAR_INDEX.out.versions)
Expand Down
18 changes: 18 additions & 0 deletions workflows/tests/star.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,22 @@ nextflow_pipeline {
).match()
}
}

test("Should run with gzipped gtf") {

when {
params {
outdir = "$outputDir"
aligner = "star"
gtf = "https://raw.githubusercontent.com/nf-core/test-datasets/nascent/reference/genes_chr21.gtf.gz"
}
}

then {
assert workflow.success
assert snapshot(
workflow.trace.tasks().size(),
).match()
}
}
}
10 changes: 10 additions & 0 deletions workflows/tests/star.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"Should run with gzipped gtf": {
"content": [
140
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.03.0"
},
"timestamp": "2024-04-27T12:40:13.788464472"
},
"Should run with STAR (default)": {
"content": [
139
Expand Down

0 comments on commit 9940414

Please sign in to comment.