Skip to content

Format#14

Merged
khetherin merged 42 commits intoEBIvariation:mainfrom
khetherin:format
Nov 7, 2025
Merged

Format#14
khetherin merged 42 commits intoEBIvariation:mainfrom
khetherin:format

Conversation

@khetherin
Copy link
Collaborator

Format values and headers are present in the VCF file.
Additional refactor to merge multiple files into one attributes file.

@khetherin khetherin requested a review from tcezard October 31, 2025 13:50
@khetherin khetherin requested a review from tcezard November 5, 2025 10:27
Copy link
Member

@tcezard tcezard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some quick suggestions but otherwise approved.

Comment on lines +93 to +94
else:
logger.warning(f"Unsupported Field: {field}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ALT in the attribute_mapper.yaml will trigger this warning which is fine for now.

Comment on lines +146 to 152
seen_sample_names = set()
uniq_sample_name = []
for sample in sample_names:
if sample not in seen_sample_names:
seen_sample_names.add(sample)
uniq_sample_name.append(sample)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
seen_sample_names = set()
uniq_sample_name = []
for sample in sample_names:
if sample not in seen_sample_names:
seen_sample_names.add(sample)
uniq_sample_name.append(sample)
uniq_sample_name = list(set(sample_names))

Comment on lines +1 to +16
"""This sets up the logger for logging messages"""
import logging
import os
# Create logger for module name
logger = logging.getLogger(__name__)

def set_up_logging(log_path=None):
# Set up paths
input_folder = os.path.dirname(__file__)
output_folder = os.path.join(input_folder, "..","tests", "output")
if log_path is None:
log_path = os.path.join(output_folder, "converted.log")
logging.basicConfig(filename=log_path,
level=logging.DEBUG,
format="%(asctime)s - %(levelname)s - %(message)s")
return log_path No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can keep this for now but we have a whole existing system to manage logging in the pyutils library.

Co-authored-by: Timothee Cezard <tcezard@ebi.ac.uk>
@khetherin khetherin merged commit 7af0590 into EBIvariation:main Nov 7, 2025
1 check passed
@khetherin khetherin deleted the format branch December 8, 2025 14:53
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

Successfully merging this pull request may close these issues.

2 participants