{"id":20029697,"url":"https://github.com/multiqc/example-plugin","last_synced_at":"2025-05-05T03:32:28.869Z","repository":{"id":152741265,"uuid":"133865492","full_name":"MultiQC/example-plugin","owner":"MultiQC","description":"A miniature example of a MultiQC plugin.","archived":false,"fork":false,"pushed_at":"2025-02-13T10:45:49.000Z","size":45,"stargazers_count":9,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T16:38:07.654Z","etag":null,"topics":["example-project","multiqc","multiqc-plugin","next-generation-sequencing","ngs","plugin","python","quality-control"],"latest_commit_sha":null,"homepage":"https://seqera.io/multiqc/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MultiQC.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,"publiccode":null,"codemeta":null}},"created_at":"2018-05-17T20:32:37.000Z","updated_at":"2025-03-20T22:17:42.000Z","dependencies_parsed_at":"2025-02-13T11:38:42.672Z","dependency_job_id":null,"html_url":"https://github.com/MultiQC/example-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MultiQC%2Fexample-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MultiQC%2Fexample-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MultiQC%2Fexample-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MultiQC%2Fexample-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MultiQC","download_url":"https://codeload.github.com/MultiQC/example-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252435300,"owners_count":21747394,"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":["example-project","multiqc","multiqc-plugin","next-generation-sequencing","ngs","plugin","python","quality-control"],"created_at":"2024-11-13T09:22:06.902Z","updated_at":"2025-05-05T03:32:28.853Z","avatar_url":"https://github.com/MultiQC.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example MultiQC Plugin\n\nThis example repository contains example code to help you get started with writing your own MultiQC plugin.\n\nIt should be used in addition to the main MultiQC documentation:\n[https://docs.seqera.io/multiqc/](https://docs.seqera.io/multiqc/development/plugins)\n\nIf you have any questions, please get in touch on the community forum:\n[https://community.seqera.io/multiqc](https://community.seqera.io/multiqc)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://seqera.io/multiqc/\"\u003e\n    \u003cpicture\u003e\n        \u003csource media=\"(prefers-color-scheme: dark)\" width=\"350\" srcset=\"https://github.com/seqeralabs/logos/blob/master/multiqc/multiqc_logo_color_darkbg.png?raw=true\"\u003e\n        \u003cimg alt=\"Nextflow Logo\" width=\"350\" src=\"https://github.com/seqeralabs/logos/blob/master/multiqc/multiqc_logo_color.png?raw=true\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n### When to write a plugin\n\nThis example plugin contains both custom code and a MultiQC module for parsing content into reports.\n\nMultiQC modules can either be written as part of the core MultiQC program, or in a stand-alone plugin. If your module is for a publicly available tool, **please add it to the main program** and contribute your code via a pull request (see the [contributing instructions](https://github.com/MultiQC/MultiQC/blob/master/.github/CONTRIBUTING.md)).\n\nIf your module is for something very niche, which no-one else can use, then it's best to write it as part of a custom plugin. The process is almost identical, though it keeps the code bases separate.\n\n### Overview of files\n\n* `pyproject.toml`\n    * Where the plugin hooks are defined. This is where you tell MultiQC where to find your code.\n    * This file also defines how your plugin should be installed, including required python packages.\n* `example_plugin/`\n    * Installable Python packages are typically put into a directory with the same name.\n* `example_plugin/__init__.py`\n    * Python packages need an `__init__.py` file in every directory. Here, these are mostly empty (except the one in the `my_example` folder, which contains a shortcut to make the `import` statement shorter).\n    * If you prefer, you can put all code in these files and just reference the directory name only.\n* `example_plugin/cli.py`\n    * Additional command line parameters to add to MultiQC\n* `example_plugin/custom_code.py`\n    * File to hold custom functions that can tie into the main MultiQC execution flow.\n    * In this file, we define some new config defaults, including the search patterns used by the example module\n* `example_plugin/modules/my_example/`\n    * This folder contains a minimal MultiQC module which will execute along with all other MultiQC modules (as defined by the `setup.py` hook).\n\n### Usage\n\nTo use this code, you need to install MultiQC and then your code. For example:\n\n```\npip install MultiQC\npip install .\n```\n\nUse `pip install -e .` if you're actively working on the code - then you don't need to rerun the installation every time you make an edit _(though you still do if you change anything in `pyproject.toml`)_.\n\n### Disabling the plugin\n\nIn this example plugin, I have defined a single additional command line flag - `--disable-example-plugin`. When specified, it sets a new MultiQC config value to `True`. This is checked in every plugin function; the function then returns early if it's `True`.\n\nIn this way, we can effectively disable the plugin code and allow native MultiQC execution. Note that a similar approach could be used to _enable_ a custom plugin or feature.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiqc%2Fexample-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultiqc%2Fexample-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiqc%2Fexample-plugin/lists"}