Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using v0.40.0 can create peppy project without sample names. #473

Open
donaldcampbelljr opened this issue Jan 17, 2024 · 1 comment
Open
Assignees
Milestone

Comments

@donaldcampbelljr
Copy link
Contributor

Example:

sample_name,library,file,toggle
,anySampleType,data/frog1_data.txt,1
frog_2,anySampleType,data/frog2_data.txt,1

Can create peppy prj with missing sample name.

sample_name: None
library:     anySampleType
file:        data/frog1_data.txt
toggle:      1, Sample 'frog_2' in Project (/home/drc/GITHUB/hello_looper/hello_looper/project/project_config.yaml)

sample_name: frog_2
library:     anySampleType
file:        data/frog2_data.txt
toggle:      1]

@khoroshevskyi
Copy link
Member

After investigating this issue, it seems it is correct behavior.
Sample name can be derived. And we have few tests for that.

peppy/tests/test_Project.py

Lines 290 to 299 in fc15511

@pytest.mark.parametrize(
"example_pep_cfg_noname_path", ["project_config.yaml"], indirect=True
)
def test_missing_sample_name_derive(self, example_pep_cfg_noname_path):
"""
Verify that even if sample_name column is missing in the sample table,
it can be derived and no error is issued
"""
p = Project(cfg=example_pep_cfg_noname_path)
assert SAMPLE_NAME_ATTR in p.sample_table.columns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants