-
Notifications
You must be signed in to change notification settings - Fork 0
check modifications #13
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,7 +22,7 @@ class HarmonizationError(Exception): | |||||||
|
|
||||||||
|
|
||||||||
| class Harmonize: | ||||||||
| def __init__(self, mapping_file: str, uri: str, type_sumstat: str, pvar_file: str, type_trait: str, mac: int, permuted: False): | ||||||||
| def __init__(self, mapping_file: str, uri: str, type_sumstat: str, pvar_file: str, type_trait: str, mac: int, permuted: bool): | ||||||||
| self.mapping_file = mapping_file | ||||||||
| self.uri = uri | ||||||||
| self.pvar_file = pvar_file | ||||||||
|
|
@@ -33,6 +33,7 @@ def __init__(self, mapping_file: str, uri: str, type_sumstat: str, pvar_file: st | |||||||
| self.dimension_tiledb = [] | ||||||||
| self.mac = mac | ||||||||
| self.permuted = permuted | ||||||||
| print(self.permuted) | ||||||||
|
||||||||
| print(self.permuted) | |
| logger.debug("Harmonize created with permuted=%s", self.permuted) |
Copilot
AI
Feb 16, 2026
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.
In the permuted branch, map_batches(...) does not specify return_dtype. Polars may infer an Object dtype or warn/error depending on execution context; set an explicit float dtype (consistent with the non-permuted branch) to keep the SE computation stable.
| lambda x: pl.Series(stats.chi2.isf(x.to_numpy(), df=1)) | |
| lambda x: pl.Series(stats.chi2.isf(x.to_numpy(), df=1)), | |
| return_dtype=pl.Float64 |
Copilot
AI
Feb 16, 2026
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.
self.chunk_pl.drop('P') will raise if the input summary stats do not already contain a P column (e.g., when only BETA/SE are provided). If the intent is to recompute P-values, either drop with strict=False or conditionally drop only when P exists.
| self.chunk_pl = self.chunk_pl.drop('P') | |
| if "P" in self.chunk_pl.columns: | |
| self.chunk_pl = self.chunk_pl.drop('P') |
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.
conf/base.configis included by default, so hardcoding an absolute, institution-specificcondapath (and commenting out the container) will break portability for other users/runners. Consider reverting to a repo-relative env file (e.g.,${projectDir}/pipeline_environment.yml) or leavingconda/containerunset here and configuring them via profiles or a local config override.