From 945c946f28761428f01881ebd4dbb67c3317a433 Mon Sep 17 00:00:00 2001 From: d4straub Date: Fri, 20 Dec 2024 14:15:13 +0100 Subject: [PATCH] add referenceSeq --- modules/local/treesummarizedexperiment.nf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/local/treesummarizedexperiment.nf b/modules/local/treesummarizedexperiment.nf index 68dd0722..79ee5c9f 100644 --- a/modules/local/treesummarizedexperiment.nf +++ b/modules/local/treesummarizedexperiment.nf @@ -48,6 +48,12 @@ process TREESUMMARIZEDEXPERIMENT { rowData = taxonomy_table ) + # If taxonomy table contains sequences, move them to referenceSeq slot + if (!is.null(rowData(tse)[["sequence"]])) { + referenceSeq(tse) <- DNAStringSet( rowData(tse)[["sequence"]] ) + rowData(tse)[["sequence"]] <- NULL + } + # If provided, we add sample metadata as DataFrame object. rownames of # sample metadata must match with colnames of abundance matrix. if (file.exists($sam_tsv)) {