Closed nsheff closed 6 days ago
Interesting. The error is actually that I mis-specified the sample_table
attribute as sample_annotation
.
So, the problem is actually that it's not warning me of a missing sample_table, leading to my confusion. When I correct that error, using the config does give the error I expect:
p = peppy.Project("analysis/config/demo_fasta.yaml")
Config file does not have version key. Defaulting to 2.1.0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nsheff/.local/lib/python3.8/site-packages/peppy/project.py", line 163, in __init__
self.create_samples(modify=False if self[SAMPLE_TABLE_FILE_KEY] else True)
File "/home/nsheff/.local/lib/python3.8/site-packages/peppy/project.py", line 262, in create_samples
self.modify_samples()
File "/home/nsheff/.local/lib/python3.8/site-packages/peppy/project.py", line 438, in modify_samples
self._assert_samples_have_names()
File "/home/nsheff/.local/lib/python3.8/site-packages/peppy/project.py", line 561, in _assert_samples_have_names
raise InvalidSampleTableFileException(message)
peppy.exceptions.InvalidSampleTableFileException: sample_table is missing 'sample_name' column; you must specify sample_tables in sample_name or derive them
That is not related. It is a red herring
Related to #473
here's a csv file
demo_fasta.csv
:here's a pep yaml
demo_fasta.yaml
:watch this:
sample_name
column. This is correct:BUT, it's not problem going through the yaml (that provides nothing other than a pointer to the CSV):
This happily creates a project with no samples in it, despite having the annotation table: