methylmap


Namemethylmap JSON
Version 0.5.4 PyPI version JSON
download
home_pagehttps://github.com/EliseCoopman/methylmap
SummaryPlotting tool for population scale nucleotide modifications.
upload_time2024-09-12 08:06:28
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. 

The tools is available through bioconda and pypi, and can be installed using the following commands:
```
conda install -c bioconda methylmap
pip install methylmap
```

or through the methylmap web application at https://methylmap.bioinf.be.
 
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
```

Such a 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.

### 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. 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
```

#### USAGE
Important: When using the command line tool, data from the 1000Genomes ONT project is not available. Please use the web application for this data.

Important: Adding a GFF/GTF file is required, use the --gff/--gtf option.

Important: When using BAM/CRAM files as input, the --fasta option 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] --db DB [--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, --gtf GFF  add annotation track based on GTF/GFF file
  --output OUTPUT       TSV file to write the overview table with modification 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
  --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/67/67/a32ed246b03d9e23c3de0e98576506162f3161bed0f6af21b11614c3ed45/methylmap-0.5.4.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\nThe tools is available through bioconda and pypi, and can be installed using the following commands:\n```\nconda install -c bioconda methylmap\npip install methylmap\n```\n\nor through the methylmap web application at https://methylmap.bioinf.be.\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\nSuch a table can be generated using the multiparsetable.py script, that supports the following input possibilities:\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### 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. 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#### USAGE\nImportant: When using the command line tool, data from the 1000Genomes ONT project is not available. Please use the web application for this data.\n\nImportant: Adding a GFF/GTF file is required, use the --gff/--gtf option.\n\nImportant: When using BAM/CRAM files as input, the --fasta option is required.\n\nImportant: When perfroming hierarchical clustering, missing values are imputed using the pandas interpolate method.\n\n```\nusage: methylmap [-h] [-f FILES [FILES ...] | -t TABLE] [-w WINDOW] [-n [NAMES ...]] --gff GFF [--output OUTPUT] [--groups [GROUPS ...]]\n                 [-s] [--fasta FASTA] [--mod {m,h}] [--hapl] [--dendro] [--threads THREADS] --db DB [--quiet] [--debug] [--host HOST]\n                 [--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, --gtf GFF  add annotation track based on GTF/GFF file\n  --output OUTPUT       TSV file to write the overview table with modification 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\n                        output\n  --threads THREADS     number of threads to use when processing BAM/CRAM files\n  --quiet               suppress modkit output\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\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.4",
    "project_urls": {
        "Homepage": "https://github.com/EliseCoopman/methylmap"
    },
    "split_keywords": [
        "methylation",
        "plot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6767a32ed246b03d9e23c3de0e98576506162f3161bed0f6af21b11614c3ed45",
                "md5": "0721a518a2a1dea53e79c99aa452ef44",
                "sha256": "774fca972d16efbc1cce5b1f7a0b2876cb9526f24c6ba2e886a59f4006b11679"
            },
            "downloads": -1,
            "filename": "methylmap-0.5.4.tar.gz",
            "has_sig": false,
            "md5_digest": "0721a518a2a1dea53e79c99aa452ef44",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 26031,
            "upload_time": "2024-09-12T08:06:28",
            "upload_time_iso_8601": "2024-09-12T08:06:28.597153Z",
            "url": "https://files.pythonhosted.org/packages/67/67/a32ed246b03d9e23c3de0e98576506162f3161bed0f6af21b11614c3ed45/methylmap-0.5.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-12 08:06:28",
    "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: 0.90774s