methylmap


Namemethylmap JSON
Version 0.5.5 PyPI version JSON
download
home_pagehttps://github.com/EliseCoopman/methylmap
SummaryPlotting tool for population scale nucleotide modifications.
upload_time2024-12-10 17:06:55
maintainerNone
docs_urlNone
authorElise Coopman
requires_python>=3
licenseMIT
keywords methylation plot
VCS
bugtrack_url
requirements python numpy pandas plotly pyranges scipy dash dash-bootstrap-components htslib samtools
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## METHYLMAP
### EXAMPLE

![GNAS methylmap](assets/1000Genomes_GNAS.png)  

Methylmap is a tool for visualization of modified nucleotide frequencies for large cohort sizes, and allows for quick and easy consulting of nucleotide methylation frequencies of individuals in the 1000Genomes ONT project. 

You can visualize your own data through the methylmap command line tool (bioconda and pypi) and on the methylmap web application https://methylmap.bioinf.be.
Consulting the methylation frequencies of the 1000Genomes ONT project can be done through the methylmap web application.

Installation of the methylmap command line tool:
```
conda install -c bioconda methylmap
pip install methylmap
```

If this application is useful for your research, please cite:
https://www.biorxiv.org/content/10.1101/2022.11.28.518239v1 (methylmap)


https://www.medrxiv.org/content/10.1101/2024.03.05.24303792v1 (the underlying 1000Genomes ONT dataset)

### METHYLMAP WEB APPLICATION
#### INPUT POSSIBILITIES 

The methylmap web application supports the visualization of own modification frequencies data by uploading a tab separated .tsv file. The file should contain the following columns: "chrom", "position", "sample_1", "sample_2", ... "sample_n". Example:
```
chrom	position	sample_1	sample_2	sample_3	sample_4
chr1	100000.0	0.000	0.167	0.000	0.077
chr1	100000.5	0.000	0.000	0.100	0.000
chr1	100001.0	0.000	0.000	0.000	0.222
chr1	100002.0	0.000	0.000	0.000	0.000
chr1	100003.0	0.000	0.000	0.000	0.000
```

#### GENERATING A METHYLATION FREQUENCY TABLE WITH THE MULTIPARSETABLE.PY SCRIPT
The required input table can be generated using the multiparsetable.py script, that supports the following input possibilities:

- BAM/CRAM files with MM and ML tags. 

- files from nanopolish (as processed by calculate_methylation_frequency.py). The methylation calls can additionally be phased using the available scripts in the "scripts" folder.

=> The multiparsetable.py script can be found in the "scripts" folder. Example:
```
python multiparsetable.py --files cramfileA.cram cramfileB.cram --fasta reference.fa --output methfreqtable.tsv --window chr20:58839718-58911192
python multiparsetable.py --files nanopolishfileA.tsv nanopolishfileB.tsv --output methfreqtable.tsv --window chr20:58839718-58911192 
```

#### ANNOTATION FILES
- currently available annotation files on the methylmap website are:

  - https://www.gencodegenes.org/human/release_46.html:   Release 46 (GRCh38.p14) - comprehensive gene annotation

  - https://www.gencodegenes.org/mouse/:                  Release M36 (GRCm39) - comprehensive gene annotation

  If you would like to use another annotation file, please upload your request through the Github Issues page.


### METHYLMAP COMMAND LINE TOOL
#### INPUT POSSIBILITIES
- BAM/CRAM files with MM and ML tags. Use --files input option and --fasta for the reference genome.
- files from nanopolish (as processed by calculate_methylation_frequency.py). The methylation calls can additionally be phased using the available scripts in the "scripts" folder. Use --files input option.
- an own tab separtated table with nucleotide modification frequencies over all positions (methfreqtable), required header names are "chrom" (column with chromosome information) and "position" (columns with position information). Use --table input option. Example:
```
chrom	position	sample_1	sample_2	sample_3	sample_4
chr1	100000.0	0.000	0.167	0.000	0.077
chr1	100000.5	0.000	0.000	0.100	0.000
chr1	100001.0	0.000	0.000	0.000	0.222
chr1	100002.0	0.000	0.000	0.000	0.000
chr1	100003.0	0.000	0.000	0.000	0.000
```
- a tab separated file with an overview table containing all nanopolish or BAM/CRAM files and their sample name and experimental group (header requires "path", "name" and "group"). Use --table input option. When using BAM/CRAM files, please provide the reference genome with the --fasta argument. Example:
```
path    name    group
/home/path_to_file/bamfile_sample_1.bam   samplename_1    case
/home/path_to_file/bamfile_sample_2.bam   samplename_2    control
/home/path_to_file/bamfile_sample_3.bam   samplename_3    control
/home/path_to_file/bamfile_sample_4.bam   samplename_4    case
```

#### EXAMPLE COMMAND LINE TOOL USAGE
Example command line tool usage:
```
methylmap --files cramfileA.cram cramfileB.cram --fasta reference.fa --gff annotation.gff3.gz --window chr20:58839718-58911192
methylmap --files nanopolishfileA.tsv nanopolishfileB.tsv --gff annotation.gff3.gz --window chr20:58839718-58911192 
methylmap --table methfreqtable.tsv  --gff annotation.gff3.gz --window chr20:58839718-58911192
methylmap --table overviewtable.tsv --fasta reference.fa --gff annotation.gff3.gz --window chr20:58839718-58911192                                        (--fasta argument required when files in overviewtable are BAM/CRAM files)
methylmap --files cramfileA.cram cramfileB.cram --fasta reference.fa --gff annotation.gff3.gz --window chr20:58839718-58911192 --names sampleA sampleB sampleC sampleD --groups case control case control
```


#### IMPORTANT INFORMATION
Important: Adding a GFF3 file is required, use the --gff argument. 
  - File should be bgzipped 
  - File should be sorted (use: zcat annotation.gff3.gz  | sort -k1,1V -k4,4n | bgzip > annotation_sorted.gff3.gz)
  - File should be indexed (use: tabix -p gff annotation_sorted.gff3.gz)

Important: When using BAM/CRAM files as input, a reference genome with the --fasta argument is required.

Important: When perfroming hierarchical clustering, missing values are imputed using the pandas interpolate method.


```
usage: methylmap [-h] [-f FILES [FILES ...] | -t TABLE] [-w WINDOW] [-n [NAMES ...]] --gff GFF [--output OUTPUT] [--groups [GROUPS ...]] [-s] [--fasta FASTA]
                 [--mod {m,h}] [--hapl] [--dendro] [--threads THREADS] [--quiet] [--debug] [--host HOST] [--port PORT] [-v]

Plotting tool for population scale nucleotide modifications.

options:
  -h, --help            show this help message and exit
  -f FILES [FILES ...], --files FILES [FILES ...]
                        list with BAM/CRAM files or nanopolish (processed with calculate_methylation_frequency.py) files
  -t TABLE, --table TABLE
                        methfreqtable or overviewtable input
  -w WINDOW, --window WINDOW
                        region to visualise, format: chr:start-end (example: chr20:58839718-58911192)
  -n [NAMES ...], --names [NAMES ...]
                        list with sample names
  --gff GFF             add annotation track based on GFF3 file
  --output OUTPUT       TSV file to write the frequencies to.
  --groups [GROUPS ...]
                        list of experimental group for each sample
  -s, --simplify        simplify annotation track to show genes rather than transcripts
  --fasta FASTA         fasta reference file, required when input is BAM/CRAM files or overviewtable with BAM/CRAM files
  --mod {m,h}           modified base of interest when BAM/CRAM files as input. Options are: m, h, default = m
  --hapl                display modification frequencies in input BAM/CRAM file for each haplotype (alternating haplotypes in methylmap)
  --dendro              perform hierarchical clustering on the samples/haplotypes and visualize with dendrogram on sorted heatmap as output
  --threads THREADS     number of threads to use when processing BAM/CRAM files
  --quiet               suppress modkit output
  --debug               Run the app in debug mode
  --host HOST           Host IP used to serve the application
  --port PORT           Port used to serve the application
  -v, --version         print version and exit
```

### MORE INFORMATION

More information: https://www.biorxiv.org/content/10.1101/2022.11.28.518239v1


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/EliseCoopman/methylmap",
    "name": "methylmap",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": null,
    "keywords": "methylation plot",
    "author": "Elise Coopman",
    "author_email": "elisecoopman@yahoo.com",
    "download_url": "https://files.pythonhosted.org/packages/b2/90/86b97d842ea63b607c7f93bddb137cb250015542e16a31e977c7476c5943/methylmap-0.5.5.tar.gz",
    "platform": null,
    "description": "## METHYLMAP\n### EXAMPLE\n\n![GNAS methylmap](assets/1000Genomes_GNAS.png)  \n\nMethylmap is a tool for visualization of modified nucleotide frequencies for large cohort sizes, and allows for quick and easy consulting of nucleotide methylation frequencies of individuals in the 1000Genomes ONT project. \n\nYou can visualize your own data through the methylmap command line tool (bioconda and pypi) and on the methylmap web application https://methylmap.bioinf.be.\nConsulting the methylation frequencies of the 1000Genomes ONT project can be done through the methylmap web application.\n\nInstallation of the methylmap command line tool:\n```\nconda install -c bioconda methylmap\npip install methylmap\n```\n\nIf this application is useful for your research, please cite:\nhttps://www.biorxiv.org/content/10.1101/2022.11.28.518239v1 (methylmap)\n\n\nhttps://www.medrxiv.org/content/10.1101/2024.03.05.24303792v1 (the underlying 1000Genomes ONT dataset)\n\n### METHYLMAP WEB APPLICATION\n#### INPUT POSSIBILITIES \n\nThe methylmap web application supports the visualization of own modification frequencies data by uploading a tab separated .tsv file. The file should contain the following columns: \"chrom\", \"position\", \"sample_1\", \"sample_2\", ... \"sample_n\". Example:\n```\nchrom\tposition\tsample_1\tsample_2\tsample_3\tsample_4\nchr1\t100000.0\t0.000\t0.167\t0.000\t0.077\nchr1\t100000.5\t0.000\t0.000\t0.100\t0.000\nchr1\t100001.0\t0.000\t0.000\t0.000\t0.222\nchr1\t100002.0\t0.000\t0.000\t0.000\t0.000\nchr1\t100003.0\t0.000\t0.000\t0.000\t0.000\n```\n\n#### GENERATING A METHYLATION FREQUENCY TABLE WITH THE MULTIPARSETABLE.PY SCRIPT\nThe required input table can be generated using the multiparsetable.py script, that supports the following input possibilities:\n\n- BAM/CRAM files with MM and ML tags. \n\n- files from nanopolish (as processed by calculate_methylation_frequency.py). The methylation calls can additionally be phased using the available scripts in the \"scripts\" folder.\n\n=> The multiparsetable.py script can be found in the \"scripts\" folder. Example:\n```\npython multiparsetable.py --files cramfileA.cram cramfileB.cram --fasta reference.fa --output methfreqtable.tsv --window chr20:58839718-58911192\npython multiparsetable.py --files nanopolishfileA.tsv nanopolishfileB.tsv --output methfreqtable.tsv --window chr20:58839718-58911192 \n```\n\n#### ANNOTATION FILES\n- currently available annotation files on the methylmap website are:\n\n  - https://www.gencodegenes.org/human/release_46.html:   Release 46 (GRCh38.p14) - comprehensive gene annotation\n\n  - https://www.gencodegenes.org/mouse/:                  Release M36 (GRCm39) - comprehensive gene annotation\n\n  If you would like to use another annotation file, please upload your request through the Github Issues page.\n\n\n### METHYLMAP COMMAND LINE TOOL\n#### INPUT POSSIBILITIES\n- BAM/CRAM files with MM and ML tags. Use --files input option and --fasta for the reference genome.\n- files from nanopolish (as processed by calculate_methylation_frequency.py). The methylation calls can additionally be phased using the available scripts in the \"scripts\" folder. Use --files input option.\n- an own tab separtated table with nucleotide modification frequencies over all positions (methfreqtable), required header names are \"chrom\" (column with chromosome information) and \"position\" (columns with position information). Use --table input option. Example:\n```\nchrom\tposition\tsample_1\tsample_2\tsample_3\tsample_4\nchr1\t100000.0\t0.000\t0.167\t0.000\t0.077\nchr1\t100000.5\t0.000\t0.000\t0.100\t0.000\nchr1\t100001.0\t0.000\t0.000\t0.000\t0.222\nchr1\t100002.0\t0.000\t0.000\t0.000\t0.000\nchr1\t100003.0\t0.000\t0.000\t0.000\t0.000\n```\n- a tab separated file with an overview table containing all nanopolish or BAM/CRAM files and their sample name and experimental group (header requires \"path\", \"name\" and \"group\"). Use --table input option. When using BAM/CRAM files, please provide the reference genome with the --fasta argument. Example:\n```\npath    name    group\n/home/path_to_file/bamfile_sample_1.bam   samplename_1    case\n/home/path_to_file/bamfile_sample_2.bam   samplename_2    control\n/home/path_to_file/bamfile_sample_3.bam   samplename_3    control\n/home/path_to_file/bamfile_sample_4.bam   samplename_4    case\n```\n\n#### EXAMPLE COMMAND LINE TOOL USAGE\nExample command line tool usage:\n```\nmethylmap --files cramfileA.cram cramfileB.cram --fasta reference.fa --gff annotation.gff3.gz --window chr20:58839718-58911192\nmethylmap --files nanopolishfileA.tsv nanopolishfileB.tsv --gff annotation.gff3.gz --window chr20:58839718-58911192 \nmethylmap --table methfreqtable.tsv  --gff annotation.gff3.gz --window chr20:58839718-58911192\nmethylmap --table overviewtable.tsv --fasta reference.fa --gff annotation.gff3.gz --window chr20:58839718-58911192                                        (--fasta argument required when files in overviewtable are BAM/CRAM files)\nmethylmap --files cramfileA.cram cramfileB.cram --fasta reference.fa --gff annotation.gff3.gz --window chr20:58839718-58911192 --names sampleA sampleB sampleC sampleD --groups case control case control\n```\n\n\n#### IMPORTANT INFORMATION\nImportant: Adding a GFF3 file is required, use the --gff argument. \n  - File should be bgzipped \n  - File should be sorted (use: zcat annotation.gff3.gz  | sort -k1,1V -k4,4n | bgzip > annotation_sorted.gff3.gz)\n  - File should be indexed (use: tabix -p gff annotation_sorted.gff3.gz)\n\nImportant: When using BAM/CRAM files as input, a reference genome with the --fasta argument is required.\n\nImportant: When perfroming hierarchical clustering, missing values are imputed using the pandas interpolate method.\n\n\n```\nusage: methylmap [-h] [-f FILES [FILES ...] | -t TABLE] [-w WINDOW] [-n [NAMES ...]] --gff GFF [--output OUTPUT] [--groups [GROUPS ...]] [-s] [--fasta FASTA]\n                 [--mod {m,h}] [--hapl] [--dendro] [--threads THREADS] [--quiet] [--debug] [--host HOST] [--port PORT] [-v]\n\nPlotting tool for population scale nucleotide modifications.\n\noptions:\n  -h, --help            show this help message and exit\n  -f FILES [FILES ...], --files FILES [FILES ...]\n                        list with BAM/CRAM files or nanopolish (processed with calculate_methylation_frequency.py) files\n  -t TABLE, --table TABLE\n                        methfreqtable or overviewtable input\n  -w WINDOW, --window WINDOW\n                        region to visualise, format: chr:start-end (example: chr20:58839718-58911192)\n  -n [NAMES ...], --names [NAMES ...]\n                        list with sample names\n  --gff GFF             add annotation track based on GFF3 file\n  --output OUTPUT       TSV file to write the frequencies to.\n  --groups [GROUPS ...]\n                        list of experimental group for each sample\n  -s, --simplify        simplify annotation track to show genes rather than transcripts\n  --fasta FASTA         fasta reference file, required when input is BAM/CRAM files or overviewtable with BAM/CRAM files\n  --mod {m,h}           modified base of interest when BAM/CRAM files as input. Options are: m, h, default = m\n  --hapl                display modification frequencies in input BAM/CRAM file for each haplotype (alternating haplotypes in methylmap)\n  --dendro              perform hierarchical clustering on the samples/haplotypes and visualize with dendrogram on sorted heatmap as output\n  --threads THREADS     number of threads to use when processing BAM/CRAM files\n  --quiet               suppress modkit output\n  --debug               Run the app in debug mode\n  --host HOST           Host IP used to serve the application\n  --port PORT           Port used to serve the application\n  -v, --version         print version and exit\n```\n\n### MORE INFORMATION\n\nMore information: https://www.biorxiv.org/content/10.1101/2022.11.28.518239v1\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Plotting tool for population scale nucleotide modifications.",
    "version": "0.5.5",
    "project_urls": {
        "Homepage": "https://github.com/EliseCoopman/methylmap"
    },
    "split_keywords": [
        "methylation",
        "plot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b29086b97d842ea63b607c7f93bddb137cb250015542e16a31e977c7476c5943",
                "md5": "f28b82aa24e22fb640b078218a1e7baa",
                "sha256": "c70e5e5da4a026deb98730e45b32b150c1951fcb33d81954a1548fd44d649765"
            },
            "downloads": -1,
            "filename": "methylmap-0.5.5.tar.gz",
            "has_sig": false,
            "md5_digest": "f28b82aa24e22fb640b078218a1e7baa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 25144,
            "upload_time": "2024-12-10T17:06:55",
            "upload_time_iso_8601": "2024-12-10T17:06:55.688876Z",
            "url": "https://files.pythonhosted.org/packages/b2/90/86b97d842ea63b607c7f93bddb137cb250015542e16a31e977c7476c5943/methylmap-0.5.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-10 17:06:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "EliseCoopman",
    "github_project": "methylmap",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "python",
            "specs": [
                [
                    ">=",
                    "3"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.23.5"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    "==",
                    "2.2.0"
                ]
            ]
        },
        {
            "name": "plotly",
            "specs": [
                [
                    ">=",
                    "5.4.0"
                ]
            ]
        },
        {
            "name": "pyranges",
            "specs": [
                [
                    ">=",
                    "0.0.77"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    "==",
                    "1.10.1"
                ]
            ]
        },
        {
            "name": "dash",
            "specs": [
                [
                    "==",
                    "2.13.0"
                ]
            ]
        },
        {
            "name": "dash-bootstrap-components",
            "specs": [
                [
                    "==",
                    "1.6.0"
                ]
            ]
        },
        {
            "name": "htslib",
            "specs": [
                [
                    "==",
                    "1.16"
                ]
            ]
        },
        {
            "name": "samtools",
            "specs": [
                [
                    "==",
                    "1.16.1"
                ]
            ]
        }
    ],
    "lcname": "methylmap"
}
        
Elapsed time: 4.35865s