Skip to content

Commit

Permalink
Fixed challenges hyphen parsing. 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ESapenaVentura committed Aug 9, 2023
1 parent c1690e0 commit b8b54a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lrgasp_metrics/JSON_templates/write_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def metric_to_filename(metric):
return metric

def main(experiment_path, rdata_path, output_path, challenge):
match = challenge.split("_")[0].upper()
match = challenge.split("_")[1].replace('sirvs', 'SIRV')
# Set the values to pass to write_assessment_dataset contained in experiment metadata
experiment = json.load(open(experiment_path, 'r'))
community = "OEBC010"
Expand Down
9 changes: 5 additions & 4 deletions lrgasp_validation/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,13 @@ def validate_library_to_metadata(experiment_json):

def challenges_are_valid(challenges, experiment_json):
for challenge in challenges:
split_challenge = challenge.split("_")
if experiment_json['library_preps'] not in split_challenge[2]:
split_challenge = challenge.split('_')[:2]
split_challenge.extend(challenge.split('_')[2].split('-'))
if experiment_json.get('library_preps', '') not in split_challenge[2]:
ERRORS.append(f'Library preparation in challenge {challenge} and metadata provided in experiment.json is not consistent; please ensure you selected the proper library preparation.')
if experiment_json['platforms'] not in split_challenge[3]:
if experiment_json.get('platforms', '') not in split_challenge[3]:
ERRORS.append(f'Sequencing platform in challenge {challenge} and metadata provided in experiment.json is not consistent; please ensure you selected the proper sequencing platform.')
length = experiment_json['data_category'].split("_")
length = experiment_json.get('data_category', 'N_N').split("_")
length = f"{length[0][0]}{length[1][0]}".upper()
if length not in split_challenge[4]:
ERRORS.append(f'Read length in challenge {challenge} and metadata provided in experiment.json is not consistent; please ensure you selected the proper read length.')
Expand Down

0 comments on commit b8b54a5

Please sign in to comment.