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
# This is an effect of everything being optional in the Comment model.
441
+
# Should we decide to make the value mandatory, this guard clause would not be necessary anymore.
442
+
iftarget_repo_comment.valueisNone:
443
+
raiseValueError(
444
+
f"At least one assay in the ISA-JSON has no '{TARGET_REPO_KEY}' comment. Mapping not possible. Make sure all assays in the ISA-JSON have this comment!"
445
+
)
446
+
assay_data_files= [df.namefordfinassay.dataFiles]
447
+
448
+
# Check if the files in the ISA-JSON are present in the command
449
+
# If not, raise an error
450
+
foradfinassay_data_files:
451
+
ifadfnotin [fd["short_name"] forfdinfiles_dicts]:
452
+
raiseValueError(
453
+
f"""Assay for repository '{target_repo_comment.value}' has encountered a mismatch while mapping the data files to the ISA-JSON.
454
+
Data File '{adf}' is missing in the data files passed in the command:
455
+
{files}
456
+
Please correct the mismatch!"""
457
+
)
458
+
else:
459
+
remaining_files= [
460
+
fdforfdinremaining_filesiffd["short_name"] !=adf
461
+
]
462
+
463
+
df_map[target_repo_comment.value] = [
464
+
fd["full_name"]
465
+
forfdinfiles_dicts
466
+
iffd["short_name"] inassay_data_files
467
+
]
468
+
469
+
[
470
+
print_and_log(
471
+
msg=f"File '{rf['short_name']}' could not be mapped to any data file in the ISA-JSON. For this reason, it will be skipped during submission!",
0 commit comments