methplotlib


Namemethplotlib JSON
Version 0.21.2 PyPI version JSON
download
home_pagehttps://github.com/wdecoster/methplotlib
SummaryPlot methylation data obtained from nanopolish
upload_time2024-05-23 13:50:55
maintainerNone
docs_urlNone
authorWouter De Coster
requires_python>=3
licenseMIT
keywords nanopore
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            [![Anaconda-Server Badge](https://anaconda.org/bioconda/methplotlib/badges/version.svg)](https://anaconda.org/bioconda/methplotlib)
[![Anaconda-Server Badge](https://anaconda.org/bioconda/methplotlib/badges/license.svg)](https://anaconda.org/bioconda/methplotlib)

# METHPLOTLIB

This script generates a browser view on a window using data from  
i) [nanopolish](https://github.com/jts/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](https://github.com/tleonardi/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](https://whatshap.readthedocs.io/en/latest/) phasing, allele specific modification testing for phased data and differential modification testing across subjects.

## TO DO - CONTRIBUTIONS WELCOME
- Outlier detection (in windows) across samples

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/wdecoster/methplotlib",
    "name": "methplotlib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": null,
    "keywords": "nanopore",
    "author": "Wouter De Coster",
    "author_email": "decosterwouter@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/fc/ca/efaa369c1ef33da77c9e9ad67efab69e12f6a36e296303d2be891ee0fd8e/methplotlib-0.21.2.tar.gz",
    "platform": null,
    "description": "[![Anaconda-Server Badge](https://anaconda.org/bioconda/methplotlib/badges/version.svg)](https://anaconda.org/bioconda/methplotlib)\n[![Anaconda-Server Badge](https://anaconda.org/bioconda/methplotlib/badges/license.svg)](https://anaconda.org/bioconda/methplotlib)\n\n# METHPLOTLIB\n\nThis script generates a browser view on a window using data from  \ni) [nanopolish](https://github.com/jts/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  \nii) [nanocompore](https://github.com/tleonardi/nanocompore)  \niii) in ont-cram format with MM/ML tags according to the SAM specifications  \niv) in bedgraph format  \n\n## INSTALLATION\n\nCreating a new conda environment:  \n`conda create -n methplotlib methplotlib`\n\nOr using pip:  \n`pip install methplotlib`\n\n\n\n## USAGE\n```\nmethplotlib [-h] [-v] -m METHYLATION [METHYLATION ...] -n NAMES\n                   [NAMES ...] -w WINDOW [-g GTF] [-b BED] [-f FASTA]\n                   [--simplify] [--split] [--static STATIC] [--smooth SMOOTH]\n                   [--dotsize DOTSIZE] [--example] [-o OUTFILE] [-q QCFILE]\n\nplotting nanopolish methylation calls or frequency\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -v, --version         Print version and exit.\n  -m, --methylation METHYLATION [METHYLATION ...]\n                        data in nanopolish, nanocompore, ont-cram or bedgraph\n                        format\n  -n, --names NAMES [NAMES ...]\n                        names of datasets in --methylation\n  -w, --window WINDOW   window (region) to which the visualisation has to be restricted\n  -g, --gtf GTF         add annotation based on a gtf file\n  -b, --bed BED         add annotation based on a bed file\n  -f, --fasta FASTA     required when --window is an entire chromosome, contig or transcript\n  --simplify            simplify annotation track to show genes rather than transcripts\n  --split               split, rather than overlay the methylation tracks\n  --static              Make a static image of the browser window (filename)\n  --binary              Make the nanopolish plot ignorning log likelihood nuances\n  --smooth              Rolling window size for averaging frequency values (int)\n  --dotsize             Control the size of dots in the per read plots (int)\n  --example             Show example command and exit.\n  -o, --outfile OUTFILE File to write results to. Default:\n                        methylation_browser_{chr}_{start}_{end}.html. Use\n                        {region} as a shorthand for {chr}_{start}_{end} in the\n                        filename. Missing paths will be created.\n  -q, --qcfile QCFILE   File to write the qc report to. Default: The path in\n                        outfile prefixed with qc_, default is qc_report_methyl\n                        ation_browser_{chr}_{start}_{end}.html. Use {region}\n                        as a shorthand for {chr}_{start}_{end} in the\n                        filename. Missing paths will be created.\n\n```\n\n## Snakemake workflow\nFor streamlining nanopolish a Snakefile is included (using snakemake). The workflow uses a config file, of which an example is in this repository.\n\n## Example data\nThe `examples` folder contains calls and frequencies for the human ACTB gene from PromethION sequencing of NA19240. An example command is available.\n\n## Companion scripts\nThe `scripts` folder contains scripts for phasing modification calls in haplotypes based on [WhatsHap](https://whatshap.readthedocs.io/en/latest/) phasing, allele specific modification testing for phased data and differential modification testing across subjects.\n\n## TO DO - CONTRIBUTIONS WELCOME\n- Outlier detection (in windows) across samples\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Plot methylation data obtained from nanopolish",
    "version": "0.21.2",
    "project_urls": {
        "Homepage": "https://github.com/wdecoster/methplotlib"
    },
    "split_keywords": [
        "nanopore"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fccaefaa369c1ef33da77c9e9ad67efab69e12f6a36e296303d2be891ee0fd8e",
                "md5": "e1850729d5237495983d157689887883",
                "sha256": "12f487986c3296efa03c05091c0feeb99337aef7e009f7df747280481b9a8c3f"
            },
            "downloads": -1,
            "filename": "methplotlib-0.21.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e1850729d5237495983d157689887883",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 26210,
            "upload_time": "2024-05-23T13:50:55",
            "upload_time_iso_8601": "2024-05-23T13:50:55.747465Z",
            "url": "https://files.pythonhosted.org/packages/fc/ca/efaa369c1ef33da77c9e9ad67efab69e12f6a36e296303d2be891ee0fd8e/methplotlib-0.21.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-23 13:50:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wdecoster",
    "github_project": "methplotlib",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "methplotlib"
}
        
Elapsed time: 0.23744s