File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ def run(self):
133133 ],
134134 package_data = {"pysnptools" : [
135135 "util/pysnptools.hashdown.json" ,
136+ "tests/mintest.py" ,
136137 ]
137138 },
138139 install_requires = install_requires ,
Original file line number Diff line number Diff line change 1+ # Download a sample file
2+ from pysnptools .util import example_file
3+ bgen_file = example_file ("pysnptools/examples/example.bgen" )
4+
5+ # Read from the file
6+ from pysnptools .distreader import Bgen
7+ bgen = Bgen (bgen_file ) # Create a reader
8+ probs0 = bgen [:,0 ].read ().val # Read 1st SNP
9+ print (probs0 .shape ) # Shape of the NumPy array
10+ assert probs0 .shape == (500 ,1 ,3 )
11+
12+ probs_all = bgen .read ().val # Read all variants
13+ print (probs_all .shape ) # Shape of the NumPy array
14+ assert probs_all .shape == (500 ,199 ,3 )
You can’t perform that action at this time.
0 commit comments