You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can't load a CSV file directly, because it has no sample_name column. This is correct:
p = peppy.Project("analysis/config/demo_fasta.csv")
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 264, in create_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
BUT, it's not problem going through the yaml (that provides nothing other than a pointer to the CSV):
p = peppy.Project("analysis/config/demo_fasta.yaml")
Config file does not have version key. Defaulting to 2.1.0
This happily creates a project with no samples in it, despite having the annotation table:
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
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:
The text was updated successfully, but these errors were encountered: