Skip to content

Commit 1e8c2a9

Browse files
authored
Update README.md
1 parent b6de95c commit 1e8c2a9

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

README.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,4 @@ Where:
5757

5858
The method returns *N* p-values.
5959

60-
## Using in `SOLAR-Eclipse`
6160

62-
[SOLAR-Eclipse](http://solar-eclipse-genetics.org/) is a software package for genetic analysis. SOLAR deals mainly with explicit pedigree files, but it is possible to generate a kinship matrix from it for processing in FIESTA. Whenever you load a pedigree file, solar saves the kinship matrix it computes (see 8.3 [here](https://helix.nih.gov/Documentation/solar-6.6.2-doc/08.chapter.html)). After loading the pedigree and locating the matrix file, run the following Python code:
63-
```python
64-
import numpy as np
65-
import gzip
66-
import numpy.linalg
67-
68-
filename = "<path_to_file>/phi2.gz"
69-
lines = np.vstack([np.array(line.strip().split()[:3]).astype(float) for line in gzip.open(filename).read().splitlines()[1:]])
70-
n_samples = int(max(lines[:,0]))
71-
kinship_matrix = np.zeros((n_samples, n_samples))
72-
for x,y,c in lines:
73-
kinship_matrix[int(x)-1, int(y)-1] = c
74-
75-
vals, vecs = numpy.linalg.eigh(kinship_matrix)
76-
savetxt("<path>/eigenvalues.txt", vals[::-1])
77-
savetxt("<path>/eigenvectors.txt", vecs[::-1])
78-
```
79-
80-
The output `txt` can now be used in FIESTA.

0 commit comments

Comments
 (0)