-
Notifications
You must be signed in to change notification settings - Fork 250
[joint caller] add contig_recoding option to run_combiner #8861
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
[joint caller] add contig_recoding option to run_combiner #8861
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor
@@ -459,6 +459,7 @@ def run_combiner(sample_paths: List[str], | |||
target_records: int = CombinerConfig.default_target_records, | |||
overwrite: bool = False, | |||
reference_genome: str = 'default', | |||
contig_recoding: Dict[str, str] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional[Dict[Str, str]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks. Optional use to be optional (heh) if the default initializer is None, but that's no longer recommended:
A past version of this PEP allowed type checkers to assume an optional type when the default value is None, as in this code:
def handle_employee(e: Employee = None): ...
This would have been treated as equivalent to:
def handle_employee(e: Optional[Employee] = None) -> None: ...
This is no longer the recommended behavior. Type checkers should move towards requiring the optional type to be made explicit.
@@ -486,12 +487,18 @@ def run_combiner(sample_paths: List[str], | |||
Overwrite output file, if it exists. | |||
reference_genome : :obj:`str` | |||
Reference genome for GVCF import. | |||
contig_recoding: :obj:`dict` of (:obj:`str`, :obj:`str`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used , optional
, since that seems to be what we do elsewhere. Let me know if that's no longer preferred.
Or does optional just mean it has a default value, and I should say dict of ... or None, optional
?
I don't think we're very consistent about this stuff. :-/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure what the right practices are. I'll do a bit of research...
And yeah, we really aren't consistent.
No description provided.