Command line interface

(Source code)

Introduction

Limix now provides a couple of its functionalities via command line.

$ limix --help
Usage: limix [OPTIONS] COMMAND [ARGS]...

Options:
  --version   Show the version and exit.
  -h, --help  Show this message and exit.

Commands:
  download          Download file from the specified URL.
  estimate-kinship  Estimate a kinship matrix.
  extract           Extract a file.
  qtl               Perform genome-wide association scan.
  remove            Remove a file.
  see               Show an overview of multiple file types.

You can quickly explore common file types used in genetics, as examples given bellow will demonstrate.

Kinship

Heatmap representing a plink kinship matrix.

$ limix download http://rest.s3for.me/limix/small_example.grm.raw.bz2
Downloading http://rest.s3for.me/limix/small_example.grm.raw.bz2... done (0.39 seconds).
$ limix extract small_example.grm.raw.bz2
Extracting small_example.grm.raw.bz2... done (0.06 seconds).
$ limix see small_example.grm.raw
Reading small_example.grm.raw... done (0.18 seconds).
Plotting...

(Source code, png)

_images/cli-2.png

BIMBAM file formats

Phenotype:

$ limix download http://rest.s3for.me/limix/ex0/phenotype.gemma
Downloading http://rest.s3for.me/limix/ex0/phenotype.gemma... done (0.28 seconds).
$ limix see phenotype.gemma:bimbam-pheno
Reading `phenotype.gemma`... done (0.02 seconds).
---- Phenotypes -----
trait     0    1    2
sample               
0       1.2 -0.3 -1.5
1       NaN  1.5  0.3
2       2.7  1.1  NaN
3      -0.2 -0.7  0.8
4       3.3  2.4  2.1

(Source code)

HDF5

The following command shows the hierarchy of a HDF5 file:

$ limix download http://rest.s3for.me/limix/small_example.hdf5
Downloading http://rest.s3for.me/limix/small_example.hdf5... done (0.38 seconds).
$ limix see small_example.hdf5
/
  +--genotype
     +--col_header
     |  +--chrom [|S8, (100,), None]
     |  +--pos [int64, (100,), None]
     +--matrix [uint8, (183, 100), None]
     +--row_header
        +--sample_ID [|S7, (183,), None]

(Source code)

CSV

CSV files have their delimiter automatically detected and a preview can be shown as

$ limix download http://rest.s3for.me/limix/small_example.csv.bz2
Downloading http://rest.s3for.me/limix/small_example.csv.bz2... done (0.27 seconds).
$ limix extract small_example.csv.bz2
Extracting small_example.csv.bz2... done (0.05 seconds).
$ limix see small_example.csv
Reading small_example.csv... done (0.13 seconds).
               0   1   2   3   4   5   6   7    ... 458 459 460 461 462 463 464 465
0  snp_22_16050408   A   A   A   A   A   A   A  ...   B   B   B   B   B   B   B   B
1  snp_22_16050612   A   A   A   A   A   A   A  ...   B   B   B   B   B   B   B   B
2  snp_22_16050678   A   A   A   A   A   A   A  ...   B   B   B   B   B   B   B   B
3  snp_22_16051107   A   A   A   A   A   A   A  ...   B   B   B   B   B   B   B   B
4  snp_22_16051249   A   A   A   A   A   A   A  ...   B   B   B   B   C   C   B   B

[5 rows x 466 columns]

(Source code)

Image

An image can be seen via

$ limix download http://rest.s3for.me/limix/dali.jpg.bz2
Downloading http://rest.s3for.me/limix/dali.jpg.bz2... done (0.65 seconds).
$ limix extract dali.jpg.bz2
Extracting dali.jpg.bz2... done (0.07 seconds).
$ limix see dali.jpg

(Source code, png)

_images/cli-7.png

GWAS

$ limix qtl --help
Usage: limix qtl [OPTIONS] COMMAND [ARGS]...

  Perform genome-wide association scan.

Options:
  -h, --help  Show this message and exit.

Commands:
  scan  Single-variant association testing via mixed models.

(Source code)