Giter Club home page Giter Club logo

plotter's Introduction

GWAS Plotter

./EXAMPLE.png

Installation

This program relies on a number of libraries specified in requirements.txt. The best way to use it is to create a Python virtual environment and then install these packages in it. Additionally, having fzf installed on the system is required for the QTL trait selection menu. Please note that the data.txt file mentioned in the examples is too large for github, hence it can be found at this link.

Usage

For the most basic usage, just pass the file to the program like such:

./plot.py data.csv
# or in the case of rQTL files
./plot.py data.txt --line

After this, resize the plot and click on markers of interest to select them. The plotter comes with 13 optional command-line arguments that can be used to control various parameters

--hover (RECOMMENDED)

This option shows the details of the marker the mouse pointer is currently hovering over in a tooltip. Users can right-click to toggle hover on and off.

./plot.py data.csv --hover

--two-color

This option makes the plotter use two colors instead of multiple colors.

./plot.py data.csv --two-color

--peak

This option draws a vertical line through the peak value.

./plot.py data.csv --two-color

--threshold

This option draws a threshold line at a given -logP value.

./plot.py data.csv --threshold 2.0

--debug or -d

This option prints debugging-related messages.

./plot.py data.csv -d

--line

This option makes the program draw a QTL plot instead of a Manhattan plot.

./plot.py data.txt --line

--markers

When passed a file containing names of markers to this option, the program automatically selects (marks) them.

./plot.py data.csv --markers markers.txt

--marker-file

Path to the marker file for QTL plots

./plot.py data.txt --line --marker-file qtl_markers.txt

--trait

Trait name to be selected in the QTL plot. If this is not selected, a fzf-based selection menu is shown.

./plot.py data.txt --line --trait "AT1G01160" --marker-file qtl_markers.txt

--chromosome

When passed a character, only the chromosome with a matching name is shown.

./plot.py data.csv --chromosome 2

--snp-density

This option makes the program draw the SNP density when used in conjunction with --chromosome

./plot.py data.csv --chromosome 2 --snp-density

--bin-size

This option sets the bin size for SNP density.

./plot.py data.csv --chromosome 2 --snp-density --bin-size 15000

--centromeres

When passed the path to a centromere file, it draws vertical lines at the centromere positions.

./plot.py data.csv --centromeres p-arm-length.txt

Examples

To draw a Manhattan plot with hovering, peak line, threshold line and centromere lines

./plot.py data.csv --peak --threshold 2.0 --hover --centromeres p-arm-length.txt

To draw a QTL plot with a marker file, hovering, peak line, threshold line and with menu selection for the desired trait

./plot.py data.txt --line --marker-file marker.txt --peak --threshold 1.0 --hover

To draw the single chromosome โ€˜2โ€™ with SNP density, hover, peak line and threshold line

./plot.py data.csv --peak --threshold 2.0 --hover --chromosome 2 --snp-density

plotter's People

Contributors

cel7t avatar

Stargazers

Bihart avatar

Watchers

 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.