ucsd-ccbb / qiimp

Web application to collect metadata specifications from an experimenter and produce metadata input files with appropriate constraints
3 stars 7 forks source link

Prevent non-sample-id columns from being named with QIIME2 reserved sample id column names #118

Closed AmandaBirmingham closed 6 years ago

AmandaBirmingham commented 6 years ago

This issue is due to Jon Sanders' feedback during alpha testing that the metadata wizard should be compatible with the QIIME2 metadata update.

https://docs.qiime2.org/2018.2/tutorials/metadata/ states:

IDs cannot use any of the reserved ID column names listed above.

[these are:]

Case-insensitive:

id sampleid sample id sample-id featureid feature id feature-id Case-sensitive (these are mostly for backwards-compatibility with QIIME 1, biom-format, and Qiita files):

SampleID

Sample ID

OTUID

OTU ID

sample_name

Currently the metadata wizard does not prevent any of these column names from being used.

adswafford commented 6 years ago

Yes, please add these to the list.

AmandaBirmingham commented 6 years ago

Since the reserved words are stored in plain-style yaml, I can't include the following words as reserved since # is the yaml comment character:

SampleID

Sample ID

OTUID

OTU ID

However, this shouldn't be an issue as the current metadata wizard limitations on field names are: "Only lower-case letters, numbers, and underscores are permitted, and must not start with a number." Thus, none of these would be allowable field names anyway. This is also true of sample id sample-id feature id feature-id ... but I went ahead and included them in the reserved words yaml (since they are compatible with the yaml format) just in case we decide to change the metadata wizard's built-in limitations someday.