How to read plink data in practice!
Sorry, I want to read the data in plin format, but the reading is always wrong. Could you please provide me with a reading template?
import sgkit as sg
sg.io.plink.read_plink(path='/home/8_sgkit/00_plink', bed_path='1003_maf.0.01.bed', bim_path='1003_maf.0.01.bim', fam_path='1003_maf.0.01.fam', )
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'sgkit.io' has no attribute 'plink'
Try
from sgkit.io.plink import read_plink
read_plink(...)
Thank you very much. It worked
Great - I think we need to add something to the docs.
sorry, I wanted to use sgkit to select some individuals from all samples, but the code in the references I looked for didn't work.
reference: [https://pystatgen.github.io/sgkit/latest/how_do_i.html#id10]
ds.sel(samples=ds.sample_id.isin(['Li_01', 'Li_02', 'Li_03',]))
KeyError: 'Indexing with a boolean dask array is not allowed. This will result in a dask array of unknown shape. Such arrays are unsupported by Xarray.Please compute the indexer first using .compute()'