Git Product home page Git Product logo

plotcoverageexons.py's Introduction

plotCoverageExons.py

Plot the coverage at some specific region from multiple bam files:

./plotCoverageExons.py [-p <geneposition>] [-o <outfile>.pdf] [-options] <bamfile1> [<bamfile2> ...]

This grew over time, please excuse the bad code

  • Uses pysam to get pile up reads covering the selected regions
  • Plots the coverage using matplotlib
  • Allows grouping of samples and other customization

Example

example

Full usage

./plotCoverageExons.py [-p <geneposition>] [-options] <bamfile1> [<bamfile2> ...]

-p <geneposition>          specify genomic position with: <chromosome>:<start>-<end>
-z <sizefactor1>,<sf2>,... specify normalization size factors for each bamfile in order
-s <+|->                   specify strand ( + or - ) to be included in plot title
-e <start>-<end>,<s-e>,... select feature regions to be plotted exclusively
-l <label1>,<l2>,...       specify labels for the regions
-c <condition1>,<c2>,...   specify patterns to group bamfiles by filename
-n <name1>,<n2>,...        specify names for the condition groups
-u <uname>                 include unmatched bamfiles under name <uname>
-a                         average samples of the same condition, default off (plot all samples)
-L                         set logarithmic scale for the y-axis
-S                         add smoothed curve (rolling mean of 49-mers, twice applied)
-f                         enable samtools-like filtering of reads (default no filtering)
-o <file>                  specify output filename and thus output format
-P <file>                  only write coverage data to pickle file

Dependencies

  • python
  • matplotlib
  • numpy
  • pysam

This list is potentially incomplete.

Create a conda enviroment

conda env create --file ./plotCoverageExons.yaml
conda activate plotCoverageExons

plotcoverageexons.py's People

Contributors

marielataretu avatar raverjay avatar

Stargazers

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