Giter Club home page Giter Club logo

ot's Introduction

OpenTargets code test

Installation

pip install git+https://github.com/sashabaranov/ot.git

Problem A

Main script to use in this package is tv-calculate-assoc-score:

% tv-calculate-assoc-score --help
Usage: tv-calculate-assoc-score [OPTIONS]

  Calculates max, min, avg and stddev of association_score.overall

Options:
  -d, --disease TEXT  Process disease
  -t, --target TEXT   Process target
  --help              Show this message and exit.

Example:

tv-calculate-assoc-score -t ENSG00000157764
tv-calculate-assoc-score -d EFO_0002422

(looks like API is broken and returs 1 in association_score.overall)

Problem B

Solution for problem B is located in scripts/problem-b. Usage:

% scripts/problem-b --help
Usage: problem-b [OPTIONS] FILENAME OUTPUT_CSV

  Counts academic nausea for given files. Output is stored to sqlite db.

Options:
  --nprocs INTEGER   Number of processes to utilize
  --debug            Print debug output
  --calculate-pairs  Calculate target-target pairs sharing 2+ diseases
  --help             Show this message and exit.

The --calculate-pairs triggers calculations for second part of a problem.

Example:

% time scripts/problem-b --calculate-pairs --debug --nprocs 4 /Users/scrat/Downloads/16.08_evidence_data.json output.csv
(Process-2 - problem-b:18//DEBUG)   Reader started
(PoolWorker-3 - problem-b:30//DEBUG)    Worker started
(PoolWorker-4 - problem-b:30//DEBUG)    Worker started
(PoolWorker-5 - problem-b:30//DEBUG)    Worker started
(PoolWorker-6 - problem-b:30//DEBUG)    Worker started
(Process-2 - problem-b:25//DEBUG)   Reader stopped
(PoolWorker-6 - problem-b:42//DEBUG)    Worker stopped
(PoolWorker-5 - problem-b:42//DEBUG)    Worker stopped
(PoolWorker-3 - problem-b:42//DEBUG)    Worker stopped
(PoolWorker-4 - problem-b:42//DEBUG)    Worker stopped
(MainProcess - problem-b:130//DEBUG)    Result reading finished
(MainProcess - problem-b:132//DEBUG)    Writing results to csv
(MainProcess - problem-b:140//DEBUG)    Calculating pairs
144507250
(MainProcess - problem-b:143//INFO) Done
scripts/problem-b --calculate-pairs --debug --nprocs 4  output.csv  2179.03s user 1141.09s system 230% cpu 23:58.85 total

ot's People

Contributors

sashabaranov avatar

Watchers

James Cloos avatar  avatar

ot's Issues

The API is not broken

Hi Alexander, the API is working as expected, you might want to have an other look at the docs. You still have some time available if you wish to submit an updated version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.