Coder Social home page Coder Social logo

jlc-christie / plink2merlin Goto Github PK

View Code? Open in Web Editor NEW
3.0 0.0 3.0 19 KB

Command Line Python Utility to convert from plink format to Abecasis Lab's QTDT format (used by Merlin).

License: Apache License 2.0

Python 100.00%
python python3 plink qtdt identity-by-descent merlin

plink2merlin's People

Contributors

jlc-christie avatar

Stargazers

 avatar  avatar  avatar

plink2merlin's Issues

Read genotypes from .bed file directly

Currently, as explained in the how it works section of the readme, plink is used to prune SNPs in LD and also remove low minor allele frequency variants. However, to read the genotypes for these variants, plink is called again to include only the required SNPs, and then recode used to output in the plaintext (.ped/.map) format, which the genotypes are then read from.

It would likely be a lot faster to instead use --make-bed and read the genotypes directly, since producing and parsing the text file takes up the vast majority of computing time on the script. I chose not to do this, however, as doing this requires testing it well to ensure reading directly from the binary works as expected, and that you're not determining incorrect genotypes.

I may implement this in the future, or in a more generic python module which can perform arbitrary operations on plink binary files, but for now this is quick enough (~10 mins).

PRs referencing this welcome.

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.