From 50696f6db4972a7cdb641447f0f9a0dd1372cb9c Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 21 Jun 2022 15:56:39 +0530 Subject: genotype-database: Document reading the entire matrix. * topics/genotype-database.gmi: Document reading the entire matrix using the genodb.nparray function. --- topics/genotype-database.gmi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'topics') 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)) ``` -- cgit v1.2.3