summaryrefslogtreecommitdiff
path: root/topics
diff options
context:
space:
mode:
authorArun Isaac2022-06-21 15:56:39 +0530
committerArun Isaac2022-06-21 15:59:03 +0530
commit50696f6db4972a7cdb641447f0f9a0dd1372cb9c (patch)
treea0ac7285448ac4a84f70580d36a424be8daefd25 /topics
parent4e9b6cf5df41c083aad8e1e0961098585f86526e (diff)
downloadgn-gemtext-50696f6db4972a7cdb641447f0f9a0dd1372cb9c.tar.gz
genotype-database: Document reading the entire matrix.
* topics/genotype-database.gmi: Document reading the entire matrix using the genodb.nparray function.
Diffstat (limited to 'topics')
-rw-r--r--topics/genotype-database.gmi3
1 files changed, 2 insertions, 1 deletions
diff --git a/topics/genotype-database.gmi b/topics/genotype-database.gmi
index ea3db7c..5828b77 100644
--- a/topics/genotype-database.gmi
+++ b/topics/genotype-database.gmi
@@ -9,12 +9,13 @@ To convert a plain text GeneNetwork genotype file `BXD.geno` to a genodb genotyp
```
=> https://git.genenetwork.org/GeneNetwork/cl-gn cl-gn
-genenetwork3 includes a tiny Python library to read the built genodb database. Here is a sample invocation reading row 17 and column 13 from a database at `/tmp/bxd`.
+genenetwork3 includes a tiny Python library to read the built genodb database. Here is a sample invocation reading the entire matrix, row 17 and column 13 from a database at `/tmp/bxd`.
```
from gn3 import genodb
with genodb.open('/tmp/bxd') as db:
matrix = genodb.matrix(db)
+ print(genodb.nparray(matrix))
print(genodb.row(matrix, 17))
print(genodb.column(matrix, 13))
```