Code Monkey home page Code Monkey logo

geneview's Introduction

Geneview: A python package for genomics data visualization

Geneview is a Python visualization library base on matplotlib. It provides a high-level interface for drawing attractive genomics graphics. And now it is actively developed.

Documentation

Examples

We use a dataset GOYA_preview which is in geneview-data repository, as the input for the plots below. Here is the format preview of GOYA_preview: GOYA format

A basic example for Manhattan plot.

import matplotlib.pyplot as plt
import geneview as gv

df = gv.util.load_dataset('GOYA_preview')  # df is DataFrame of pandas
xtick = ['chr'+c for c in map(str, range(1, 15) + ['16', '18', '20', '22'])]
gv.gwas.manhattanplot(df[['chrID','position','pvalue']],  
                         xlabel="Chromosome", 
                         ylabel="-Log10(P-value)", 
                         xticklabel_kws={'rotation': 'vertical'},
                         xtick_label_set = set(xtick))
plt.show()

manhattanplot

A basic example for QQ plot.

import matplotlib.pyplot as plt
import geneview as gv

df = gv.util.load_dataset('GOYA_preview')  # df is DataFrame of pandas
gv.gwas.qqplot(df['pvalue'], color="#00bb33",
               xlabel="Expected p-value(-log10)",
               ylabel="Observed p-value(-log10)")
plt.show()

qqplot

Citing

Dependencies

  • Python 2.7 or Python 3.4+

Mandatory

Recommended

We need the data structures: DataFrame and Series in pandas. It's easy and worth to learn, click here to see more detail tutorial for these two data type.

Installation

To install the released version, just do

pip install geneview

You may instead want to use the development version from Github, by running

pip install git+git://github.com/ShujiaHuang/geneview.git#egg=geneview

Testing

Development

License

Released under a BSD (3-clause) license

geneview's People

Contributors

shujiahuang avatar

Watchers

 avatar  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.