Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jass
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Léo HENCHES
jass
Commits
40a38d47
Commit
40a38d47
authored
7 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
connect the smart JOST computation switch to the function params.
parent
f5723e92
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swagger_server/models/worktable.py
+15
-1
15 additions, 1 deletion
swagger_server/models/worktable.py
with
15 additions
and
1 deletion
swagger_server/models/worktable.py
+
15
−
1
View file @
40a38d47
...
...
@@ -368,6 +368,20 @@ def create_inittable_file(input_meta_path: str, init_covariance_path: str, init_
def
create_worktable_file
(
phenotype_ids
:
List
[
str
],
init_file_path
:
str
,
project_hdf_path
:
str
,
remove_nan
:
bool
):
"""
Create a worktable file from an initial data table by specifying the
selected phenotypes and the computation strategy
:param phenotype_ids: the list of IDs for the phenotypes to select
:param init_file_path: path to the initial data table
:param project_hdf_path: path to the worktable file that will be produced
:path remove_nan: boolean to control the JOST computation strategy,
- if True any SNP which has a NaN value for one of its
phenotypes will be removed.
- if False SNPs will be removed only if all phenotype
values are NaN and JOST will be performed the
"
smart
"
way to compensate these missing values.
"""
# read data by chunks to optimize memory usage
# select only rows (SNPs) where there are no missing data
how_dropna
=
'
any
'
if
remove_nan
else
'
all
'
...
...
@@ -382,7 +396,7 @@ def create_worktable_file(phenotype_ids: List[str], init_file_path: str, project
COV
=
read_hdf
(
init_file_path
,
'
COV
'
)
Zsel
=
SumStatTab
[
phenotype_ids
]
subCOV
=
COV
.
loc
[
phenotype_ids
,
phenotype_ids
]
smart_na_computation
=
False
#True
smart_na_computation
=
not
(
remove_nan
)
if
smart_na_computation
:
JOST
=
create_worktable_file_wnan
(
Zsel
,
subCOV
)
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment