Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions modules/nf-core/anota2seq/anota2seqrun/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ process ANOTA2SEQ_ANOTA2SEQRUN {
tuple val(meta2), path(samplesheet), path(counts)

output:
tuple val(meta), path("*.translated_mRNA.anota2seq.results.tsv") , emit: translated_mrna
tuple val(meta), path("*.total_mRNA.anota2seq.results.tsv") , emit: total_mrna
tuple val(meta), path("*.translation.anota2seq.results.tsv") , emit: translation
tuple val(meta), path("*.buffering.anota2seq.results.tsv") , emit: buffering
tuple val(meta), path("*.mRNA_abundance.anota2seq.results.tsv") , emit: mrna_abundance
tuple val(meta), path("*.translated_mRNA.anota2seq.results.tsv") , emit: translated_mrna, optional: true
tuple val(meta), path("*.total_mRNA.anota2seq.results.tsv") , emit: total_mrna, optional: true
tuple val(meta), path("*.translation.anota2seq.results.tsv") , emit: translation, optional: true
tuple val(meta), path("*.buffering.anota2seq.results.tsv") , emit: buffering, optional: true
tuple val(meta), path("*.mRNA_abundance.anota2seq.results.tsv") , emit: mrna_abundance, optional: true
tuple val(meta), path("*.Anota2seqDataSet.rds") , emit: rdata
tuple val(meta), path("*.fold_change.png") , emit: fold_change_plot
tuple val(meta), path("*.interaction_p_distribution.pdf") , emit: interaction_p_distribution_plot , optional: true
Expand Down
26 changes: 18 additions & 8 deletions modules/nf-core/anota2seq/anota2seqrun/templates/anota2seqrun.r
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ opt <- list(
reference_level = '$reference',
target_level = '$target',
sample_id_col = "sample",
gene_id_col = "gene_id",
samples_pairing_col = NULL,
samples_batch_col = NULL,
subset_to_contrast_samples = FALSE,
Expand Down Expand Up @@ -366,14 +367,23 @@ for (analysis in c("translated mRNA", "total mRNA", "translation", "buffering",
selContrast = 1
)

write.table(
output,
file = paste(opt\$output_prefix, sub(' ', '_', analysis), 'anota2seq.results.tsv', sep = '.'),
col.names = TRUE,
row.names = FALSE,
sep = '\t',
quote = FALSE
)
# Only write file if there are results
if (!is.null(output) && nrow(output) > 0) {
# Add gene IDs as the first column
output_with_genes <- cbind(
setNames(data.frame(rownames(output)), opt\$gene_id_col),
output
)

write.table(
output_with_genes,
file = paste(opt\$output_prefix, sub(' ', '_', analysis), 'anota2seq.results.tsv', sep = '.'),
col.names = TRUE,
row.names = FALSE,
sep = '\t',
quote = FALSE
)
}
}

# Fold change plot
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/anota2seq/anota2seqrun/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ nextflow_process {
process.out.translated_mrna,
process.out.total_mrna,
process.out.translation,
process.out.mrna_abundance,
process.out.buffering,
process.out.versions,
file(process.out.fold_change_plot[0][1]).name,
file(process.out.interaction_p_distribution_plot[0][1]).name,
Expand Down
14 changes: 7 additions & 7 deletions modules/nf-core/anota2seq/anota2seqrun/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@
{
"id": "treatment_vs_control"
},
"treatment_vs_control.translated_mRNA.anota2seq.results.tsv:md5,2c8a7dc1841d2852fc68e5d65e89a8e1"
"treatment_vs_control.translated_mRNA.anota2seq.results.tsv:md5,e777e335d484831520e53c51db75a47c"
]
],
[
[
{
"id": "treatment_vs_control"
},
"treatment_vs_control.total_mRNA.anota2seq.results.tsv:md5,69778181d0ec4f50c11c99dfed7e9090"
"treatment_vs_control.total_mRNA.anota2seq.results.tsv:md5,ea8044585fcbf133b284e7a96bf2a4a8"
]
],
[
[
{
"id": "treatment_vs_control"
},
"treatment_vs_control.translation.anota2seq.results.tsv:md5,28dca3b6017569e8a8a0702714e7451c"
"treatment_vs_control.translation.anota2seq.results.tsv:md5,99045a6fca60386e8cb5a31a49491688"
]
],
[
[
{
"id": "treatment_vs_control"
},
"treatment_vs_control.mRNA_abundance.anota2seq.results.tsv:md5,68b329da9893e34099c7d8ad5cb9c940"
"treatment_vs_control.buffering.anota2seq.results.tsv:md5,d900d02201c6703aba62cd30a10d2ded"
]
],
[
Expand All @@ -52,9 +52,9 @@
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.2"
"nf-test": "0.9.3",
"nextflow": "25.10.2"
},
"timestamp": "2025-06-01T14:34:20.085223495"
"timestamp": "2025-12-05T12:21:54.259548595"
}
}
Loading