Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
TuomasBorman committed Dec 8, 2024
1 parent ea6c4f5 commit 4470737
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/convertFromPhyloseq.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ convertFromPhyloseq <- function(x) {

rowData <- tryCatch(phyloseq::tax_table(x), error = function(e) NULL) |>
data.frame() |> DataFrame()
if( is.null(rowData) ){
if( nrow(rowData) == 0L ){
rowData <- S4Vectors::make_zero_col_DFrame(nrow(assays$counts))
rownames(rowData) <- rownames(assays$counts)
}
colData <- tryCatch(phyloseq::sample_data(x), error = function(e) NULL) |>
data.frame() |> DataFrame()
if( is.null(colData) ){
if( nrow(colData) == 0L ){
colData <- S4Vectors::make_zero_col_DFrame(ncol(assays$counts))
rownames(colData) <- colnames(assays$counts)
}
Expand Down

0 comments on commit 4470737

Please sign in to comment.