Git Product home page Git Product logo

plot_transcripts_filtering.py's Introduction

Plot transcripts filtering

Python script to plot the number of transcript left after filtering a RSEM count matrix. Will also output the information as a tsv file. A transcript is filtered if its expression is not higher than the threshold in any of the samples.

Motivation

Useful to assess the level of filtering a transcriptomic assembly will need (lowly expressed transcripts are often artifacts). However, keep in mind that some relevant transcripts are just lowly expressed.

Usage

python plot_trancripts_filtering.py -i matrix -r start,stop,step -o outputDir

matrix: RSEM [1] matrix of gene expression (any matrix with samples as columns and transcripts as rows should work, the first line will be considered as a header and will be skipped).

start,stop,step: The filtering range (default: 0, 6, 0.5)

outputDir: The output directory (default current directory)

-n: will skip the plot creation, useful if you have no graphics (you will encounter the "no display available" error).

-v: activate the verbose mode, without this option, the script will be silent (except for errors)

Output

For each threshold, the plot prints the number of transcripts left:

alt text

[1] http://deweylab.biostat.wisc.edu/rsem/README.html

Dependancies

This script uses bash commands to get the number of transcripts at each threshold, so you will need the following executables (all of them are available by default on Linux Systems).

    awk
    tail
    wc

You will also need the following python packages: Note: The following python packages are already built-in from python2.7 and do not need to be installed:

 getopt 
 subprocess 
 sys 
 os 
 shlex
  • Python v2 or v3
  • The following python packages: numpy, matplotlib.pyplot, getopt, subprocess, sys, os, shlex.

plot_transcripts_filtering.py's People

Contributors

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