Convert a DESeqDataSet Object to a MicrobiomeStat Data Object
Source:R/mStat_convert_DESeqDataSet_to_data_obj.R
mStat_convert_DESeqDataSet_to_data_obj.Rd
This function is a part of the MicrobiomeStat package. It converts a DESeqDataSet object into a list (MicrobiomeStat data object) containing the counts, samples data and feature annotations. The returned list represents a microbiome dataset with features (OTUs or taxa), sample metadata and feature annotations.
Value
A MicrobiomeStat data object (a list) containing the following elements:
feature.tab: A matrix containing the counts data with rows as features and columns as samples.
meta.dat: A data frame containing the samples data.
feature.ann: A matrix containing feature annotations.
Details
The function first checks if each component (counts, samples, feature annotations) of the DESeqDataSet object is not null. If a component is not null, it is converted to the appropriate format and added to the output list. The counts data and feature annotations are converted to a matrix, while the samples data is converted to a data frame. Note that only the rows (features) in the counts data that have a sum > 0 are retained.