Utility function that prepares metadata to be slotted into colData.

makeSampleData(object)

Arguments

object

Object.

Value

DataFrame.

Details

This function adheres to the following conventions:

  • All column names will be converted to lower camel case (see camel for details).

  • Required columns:

    • sampleName: Human readable sample names. Note that this column is useful for plots and doesn't have to match the column names of a SummarizedExperiment object, which should use valid names.

  • Blacklisted columns:

    • filename (use fileName).

    • rowname.

    • sample. Too vague. Does this represent an ID or human readable name?

    • samplename (use sampleName).

  • sampleName column is always placed first.

See also

makeNames.

Examples

object <- data.frame( genotype = rep(c("control", "wildtype"), times = 2L), treatment = rep(c("vector", "RNAi"), each = 2L), sampleName = paste("sample", seq_len(4L)), row.names = paste0("GSM000000", seq_len(4L)) ) makeSampleData(object)
#> DataFrame with 4 rows and 3 columns #> sampleName genotype treatment #> <factor> <factor> <factor> #> GSM0000001 sample 1 control vector #> GSM0000002 sample 2 wildtype vector #> GSM0000003 sample 3 control RNAi #> GSM0000004 sample 4 wildtype RNAi