Skip to content
Method for reducing uninformative calls in non-invasive prenatal testing
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
.gitignore
Licence.txt
README.md
common.py
evaluate.py
train.py

README.md

Lambda method

Method for reducing number of uninformative calls in non-invasive prenatal testing.

Detailed description of statistical models is in preprint manuscript.

Requirements

Scripts were tested on following configuration

Python3 3.5.2
R 3.2.3

Python requires libraries

numpy (1.11.3)
pandas (0.19.2)
rpy2 (2.8.6)

Usage

Train parameters

python3 train.py --help
usage: train.py [-h] train_dir param_file

Trains parameters for FL a NCV models.Parameters are then utilized in the
evaluate.py script to infer predictions for aneuploidy of diagnosed fetus

positional arguments:
  train_dir   Directory with TSV count files for sample with healthy euploid
              fetus. All files with ".tsv" suffix in the directory would be
              used for training. Count file contains the corrected number or
              reads for each assumed fragment length (50-220, organised in
              columns) and autosomes (chr1..chr22, organised in rows)
  param_file  Output YAML file with trained parameters

Evaluate sample

python3 evaluate.py --help
usage: evaluate.py [-h] counts param_file

Calculates standard and FL-based score for diagnosed sampleand predicts
diagnosis, i.e. positive, false positive, uninformative, negative

positional arguments:
  counts      TSV file with the corrected number or reads for each assumed
              fragment length (50-220, organised in columns) and autosomes
              (chr1..chr22, organised in rows)
  param_file  YAML file with trained parameters (output of the train.py
              script)

Example

Set of test files is located at the examples/ directory.

First train parameters

python3 train.py example/train example/my_params.yaml

Output file example/my_params.yaml should correspond to the pre-computed parameters in example/parameters.yaml.

Now use trained parameters to predict trisomy of chromosome 13, 18 and 21.

Healthy samples should have resulting scores lower than 2.5.

python3 evaluate.py example/test/neg.tsv example/my_params.yaml

Trisomic samples should have scores of affected chromosomes higher than 4.

python3 evaluate.py example/test/t21.tsv example/my_params.yaml

Samples with uninformative score of the NCV method between 2.5 and 4 may be resolved by combination of other methods (SZ+FL).

python3 evaluate.py example/test/unf.tsv example/my_params.yaml

Citation

If you find the method useful, please cite

Budis J, Gazdarica J, Radvanszky J, Szucs G, Kucharik M, Strieskova L, Gazdaricova I, Harsanyova M, Duris F, Minarik G, Sekelska M. Innovative method for reducing uninformative calls in non-invasive prenatal testing. arXiv preprint arXiv:1806.08552. 2018 Jun 22.

You can’t perform that action at this time.