I have been using sourmashconsumr to convert phyloseq objects, but I keep getting the error:
Error in validObject(.Object) :
invalid class “sample_data” object: Sample Data must have non-zero dimensions.
I have ensured there are no 0 within the data frames, and the sample name in the dataframe is correct, but I still have the error. Any advice as to what could be causing this error?
I have been using sourmashconsumr to convert phyloseq objects, but I keep getting the error:
Error in validObject(.Object) : invalid class “sample_data” object: Sample Data must have non-zero dimensions.
I have ensured there are no 0 within the data frames, and the sample name in the dataframe is correct, but I still have the error. Any advice as to what could be causing this error?
Code used below for reference-
read in CSV
taxonomy_annotate_df <- read_csv("sample1.51gtdb.with-lineages.csv") head(taxonomy_annotate_df)
metadata- new dataframe from existing data
query_name <- c("sample1.fq") metadata <- data.frame(query_name = query_name)
Replace Zero with NA Value in a dataframe
taxonomy_annotate_df [taxonomy_annotate_df == 0] <- NA
Converting from taxonomy annotate to phyloseq object
sample1_phyloseq <- from_taxonomy_annotate_to_phyloseq(taxonomy_annotate_df = taxonomy_annotate_df, metadata_df = metadata %>% tibble::column_to_rownames("query_name"))