This function reads covariate data from an XML file, extracts attributes of Barcode elements under <BarcodeB>, and returns a data structure where specified columns are excluded, and all remaining columns are converted to factors.

readCovariates(
  infile,
  cols_to_exclude = c("V1", "AUTO_PLATE", "AUTO_WELLCOL", "AUTO_WELLPOSITION",
    "AUTO_WELLROW", "EXPERIMENT_ID", "OPERATOR", "SEQ_INSTRUMENT_ID", "SEQ_RUN_DATE",
    "SMI_ID", "type")
)

Arguments

infile

The path to the XML file.

cols_to_exclude

A character vector specifying the columns to exclude. Default is c("V1", "AUTO_PLATE", "AUTO_WELLCOL", "AUTO_WELLPOSITION", "AUTO_WELLROW", "EXPERIMENT_ID", "OPERATOR", "SEQ_INSTRUMENT_ID", "SEQ_RUN_DATE", "SMI_ID").

Value

A data structure with excluded columns and all remaining columns converted to factors.

Examples

if (FALSE) { # \dontrun{
# Example usage:
readCovariates("your_file.xml")
} # }