limix.io.gen.read¶
- limix.io.gen.read(prefix, verbose=True)[source]¶
Read GEN files into Pandas data frames.
- Parameters
prefix (str) – Path prefix to the set of GEN files.
- Returns
sample (dask dataframe)
genotype (dask dataframe)
Examples
>>> from limix.io.gen import read >>> from limix import file_example >>> >>> with file_example(["example.gen", "example.sample"]) as filepaths: ... data = read(filepaths[0][:-4]) >>> >>> print(data['sample']) sample_id subject_id missing gender age age_of_onset phenotype_1 sample 1A0 1A0 W001 0.00000 2 4 -9 0 1A1 1A1 W002 0.00000 2 4 -9 0 1A2 1A2 W003 0.00000 2 4 -9 1 1A3 1A3 W004 0.09000 2 4 -9 1 1A4 1A4 W005 0.00000 2 4 -9 1 >>> print(data['genotype'].head()) snp_id rs_id pos alleleA alleleB 1A0 1A1 1A2 1A3 \ AA AB BB AA AB BB AA AB BB AA candidate SA1 SA1 rs001 10000000 A G 0 0 1 0 0 1 0 0 1 0 SA2 SA2 rs002 10010000 A G 0 0 1 0 1 0 1 0 0 0 SA3 SA3 rs003 10020000 C T 1 0 0 0 1 0 0 0 1 0 SA4 SA4 rs004 10030000 G T 1 0 0 0 1 0 0 0 1 0 SA5 SA5 rs005 10040000 C G 0 0 1 0 1 0 1 0 0 0 1A4 AB BB AA AB BB candidate SA1 0.42770 0.57210 0 0.02070 0.97920 SA2 1.00000 0.00000 1 0.00000 0.00000 SA3 0.99670 0.00000 0 0.00000 1.00000 SA4 1.00000 0.00000 0 0.00000 1.00000 SA5 1.00000 0.00000 1 0.00000 0.00000