Skip to content
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

nf-test quantify pseudoalignment #1246

Merged
merged 13 commits into from
Mar 12, 2024
Merged
2 changes: 1 addition & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
},
"summarizedexperiment/summarizedexperiment": {
"branch": "master",
"git_sha": "874dace043f1400fddca70dc9786fa4e82e6f5ac",
"git_sha": "05a252a330273c67795aed2b18e86c53c4c9382a",
"installed_by": ["modules"]
},
"trimgalore": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

148 changes: 148 additions & 0 deletions subworkflows/local/quantify_pseudo_alignment/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
nextflow_workflow {

name "Test Workflow QUANTIFY_PSEUDO_ALIGNMENT"
script "../main.nf"
workflow "QUANTIFY_PSEUDO_ALIGNMENT"

tag 'SALMON_QUANT'
tag 'KALLISTO_QUANT'
tag 'CUSTOM_TX2GENE'
tag 'TXIMETA_TXIMPORT'
tag 'SUMMARIZEDEXPERIMENT_SUMMARIZEDEXPERIMENT'

test("salmon") {

setup {
run("SALMON_INDEX") {
script "../../../../modules/nf-core/salmon/index/main.nf"
process {
"""
input[0] = Channel.of([file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/genome.fasta", checkIfExists: true)])
input[1] = Channel.of([file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/transcriptome.fasta", checkIfExists: true)])
"""
}
}
}

when {
workflow {
"""
input[0] = [
[ id: 'samplesheet' ],
file(params.pipelines_testdata_base_path + '/csv/samplesheet_micro.csv', checkIfExists: true)
]
input[1] = [
[ id: 'test' ],
[
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz', checkIfExists: true)
]
]
input[2] = SALMON_INDEX.out.index
input[3] = Channel.of(file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/transcriptome.fasta", checkIfExists: true))
input[4] = Channel.of(file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/genome.gtf", checkIfExists: true))
input[5] = 'gene_id'
input[6] = 'gene_name'
input[7] = 'salmon'
input[8] = false
input[9] = 'A'
input[10] = null
input[11] = null
"""
}
}

then {
assertAll(
{ assert workflow.success },
{ assert snapshot(
workflow.out.tpm_gene,
workflow.out.counts_gene,
workflow.out.lengths_gene,
workflow.out.counts_gene_length_scaled,
workflow.out.tpm_transcript,
workflow.out.lengths_transcript,
workflow.out.merged_gene_rds,
workflow.out.merged_gene_rds_length_scaled,
workflow.out.merged_gene_rds_scaled,
workflow.out.merged_counts_transcript,
workflow.out.merged_tpm_transcript,
workflow.out.merged_transcript_rds,
workflow.out.versions
).match()
}
)
}

}

test("kallisto") {

setup {
run("KALLISTO_INDEX") {
script "../../../../modules/nf-core/kallisto/index/main.nf"
process {
"""
input[0] = Channel.of([
[ id:'transcriptome' ], // meta map
file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/transcriptome.fasta", checkIfExists: true)
])
"""
}
}
}


when {
workflow {
"""
input[0] = [
[ id: 'samplesheet' ],
file(params.pipelines_testdata_base_path + '/csv/samplesheet_micro.csv', checkIfExists: true)
]
input[1] = [
[ id: 'test' ],
[
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz', checkIfExists: true)
]
]
input[2] = KALLISTO_INDEX.out.index
input[3] = Channel.of(file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/transcriptome.fasta", checkIfExists: true))
input[4] = Channel.of(file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/genome.gtf", checkIfExists: true))
input[5] = 'gene_id'
input[6] = 'gene_name'
input[7] = 'kallisto'
input[8] = null
input[9] = null
input[10] = []
input[11] = []
"""
}
}

then {
assertAll(
{ assert workflow.success },
{ assert snapshot(
workflow.out.tpm_gene,
workflow.out.counts_gene,
workflow.out.lengths_gene,
workflow.out.counts_gene_length_scaled,
workflow.out.tpm_transcript,
workflow.out.lengths_transcript,
workflow.out.merged_gene_rds,
workflow.out.merged_gene_rds_length_scaled,
workflow.out.merged_gene_rds_scaled,
workflow.out.merged_counts_transcript,
workflow.out.merged_tpm_transcript,
workflow.out.merged_transcript_rds,
workflow.out.versions
).match()
}
)
}

}

}
Loading
Loading