Skip to content

Commit

Permalink
More data path update: salmon and tximeta/tximport (nf-core#4996)
Browse files Browse the repository at this point in the history
* update data path

* update data path

* typo kallisto -> salmon

* another typo kallisto -> salmon
  • Loading branch information
maxulysse authored Feb 29, 2024
1 parent 701ae34 commit 03a8562
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 54 deletions.
10 changes: 5 additions & 5 deletions modules/nf-core/salmon/quant/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ nextflow_process {
"""
input[0] = Channel.of([
[ id:'test', single_end: true ], // meta map
[
[
file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true),
file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_2.fastq.gz", checkIfExists: true)
]
Expand Down Expand Up @@ -132,10 +132,10 @@ nextflow_process {
input[0] = Channel.of([
[ id:'test', single_end:false ], // meta map
[
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test2_1_fastq_gz'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test2_2_fastq_gz'], checkIfExists: true)
file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true),
file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_2.fastq.gz", checkIfExists: true),
file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test2_1.fastq.gz", checkIfExists: true),
file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test2_2.fastq.gz", checkIfExists: true)
]
])
input[1] = SALMON_INDEX.out.index
Expand Down
90 changes: 44 additions & 46 deletions modules/nf-core/tximeta/tximport/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,31 @@ nextflow_process {
tag "untar"

test("saccharomyces_cerevisiae - kallisto - gtf") {
setup {

setup {

run("UNTAR") {
script "../../../untar/main.nf"
process {
"""
input[0] = [
[ id:'test'], // meta map
file(params.test_data['saccharomyces_cerevisiae']['genome']['kallisto_results'], checkIfExists: true)
]
input[0] = Channel.of([
[ id:'test'], // meta map
file(params.modules_testdata_base_path + 'genomics/eukaryotes/saccharomyces_cerevisiae/kallisto_results.tar.gz', checkIfExists: true)
])
"""
}
}
run("CUSTOM_TX2GENE") {
run("CUSTOM_TX2GENE") {
script "../../../custom/tx2gene/main.nf"
process {
"""
input[0] = [
[ id:'test'], // meta map
file(params.test_data['saccharomyces_cerevisiae']['genome']['genome_gfp_gtf'], checkIfExists: true)
]
input[0] = Channel.of([
[ id:'test'], // meta map
file(params.modules_testdata_base_path + 'genomics/eukaryotes/saccharomyces_cerevisiae/genome_gfp.gtf', checkIfExists: true)
])
input[1] = UNTAR.out.untar.map { meta, dir -> [ meta, dir.listFiles().collect() ] }
input[2] = 'kallisto'
input[3] = 'gene_id'
input[3] = 'gene_id'
input[4] = 'gene_name'
"""
}
Expand All @@ -57,22 +57,21 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.tpm_gene).match('tpm_gene_kallisto') },
{ assert snapshot(process.out.counts_gene).match('counts_gene_kallisto') },
{ assert snapshot(process.out.counts_gene_length_scaled).match('counts_gene_length_scaled_kallisto') },
{ assert snapshot(process.out.counts_gene_scaled).match('counts_gene_scaled_kallisto') },
{ assert snapshot(process.out.lengths_gene).match('lengths_gene_kallisto') },
{ assert snapshot(process.out.tpm_transcript).match('tpm_transcript_kallisto') },
{ assert snapshot(process.out.counts_transcript).match('counts_transcript_kallisto') },
{ assert snapshot(process.out.lengths_gene).match('lengths_gene_kallisto') },
{ assert snapshot(process.out.lengths_transcript).match('lengths_transcript_kallisto') },
{ assert snapshot(process.out.versions).match('versions_kallisto') },
{ assert snapshot(process.out.tpm_gene).match('tpm_gene_kallisto') },
{ assert snapshot(process.out.tpm_transcript).match('tpm_transcript_kallisto') },
{ assert snapshot(process.out.versions).match('versions_kallisto') }
)
}

}

test("saccharomyces_cerevisiae - kallisto - gtf - stub") {

options "-stub"

when {
Expand All @@ -88,45 +87,45 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.tpm_gene).match('tpm_gene_kallisto -stub') },
{ assert snapshot(process.out.counts_gene).match('counts_gene_kallisto - stub') },
{ assert snapshot(process.out.counts_gene_length_scaled).match('counts_gene_length_scaled_kallisto - stub') },
{ assert snapshot(process.out.counts_gene_scaled).match('counts_gene_scaled_kallisto - stub') },
{ assert snapshot(process.out.lengths_gene).match('lengths_gene_kallisto - stub') },
{ assert snapshot(process.out.tpm_transcript).match('tpm_transcript_kallisto - stub') },
{ assert snapshot(process.out.counts_transcript).match('counts_transcript_kallisto - stub') },
{ assert snapshot(process.out.lengths_gene).match('lengths_gene_kallisto - stub') },
{ assert snapshot(process.out.lengths_transcript).match('lengths_transcript_kallisto - stub') },
{ assert snapshot(process.out.versions).match('versions_kallisto - stub') },
{ assert snapshot(process.out.tpm_gene).match('tpm_gene_kallisto - stub') },
{ assert snapshot(process.out.tpm_transcript).match('tpm_transcript_kallisto - stub') },
{ assert snapshot(process.out.versions).match('versions_kallisto - stub') }
)
}

}
test("saccharomyces_cerevisiae - salmon - gtf") {
setup {

setup {

run("UNTAR") {
script "../../../untar/main.nf"
process {
"""
input[0] = [
[ id:'test'], // meta map
file(params.test_data['saccharomyces_cerevisiae']['genome']['salmon_results'], checkIfExists: true)
]
input[0] = Channel.of([
[ id:'test'], // meta map
file(params.modules_testdata_base_path + 'genomics/eukaryotes/saccharomyces_cerevisiae/salmon_results.tar.gz', checkIfExists: true)
])
"""
}
}
run("CUSTOM_TX2GENE") {
run("CUSTOM_TX2GENE") {
script "../../../custom/tx2gene/main.nf"
process {
"""
input[0] = [
[ id:'test'], // meta map
file(params.test_data['saccharomyces_cerevisiae']['genome']['genome_gfp_gtf'], checkIfExists: true)
]
input[0] = Channel.of([
[ id:'test'], // meta map
file(params.modules_testdata_base_path + 'genomics/eukaryotes/saccharomyces_cerevisiae/genome_gfp.gtf', checkIfExists: true)
])
input[1] = UNTAR.out.untar.map { meta, dir -> [ meta, dir.listFiles().collect() ] }
input[2] = 'salmon'
input[3] = 'gene_id'
input[3] = 'gene_id'
input[4] = 'gene_name'
"""
}
Expand All @@ -147,22 +146,22 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.tpm_gene).match('tpm_gene_salmon') },
{ assert snapshot(process.out.counts_gene).match('counts_gene_salmon') },
{ assert snapshot(process.out.counts_gene_length_scaled).match('counts_gene_length_scaled_salmon') },
{ assert snapshot(process.out.counts_gene_scaled).match('counts_gene_scaled_salmon') },
{ assert snapshot(process.out.lengths_gene).match('lengths_gene_salmon') },
{ assert snapshot(process.out.tpm_transcript).match('tpm_transcript_salmon') },
{ assert snapshot(process.out.counts_transcript).match('counts_transcript_salmon') },
{ assert snapshot(process.out.lengths_gene).match('lengths_gene_salmon') },
{ assert snapshot(process.out.lengths_transcript).match('lengths_transcript_salmon') },
{ assert snapshot(process.out.versions).match('versions_salmon') },
{ assert snapshot(process.out.tpm_gene).match('tpm_gene_salmon') },
{ assert snapshot(process.out.tpm_transcript).match('tpm_transcript_salmon') },
{ assert snapshot(process.out.versions).match('versions_salmon') }
)
}

}

test("saccharomyces_cerevisiae - salmon - gtf - stub") {

options "-stub"

when {
Expand All @@ -178,18 +177,17 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.tpm_gene).match('tpm_gene_salmon -stub') },
{ assert snapshot(process.out.counts_gene).match('counts_gene_salmon - stub') },
{ assert snapshot(process.out.counts_gene_length_scaled).match('counts_gene_length_scaled_salmon - stub') },
{ assert snapshot(process.out.counts_gene_scaled).match('counts_gene_scaled_salmon - stub') },
{ assert snapshot(process.out.lengths_gene).match('lengths_gene_salmon - stub') },
{ assert snapshot(process.out.tpm_transcript).match('tpm_transcript_salmon - stub') },
{ assert snapshot(process.out.counts_transcript).match('counts_transcript_salmon - stub') },
{ assert snapshot(process.out.lengths_gene).match('lengths_gene_salmon - stub') },
{ assert snapshot(process.out.lengths_transcript).match('lengths_transcript_salmon - stub') },
{ assert snapshot(process.out.versions).match('versions_salmon - stub') },
{ assert snapshot(process.out.tpm_gene).match('tpm_gene_salmon - stub') },
{ assert snapshot(process.out.tpm_transcript).match('tpm_transcript_salmon - stub') },
{ assert snapshot(process.out.versions).match('versions_salmon - stub') }
)
}

}
}

6 changes: 3 additions & 3 deletions modules/nf-core/tximeta/tximport/tests/main.nf.test.snap

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

0 comments on commit 03a8562

Please sign in to comment.