You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[Running A Minimal Example Imputation](#running-a-minimal-configuration-example)
7
+
8
+
### Graph Imputation
5
9
6
10
`py-graph-imputation` is the successor of [GRIMM](https://github.com/nmdp-bioinformatics/grimm) written in Python and based on [NetworkX](https://networkx.org/)
1. Make sure the following pre-requites are installed.
@@ -53,56 +58,43 @@ How to develop on the project locally.
53
58
```shell
54
59
make install
55
60
```
56
-
7. The Gherkin Feature files, step files and pytest files go in `tests` directory:
57
-
```
58
-
tests
59
-
|-- features
60
-
| |-- algorithm
61
-
| | `-- SLUG\ Match.feature
62
-
| `-- definition
63
-
| `-- Class\ I\ HLA\ Alleles.feature
64
-
|-- steps
65
-
| |-- HLA_alleles.py
66
-
| `-- SLUG_match.py
67
-
`-- unit
68
-
`-- test_grim.py
69
-
```
70
-
8. Package Module files go in the `grim` directory.
61
+
7. Package Module files go in the `grim` directory.
71
62
```
72
63
grim
73
64
|-- __init__.py
74
-
|-- algorithm
75
-
| `-- match.py
76
-
|-- model
77
-
| |-- allele.py
78
-
| `-- slug.py
79
-
`-- grim.py
65
+
|-- grim.py
66
+
`-- imputation
67
+
|-- __init__.py
68
+
|-- cutils.pyx
69
+
|-- cypher_plan_b.py
70
+
|-- cypher_query.py
71
+
|-- impute.py
72
+
`-- networkx_graph.py
80
73
```
81
-
9. Run all tests with `make test` or different tests with `make behave` or `make pytest`. `make behave` will generate report files and open the browser to the report.
74
+
8. Run all tests with `make test` or different tests with `make behave` or `make pytest`.
75
+
9. Run `make lint` to run the linter and black formatter.
82
76
10. Use `python app.py` to run the Flask service app in debug mode. Service will be available at http://localhost:8080/
83
77
11. Use `make docker-build` to build a docker image using the current `Dockerfile`.
84
78
12. `make docker` will build and run the docker image with the service. Service will be available at http://localhost:8080/
85
79
86
80
87
-
# Runing a minimal configuration example
81
+
### Running a minimal configuration example
88
82
89
83
From the main directory of the repo run:
90
84
```
91
-
scripts//build-imputation-validation.sh
85
+
scripts/build-imputation-validation.sh
92
86
```
93
87
94
-
This will pepare and load frequency data into the graph and run imputation on a sample set of subjects.
88
+
This will prepare and load frequency data into the graph and run imputation on a sample set of subjects.
95
89
96
-
The execution is driven by the configuration file:
97
-
`conf/minimal-configuration.json`
90
+
The execution is driven by the configuration file: `conf/minimal-configuration.json`
98
91
99
92
It takes input from this file:
100
93
```
101
94
data/subjects/donor.csv
102
95
```
103
96
104
-
105
-
And genrates an `output` directory with these contents:
97
+
And generates an `output` directory with these contents:
106
98
107
99
```
108
100
output
@@ -114,13 +106,13 @@ output
114
106
└── don.umug.pops
115
107
```
116
108
117
-
The .problem file contains cases that failed due to serious errors (e.g., invalid HLA).
109
+
The `.problem` file contains cases that failed due to serious errors (e.g., invalid HLA).
118
110
119
-
The .miss file contains cases where there was no output possible given the input, frequencies and configuration options.
111
+
The `.miss` file contains cases where there was no output possible given the input, frequencies and configuration options.
120
112
121
-
The .pmug file contains the Phased Multi-locus Unambiguous Genotypes.
113
+
The `.pmug` file contains the Phased Multi-locus Unambiguous Genotypes.
122
114
123
-
The .umug file contains the Unphased Multi-locus Unambiguous Genotypes.
115
+
The `.umug` file contains the Un-phased Multi-locus Unambiguous Genotypes.
124
116
125
117
126
118
The format of both files is (csv):
@@ -131,9 +123,9 @@ The format of both files is (csv):
131
123
* rank
132
124
133
125
134
-
The .pmug.pops and .umug.pops contain the corresponding population assignments.
126
+
The `.pmug.pops` and `.umug.pops` contain the corresponding population assignments.
0 commit comments