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

265 metadata validation required fields #271

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions assets/biosample_fields_key.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
BioSample_packages:
SARS-CoV-2.cl.1.0:
required:
- sample_name
- organism
- collection_date
- isolate
- collected_by
- host
- host_disease
at_least_one_required: []
SARS-CoV-2.wwsurv.1.0:
required:
- sample_name
- organism
- collection_date
- isolation_source
- ww_population
- ww_sample_duration
- ww_sample_matrix
at_least_one_required: []
Microbe.1.0:
required:
- sample_name
- organism
- collection_date
- sample_type
at_least_one_required:
- - host
- isolation_source
- - strain
- isolate
Human.1.0:
required:
- sample_name
- organism
- collection_date
- isolate
- age
- biomaterial_provider
- sex
- tissue
at_least_one_required: []
Metagenome.environmental.1.0:
required:
- sample_name
- organism
- collection_date
- lat_lon
at_least_one_required:
- - host
- isolation_source
OneHealthEnteric.1.0:
required:
- sample_name
- strain
at_least_one_required: []
Virus.1.0:
required:
- sample_name
- organism
- collection_date
- isolation_source
- isolate
at_least_one_required:
- - host
- lab_host
Beta-lactamase.1.0:
required:
- sample_name
- organism
- collection_date
- beta_lactamase_family
- carbapenemase
- edta_inhibitor_tested
at_least_one_required:
- - strain
- isolate
Pathogen.cl.1.0:
required:
- sample_name
- organism
- collection_date
- isolation_source
- collected_by
- lat_lon
- host
- host_disease
at_least_one_required:
- - strain
- isolate
Pathogen.env.1.0:
required:
- sample_name
- organism
- collection_date
- isolation_source
- collected_by
- lat_lon
at_least_one_required:
- - strain
- isolate
1 change: 0 additions & 1 deletion assets/custom_meta_fields/onehealth_biosample_pkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"strain": {
"type": "String ",
"replace_empty_with": "Not Provided",
"new_field_name": "strain"
},
Expand Down
1 change: 0 additions & 1 deletion bin/submission_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ def __init__(self, parameters):
# Load submission configuration
self.parameters = parameters
def load_config(self):
# Parse the config file (could be JSON, YAML, etc.)
# Example: returns a dictionary with SFTP credentials, paths, etc.
with open(self.parameters['config_file'], "r") as f:
config_dict = yaml.load(f, Loader=yaml.BaseLoader) # Load yaml as str only
Expand Down
Loading