GithubHelp home page GithubHelp logo

rnaimehaom / bioscripts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zilong-li/bioscripts

0.0 0.0 0.0 1.28 MB

Cool Bioinformatics Scripts

License: GNU General Public License v3.0

Shell 7.75% C++ 2.58% Python 33.14% R 4.44% Julia 3.98% CSS 48.10%

bioscripts's Introduction

Cool Bioinformatics Scripts

qqplot

You can use make a QQ plot in the following ways.

  • one-liner for reading tons of millions of P values from the pipe
# python 
zcat pval.txt.gz | qqplot.py -out test -title "QQ plot on the fly"
# julia (recommand to run it in the REPL)
zcat pval.txt.gz | qqplot.jl --out test --title "QQ plot on the fly"

warning : If you have 100 billion P values to process you should definitely use qqplot.jl instead of qqplot.py. The hourly processed number of lines of julia version is 5 billion while python is only 700 million on my server.

  • running in a julia REPL (recommanded)
include("qqplot.jl")
cmd = pipeline(`zcat pval.gz`, `awk 'NR>1{print $10}'`)
sigp, expp = qqfly("test", cmd=cmd)
  • use qqplot.py in your script
import numpy as np
from qqplot import qq
p = np.random.random(1000000)
qq(x=p, figname="test.png")

image/qqplot.png

fixref

Before running bcftools merge, you maybe need to fix the ref and alt and corresponding genotypes, otherwise bcftools will surprise you.

usage: fixref.py [-h] REF_VCF IN_VCF OUT_VCF

calculate genotype discordance

When you run imputation analysis with BEAGLE (or other imputation tools), you may want to know the distribution of genotype discordance between the original vcf and imputed vcf.

usage: calc_imputed_gt_discord.py [-h] [-chr STRING] VCF1 VCF2 OUT

warning : Before running the script, you must be sure the two vcfs have the exact same sites and samples for each chromosome.

image/calc_imputed_gt_discord.png

R2 vs MAF plot

plot INFO/R2 after imputation by BEAGLE etc.

image/r2-vs-maf.png

Phylogenetic Tree

image/njtree-circular.png

bioscripts's People

Contributors

zilong-li avatar

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.