waldronlab / curatedMetagenomicDataCuration

Sample Metadata Curation for curatedMetagenomicData
https://waldronlab.io/curatedMetagenomicDataCuration/
28 stars 23 forks source link

add col.class column #53

Closed schifferl closed 3 years ago

schifferl commented 3 years ago

Long ago there was a col.class column in the template.csv file and it would make importing the curated metadata far easier in the R package if we brought it back. The col.class column would describe the type of variable represented in each row. For example:

col.name col.class uniqueness requiredness multiplevalues allowedvalues ...
body_subsite character non-unique optional FALSE anterior_nares|hard_palate|keratinized_gingiva ...
blood_platelet double non-unique optional FALSE [0-9]+.?[0-9]* ...
formula_first_day integer non-unique optional FALSE [0-9]+ ...

The values of col.class should be one of character, double, integer, or logical and appropriate for the variable (as shown above).

There are a few other types that would be possible if we should need them in the future: date, datetime, factor, time, and skip; but I would hesitate to use these types for now.

paolinomanghi commented 3 years ago

Please, have a look now.