The qsip_feature_data
object holds validated feature metadata.
Details
qsip_feature_data()
is not a typical function, but rather a class constructor that
instantiates a new qsip_feature_data
object. The constructor takes a data.frame
as
input and returns a validated qsip_feature_data
object.
The qsip_feature_data
object is used to hold feature metadata, such as amplicon
sequence variants (ASVs), operational taxonomic units (OTUs), metagenome-assembled
genomes (MAGs), etc.
The data
argument takes a data.frame
that has the feature IDs as
a column designated with the feature_id
argument. Each row corresponds to a unique
feature (amplicon, MAG, etc) and each subsequent row corresponds to a unique sample.
The type
argument is used to designate the type of data in the data
argument. It
should most likely be counts for amplicon data, and coverage for metagenome data
(including normalizations like TPM). If the data is relative abundances, the type
argument should be set to relative. Overall, the choice won't much affect the
results from the qSIP analysis, but choosing an accurate type will help with the
validation checks.
Internally, qsip_feature_data
renames the metadata columns to be standardized
to MISIP terminology. A data.frame
with the standardized names can be extracted
back out of the object using the get_dataframe()
method, and the optional original_headers
argument can be set to TRUE
to return the original column names.
There are several validation checks run on the data on the data.frame
:
The
data
argument must contain adata.frame
, including a tibbleThe
feature_id
argument must be a column name in thedata.frame
The
feature_id
column must contain unique values per rowThe
type
argument must be one of counts, coverage or relativeThe
type
argument is counts by default, and in this case the values in thedata
argument must be integersIf
type
is set to relative the values in thedata
argument must be numeric and the values must sum to 1 for each rowIf
type
is set to coverage, the values in thedata
argument must be numericIf the
type
is set to normalized then the values are assumed to be pre-normalized and additional transformations will not be done.
All values in the
data
argument must be non-negative
See also
Other "qSIP Objects":
qsip_data()
,
qsip_sample_data()
,
qsip_source_data()