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

'_samples' is a required property: (1 samples) project #78

Closed
rschauner opened this issue Oct 8, 2024 · 6 comments
Closed

'_samples' is a required property: (1 samples) project #78

rschauner opened this issue Oct 8, 2024 · 6 comments
Assignees

Comments

@rschauner
Copy link

I'm trying to create a PEP schema for a Snakemake workflow I'm writing. I've parsed my config file and sample table to the smallest form I can and still get the same error: '_samples' is a required property: (1 samples) project.

config.yml

pep_version: 2.1.0
sample_table: "test_table.csv"

test_table.csv

sample_name, exp
P081-BAL-NonInf-Multi, A
P081-BAL-InfAd-Multi, A
P081-BAL-InfAdPep-Multi, B

schema.yml

imports:
  - http://schema.databio.org/pep/2.1.0.yaml
properties:
  config:
    properties:
    required:
      - pep_version
      - sample_table
  samples:
    type: array
    items:
      type: object
      properties:
        exp:
          type: string
          description: "Experimental Condition"
      required:
        - sample_name
        - exp

When I run eido validate pep/config.yml -s http://schema.databio.org/pep/2.1.0.yaml I get the error. However, running eido with either the -c or -n flags validates the PEP.

Removing the last two lines (see below) of the PEP schema removes this error. Changing the "sample_name" column to "sample_name2" results in an error: sample_table is missing 'sample_name' column; you must specify sample_tables in sample_name or derive them. Using a sample CSV with a schema that requires a metadata column still validates with that column missing (using eido validate pep/config.yml -s schema.yml

Lines removed from http://schema.databio.org/pep/2.1.0.yaml

[...]
required:
  - samples
@nsheff
Copy link
Contributor

nsheff commented Oct 8, 2024

Can you try upgrading the eido package and see if that changes it?

@rschauner
Copy link
Author

I'm now on eido 0.2.2 (peppy 0.40.7) and still have the same problem

@nsheff
Copy link
Contributor

nsheff commented Oct 8, 2024

It would require eido 0.2.4, which is available on pypi: https://pypi.org/project/eido/#history

https://github.com/pepkit/eido

@rschauner
Copy link
Author

It seems the version on conda-forge is too out of date.

@nsheff
Copy link
Contributor

nsheff commented Oct 10, 2024

Thanks for pointing that out. I'm going to re-open this until we solve the conda-forge issue.

@khoroshevskyi
Copy link
Member

This issue is fixed, and new version of eido is added to conda

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

No branches or pull requests

3 participants