{"id":13943044,"url":"https://github.com/rnajena/magnipore","last_synced_at":"2025-12-30T09:07:21.261Z","repository":{"id":63825437,"uuid":"545997776","full_name":"rnajena/magnipore","owner":"rnajena","description":"Magnipore: Differential single nucleotide changes of ONT signals","archived":false,"fork":false,"pushed_at":"2024-03-04T13:16:47.000Z","size":2300,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-20T23:38:57.926Z","etag":null,"topics":["comparative-analysis","epigenomics","epitranscriptomics","ont","oxford-nanopore","raw-signal"],"latest_commit_sha":null,"homepage":"","language":"Red","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rnajena.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-10-05T10:46:19.000Z","updated_at":"2024-01-16T10:13:54.000Z","dependencies_parsed_at":"2024-03-04T14:28:11.732Z","dependency_job_id":"7f3fc97a-b0cf-49da-8a35-3578c91c84cb","html_url":"https://github.com/rnajena/magnipore","commit_stats":null,"previous_names":["rnajena/magnipore","jannessp/magnipore"],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnajena%2Fmagnipore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnajena%2Fmagnipore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnajena%2Fmagnipore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnajena%2Fmagnipore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rnajena","download_url":"https://codeload.github.com/rnajena/magnipore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226757084,"owners_count":17677070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["comparative-analysis","epigenomics","epitranscriptomics","ont","oxford-nanopore","raw-signal"],"created_at":"2024-08-08T03:00:37.110Z","updated_at":"2025-12-30T09:07:21.246Z","avatar_url":"https://github.com/rnajena.png","language":"Red","funding_links":[],"categories":["Software packages"],"sub_categories":["RNA modification analysis"],"readme":"# ![](figures/magnipore_logo.png)\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-teal.svg)](https://www.gnu.org/licenses/gpl-3.0)![conda](https://img.shields.io/badge/Uses-conda-green.svg)\n\n[![Conda package](https://anaconda.org/jannessp/magnipore/badges/version.svg)](https://anaconda.org/jannessp/magnipore) ![Conda](https://img.shields.io/conda/dn/jannessp/magnipore)\n[![Conda package](https://anaconda.org/jannessp/magnipore/badges/latest_release_date.svg)](https://anaconda.org/jannessp/magnipore) [![Conda package](https://anaconda.org/jannessp/magnipore/badges/platforms.svg)](https://anaconda.org/jannessp/magnipore)\n\n[![DOI](https://zenodo.org/badge/545997776.svg)](https://zenodo.org/badge/latestdoi/545997776)\n\n[![Twitter Follow](https://img.shields.io/twitter/follow/Ja_Spangenberg)](https://twitter.com/Ja_Spangenberg)\n\n\n\u003eIf you find a bug, please add it to the issues on GitHub with a detailed description.\n___\n1.  [Installation via Conda](#installation-via-conda)\n2.  [Description](#description)\n3.  [Dependencies](#dependencies)\n4.  [Workflow](#workflow)\n5.  [Usage](#usage)\n6.  [Output File Description](#output-file-description)\n7.  [Error Codes Explanation](#error-codes-explanation)\n___\n## Installation via Conda\n\nTo install Magnipore we recommend to use Conda:\nMagnipore is available for **linux-64 and osx-64**.\n\n```bash\nconda install mamba\nmamba create -n magnipore -c jannessp magnipore\nconda activate magnipore\n```\n\nIf you want to basecall your ONT data you also need a Guppy version from [Oxford Nanopore Technologies](https://community.nanoporetech.com).\n\n---\n\n## Description\n\nMagnipore is a tool written in python3 to analyze and pair-wise compare sequencing samples from Oxford Nanopore Technologies (ONT) sequencing.\n\nMagnipore compares two ONT samples on a signal level to find differential signals between them in single base resolution.\nSuch differences are caused by mutations or modifications.\nMagnipore classifies these differences and provides the user with a position-wise comparison.\n\n---\n\n## Dependencies\n\nMagnipore depends on/requires other tools to preprocess and analyze the data.\n\n\u003cdetails\u003e\u003csummary\u003eClick here to see dependencies\u003c/summary\u003e\n\nConda Dependencies\n- python (\u003e=3.8,\u003c3.11)\n- h5py\u003e=3.7\n- biopython\u003e=1.80\n- mafft\u003e=7.508\n- matplotlib\u003e=3.6.2\n- numpy\u003e=1.23\n- scipy\u003e=1.9\n- winnowmap\u003e=2.0\n- pandas\u003e=1.5\n- seaborn\u003e=0.12\n- psutil\u003e=5.9\n- hdf5plugin\u003e=3.3.1\n- ont_vbz_hdf_plugin\u003e=1.0.1\n- pytest\u003e=7.1\n- gzip\u003e=1.12\n- read5\u003e=1.1.6\n- f5c\u003e=1.2\n- read5\u003e=1.2.0\n\n\u003c/details\u003e\n\n---\n\n## Workflow\n\n### Input\n\nFor each sample in the comparison, Magnipore takes:\n- (FASTA) exactly ONE reference sequence\n- (FAST5) the raw sequencing data from ONT\n- (optinal FASTQ) optionally basecalls, if you do not have the guppy binary or do not want to basecall the raw ONT data (again).\n\n### Output\n\n- Magnipore file (TSV)\n  - all compared positions\n  - classified into mutation and potential modification\n  - with the TD score\n  - with the Kullback-Leibler divergence\n  - with a bayesian p-Value\n- reference sequence alignment file\n- stockholm file (significant positions are marked)\n- multiple plots about the data of the samples like\n\n---\n\n## Usage\n\nIf you are not using the conda package replace \"magnipore\" by \"python3 magnipore.py\".\n\n### Without basecalling:\n\n\u003cdetails\u003e\u003csummary\u003eClick here to see command:\u003c/summary\u003e\n\n```bash\nmagnipore raw_data_first_sample reference_first_sample label_first_sample raw_data_sec_sample reference_sec_sample label_sec_sample working_dir --basecalls_first_sample basecalls_first_sample --basecalls_sec_sample basecalls_sec_sample\n```\n\u003c/details\u003e\n\n### With basecalling\n\n\u003cdetails\u003e\u003csummary\u003eClick here to see command:\u003c/summary\u003e\n\n```bash\nmagnipore raw_data_first_sample reference_first_sample label_first_sample raw_data_sec_sample reference_sec_sample label_sec_sample working_dir --guppy_bin PATH --guppy_model PATH\n```\n\u003c/details\u003e\n\n### Using a single sequencing run with demultiplexed FASTQs\n\n\u003cdetails\u003e\u003csummary\u003eClick here to see command:\u003c/summary\u003e\n\n- basecalls_first_sample/basecalls_sec_sample containing the demultiplexed FASTQs\n - *label_first_sample.fastq* contains only those reads of the first condition\n - *label_sec_sample.fastq* contains only those reads of the second condition\n- be sure that the *sequencing_summary.txt* is next to your FASTQ files, otherwise provide them using\n - -s1, --sequencing_summary_first_sample\n - -s2, --sequencing_summary_sec_sample\n\n```bash\nmagnipore --basecalls_first_sample basecalls_first_sample --basecalls_sec_sample basecalls_sec_sample raw_data_first_sample reference_first_sample label_first_sample raw_data_sec_sample reference_sec_sample label_sec_sample working_dir\n```\n\u003c/details\u003e\n\n### Using the same reference sequence\n\nUsing the same reference sequence for both samples results in no reported mutations. Magnipore will only report potential modifications in this case. If you assume there are mutations between the samples, try to provide different reference sequences containing these mutations.\n\n### Help Messages\n\n[Complete help messages can be found here!](help/help_messages.md)\n\n#### required arguments for magnipore:\nuse either the basecalling arguments or provide basecalls\n- basecalling arguments:\n    - guppy_bin : Path to guppy binary\n    - guppy_model : Path to guppy model used for basecalling\n    - (optional) guppy_device : Device used for basecalling (cpu or gpu cuda:0)\n- provided basecalls (FASTQ)\n    - basecalls_first_sample : Path\n    - basecalls_sec_sample : Path\n\n## Output File Description\n\n\u003cdetails\u003e\u003csummary\u003eClick here to see overview:\u003c/summary\u003e\nThe .magnipore file is a TSV containing the following columns.\n\n- strand : on which strand the comparison took place\n- td_score : threshold distance score for the signal comparison\n- kl_divergence : kullback leibler divergence for the signal comparison\n- bayesian_p : p-value for the signal comparison\n- signal_type : classification into \"mod\" for modification and \"mut\" for mutation\n- ref_1 : contig name of sample 1\n- pos_1 : position in contig of sample 1 (0-based)\n- base_1 : base at the position of sample 1\n- motif_1 : motif around the base at the position of sample 1\n- signal_mean_1 : mean of the signal distribution at the position of sample 1\n- signal_std_1 : standard deviation of the signal distribution at the position of sample 1\n- n_datapoints_1 : number of data points that formed the signal distribution\n- contained_datapoints_1 : number of data points withtin 3 standard deviations around the mean\n- n_segments_1 : number of segments from nanopolish eventalign that formed the signal distribution\n- contained_segments_1 : number of segments within 3 standard deviations around the mean\n- n_reads_1 : number of reads (coverage) that formed the signal distribution\n\nsame for second sample:\n- ref_2, pos_2, base_2, motif_2, signal_mean_2, signal_std_2, n_datapoints_2, contained_datapoints_2, n_segments_2, contained_segments_2, n_reads_2\n\u003c/details\u003e\n\n## Error Codes Explanation\n\n\u003cdetails\u003e\u003csummary\u003eClick here to see error codes:\u003c/summary\u003e\n\n- 11: Concatenating both reference files failed\n- 12: Building mafft alignment failed\n- 13: Running nanosherlock of the first sample failed\n- 14: Running nanosherlock of the second sample failed\n- 15: Number of provided reference sequences is not equal 1 or 2\n- 16: Unknown pore type\n- 17: Error in multiprocessing signal comparison\n- 18: Error in magniplot\n---\nErrors of first sample:\n- 119: Cannot basecall .slow5/.blow5 with guppy\n- 120: Could not find raw data or unknown file format\n- 121: Guppy basecalling failed\n- 122: mapping failed\n- 123: Samtools indexing failed\n- 124: f5c index failed\n- 125: f5c eventalign failed\n- 126: Could not find provided fastq files\n- 127: f5c eventalign file is empty\n---\nErrors of second sample\n- 219: Cannot basecall .slow5/.blow5 with guppy\n- 220: Could not find raw data or unknown file format\n- 221: Guppy basecalling failed\n- 222: mapping failed\n- 223: Samtools indexing failed\n- 224: f5c index failed\n- 225: f5c eventalign failed\n- 226: Could not find provided fastq files\n- 227: f5c eventalign file is empty\n\n### If Subscript Nanosherlock is Executed Separately\n\nThe -e parameter of nanosherlock specifies the leading number of the error code. Default is 0.\n- 019: Cannot basecall .slow5/.blow5 with guppy\n- 020: Could not find raw data or unknown file format \n- 021: Guppy basecalling failed\n- 022: mapping failed\n- 023: Samtools indexing failed\n- 024: f5c index failed\n- 025: f5c eventalign failed\n- 026: Could not find provided fastq files\n- 027: f5c eventalign file is empty\n  \u003c/details\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnajena%2Fmagnipore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frnajena%2Fmagnipore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnajena%2Fmagnipore/lists"}