Skip to content

Commit

Permalink
change check for empty title columns
Browse files Browse the repository at this point in the history
  • Loading branch information
erikwolfsohn committed Sep 3, 2024
1 parent 0bdf865 commit fe82b9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion biosample_sra_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def create_manual_submission_files(database: str, submission_dir: str, metadata:
column_ordered = ["sample_name","library_ID"]
prefix = "sra-"
# Create SRA specific fields
if 'sra-title' not in metadata.columns or (metadata['sra-title'].fillna('') == '').any():
if 'sra-title' not in metadata.columns or metadata['sra-title'].isnull().any() or (metadata['sra-title'] == '').any():
metadata["sra-title"] = config_dict["Description"]["Title"]
filename_cols = [col for col in metadata.columns.tolist() if re.match("sra-file_[1-9]\d*", col)]
# Correct index for filename column
Expand Down

0 comments on commit fe82b9b

Please sign in to comment.