-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nf-tests for gem mapping module and update star tests
- Loading branch information
Showing
8 changed files
with
326 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
nextflow_process { | ||
|
||
name "Test Process index" | ||
script "modules/mapping/gem/main.nf" | ||
process "index" | ||
|
||
tag "module" | ||
|
||
test("Should create index using GEM (compressed references)") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = file("${baseDir}/data/genome.fa.gz") | ||
input[1] = file("${baseDir}/data/annotation.gtf.gz") | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert process.success | ||
with(process.out) { | ||
def genomeDir = get(0)[0] | ||
assert path(genomeDir).list().size() == 7 | ||
assert snapshot( | ||
path("${genomeDir}/genome_index.gem"), | ||
path("${genomeDir}/transcript_index.junctions"), | ||
path("${genomeDir}/transcript_index.junctions.fa"), | ||
path("${genomeDir}/transcript_index.junctions.gem"), | ||
path("${genomeDir}/transcript_index.junctions.keys"), | ||
).match() | ||
} | ||
} | ||
|
||
} | ||
|
||
test("Should create index using GEM (uncompressed references)") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = file("${baseDir}/data/genome.fa") | ||
input[1] = file("${baseDir}/data/annotation.gtf") | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert process.success | ||
with(process.out) { | ||
def genomeDir = get(0)[0] | ||
assert path(genomeDir).list().size() == 7 | ||
assert snapshot( | ||
path("${genomeDir}/genome_index.gem"), | ||
path("${genomeDir}/transcript_index.junctions"), | ||
path("${genomeDir}/transcript_index.junctions.fa"), | ||
path("${genomeDir}/transcript_index.junctions.gem"), | ||
path("${genomeDir}/transcript_index.junctions.keys"), | ||
).match() | ||
} | ||
} | ||
|
||
} | ||
|
||
} |
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,30 @@ | ||
{ | ||
"Should create index using GEM (compressed references)": { | ||
"content": [ | ||
"genome_index.gem:md5,ebd155f05251ace3a35ce3edd8816211", | ||
"transcript_index.junctions:md5,a0433e39f0c35e798609ff15332e12d4", | ||
"transcript_index.junctions.fa:md5,be0a28c75266e6969c11e308341810ae", | ||
"transcript_index.junctions.gem:md5,b53971e7b5358fd8cae8bb7f2a4a729d", | ||
"transcript_index.junctions.keys:md5,34985e55c280acd027d2dd32906ad59c" | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.10.0" | ||
}, | ||
"timestamp": "2024-05-02T09:01:47.328374722" | ||
}, | ||
"Should create index using GEM (uncompressed references)": { | ||
"content": [ | ||
"genome_index.gem:md5,ebd155f05251ace3a35ce3edd8816211", | ||
"transcript_index.junctions:md5,a0433e39f0c35e798609ff15332e12d4", | ||
"transcript_index.junctions.fa:md5,be0a28c75266e6969c11e308341810ae", | ||
"transcript_index.junctions.gem:md5,b53971e7b5358fd8cae8bb7f2a4a729d", | ||
"transcript_index.junctions.keys:md5,34985e55c280acd027d2dd32906ad59c" | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.10.0" | ||
}, | ||
"timestamp": "2024-05-02T09:02:27.226869622" | ||
} | ||
} |
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,79 @@ | ||
nextflow_process { | ||
|
||
name "Test Process map" | ||
script "modules/mapping/gem/main.nf" | ||
process "map" | ||
|
||
tag "module" | ||
|
||
setup { | ||
run("index") { | ||
script "modules/mapping/gem/main.nf" | ||
process { | ||
""" | ||
input[0] = file("${baseDir}/data/genome.fa") | ||
input[1] = file("${baseDir}/data/annotation.gtf") | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("Should align reads to the reference using GEM (compressed annotation)") { | ||
|
||
when { | ||
params { | ||
maxMismatches = 4 | ||
maxMultimaps = 10 | ||
} | ||
process { | ||
""" | ||
def fastqs = file("${baseDir}/data/test1_*.fastq.gz") | ||
def qScore = fastq(fastqs[0]).qualityScore() | ||
input[0] = file("${baseDir}/data/annotation.gtf.gz") | ||
input[1] = index.out | ||
input[2] = Channel.from( | ||
[ | ||
[ "sample1", "test1", fastqs, "fastq", ["fqRd1", "fqRd2"], qScore] | ||
] | ||
) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert process.success | ||
assert snapshot(process.out).match() | ||
} | ||
|
||
} | ||
|
||
test("Should align reads to the reference using GEM (uncompressed annotation)") { | ||
|
||
when { | ||
params { | ||
maxMismatches = 4 | ||
maxMultimaps = 10 | ||
} | ||
process { | ||
""" | ||
def fastqs = file("${baseDir}/data/test1_*.fastq.gz") | ||
def qScore = fastq(fastqs[0]).qualityScore() | ||
input[0] = file("${baseDir}/data/annotation.gtf") | ||
input[1] = index.out | ||
input[2] = Channel.from( | ||
[ | ||
[ "sample1", "test1", fastqs, "fastq", ["fqRd1", "fqRd2"], qScore] | ||
] | ||
) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert process.success | ||
assert snapshot(process.out).match() | ||
} | ||
|
||
} | ||
|
||
} |
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,140 @@ | ||
{ | ||
"Should align reads to the reference using GEM (compressed annotation)": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
"sample1", | ||
"test1", | ||
"sample1_m4_n10_toGenome.bam:md5,48faeddd5179ce7b5d629ad937851b45", | ||
"bam", | ||
"GenomeAlignments", | ||
true | ||
] | ||
], | ||
"1": [ | ||
|
||
], | ||
"2": [ | ||
[ | ||
"sample1", | ||
"test1", | ||
"sample1_m4_n10_toGenome.bam.bai:md5,f0b712d99d68ae3132bdb287ed5a5e5d", | ||
"bai", | ||
"GenomeAlignmentsIndex", | ||
true | ||
] | ||
], | ||
"3": [ | ||
|
||
], | ||
"4": [ | ||
|
||
], | ||
"genomeAlignments": [ | ||
[ | ||
"sample1", | ||
"test1", | ||
"sample1_m4_n10_toGenome.bam:md5,48faeddd5179ce7b5d629ad937851b45", | ||
"bam", | ||
"GenomeAlignments", | ||
true | ||
] | ||
], | ||
"genomeAlignmentsIndices": [ | ||
[ | ||
"sample1", | ||
"test1", | ||
"sample1_m4_n10_toGenome.bam.bai:md5,f0b712d99d68ae3132bdb287ed5a5e5d", | ||
"bai", | ||
"GenomeAlignmentsIndex", | ||
true | ||
] | ||
], | ||
"junctions": [ | ||
|
||
], | ||
"stats": [ | ||
|
||
], | ||
"transcriptomeAlignments": [ | ||
|
||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.10.0" | ||
}, | ||
"timestamp": "2024-05-02T08:54:34.740923082" | ||
}, | ||
"Should align reads to the reference using GEM (uncompressed annotation)": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
"sample1", | ||
"test1", | ||
"sample1_m4_n10_toGenome.bam:md5,48faeddd5179ce7b5d629ad937851b45", | ||
"bam", | ||
"GenomeAlignments", | ||
true | ||
] | ||
], | ||
"1": [ | ||
|
||
], | ||
"2": [ | ||
[ | ||
"sample1", | ||
"test1", | ||
"sample1_m4_n10_toGenome.bam.bai:md5,f0b712d99d68ae3132bdb287ed5a5e5d", | ||
"bai", | ||
"GenomeAlignmentsIndex", | ||
true | ||
] | ||
], | ||
"3": [ | ||
|
||
], | ||
"4": [ | ||
|
||
], | ||
"genomeAlignments": [ | ||
[ | ||
"sample1", | ||
"test1", | ||
"sample1_m4_n10_toGenome.bam:md5,48faeddd5179ce7b5d629ad937851b45", | ||
"bam", | ||
"GenomeAlignments", | ||
true | ||
] | ||
], | ||
"genomeAlignmentsIndices": [ | ||
[ | ||
"sample1", | ||
"test1", | ||
"sample1_m4_n10_toGenome.bam.bai:md5,f0b712d99d68ae3132bdb287ed5a5e5d", | ||
"bai", | ||
"GenomeAlignmentsIndex", | ||
true | ||
] | ||
], | ||
"junctions": [ | ||
|
||
], | ||
"stats": [ | ||
|
||
], | ||
"transcriptomeAlignments": [ | ||
|
||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.10.0" | ||
}, | ||
"timestamp": "2024-05-02T08:55:30.059497532" | ||
} | ||
} |
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
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
Oops, something went wrong.