Giter VIP home page Giter VIP logo

methplotlib's Introduction

Anaconda-Server Badge Anaconda-Server Badge

METHPLOTLIB

This script generates a browser view on a window using data from
i) nanopolish, either as methylation calls or methylation frequencies (as processed by calculate_methylation_frequency.py). The methylation calls can additionally be phased using scripts/annotate_calls_by_phase.and scripts/split_calls_by_phase.py
ii) nanocompore
iii) in ont-cram format with MM/ML tags according to the SAM specifications
iv) in bedgraph format

INSTALLATION

Creating a new conda environment:
conda create -n methplotlib methplotlib

Or using pip:
pip install methplotlib

USAGE

methplotlib [-h] [-v] -m METHYLATION [METHYLATION ...] -n NAMES
                   [NAMES ...] -w WINDOW [-g GTF] [-b BED] [-f FASTA]
                   [--simplify] [--split] [--static STATIC] [--smooth SMOOTH]
                   [--dotsize DOTSIZE] [--example] [-o OUTFILE] [-q QCFILE]

plotting nanopolish methylation calls or frequency

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         Print version and exit.
  -m, --methylation METHYLATION [METHYLATION ...]
                        data in nanopolish, nanocompore, ont-cram or bedgraph
                        format
  -n, --names NAMES [NAMES ...]
                        names of datasets in --methylation
  -w, --window WINDOW   window (region) to which the visualisation has to be restricted
  -g, --gtf GTF         add annotation based on a gtf file
  -b, --bed BED         add annotation based on a bed file
  -f, --fasta FASTA     required when --window is an entire chromosome, contig or transcript
  --simplify            simplify annotation track to show genes rather than transcripts
  --split               split, rather than overlay the methylation tracks
  --static              Make a static image of the browser window (filename)
  --binary              Make the nanopolish plot ignorning log likelihood nuances
  --smooth              Rolling window size for averaging frequency values (int)
  --dotsize             Control the size of dots in the per read plots (int)
  --example             Show example command and exit.
  -o, --outfile OUTFILE File to write results to. Default:
                        methylation_browser_{chr}_{start}_{end}.html. Use
                        {region} as a shorthand for {chr}_{start}_{end} in the
                        filename. Missing paths will be created.
  -q, --qcfile QCFILE   File to write the qc report to. Default: The path in
                        outfile prefixed with qc_, default is qc_report_methyl
                        ation_browser_{chr}_{start}_{end}.html. Use {region}
                        as a shorthand for {chr}_{start}_{end} in the
                        filename. Missing paths will be created.

Snakemake workflow

For streamlining nanopolish a Snakefile is included (using snakemake). The workflow uses a config file, of which an example is in this repository.

Example data

The examples folder contains calls and frequencies for the human ACTB gene from PromethION sequencing of NA19240. An example command is available.

Companion scripts

The scripts folder contains scripts for phasing modification calls in haplotypes based on WhatsHap phasing, allele specific modification testing for phased data and differential modification testing across subjects.

TO DO - CONTRIBUTIONS WELCOME

  • Outlier detection (in windows) across samples

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.