| Crates.io | pluma-plugin-trait |
| lib.rs | pluma-plugin-trait |
| version | 1.1.0 |
| created_at | 2026-01-03 21:56:22.296255+00 |
| updated_at | 2026-01-03 21:56:22.296255+00 |
| description | A trait defining the plugin interface for PluMA (Plugin-based Microbiome Analysis) |
| homepage | |
| repository | https://github.com/quinnjr/pluma-plugin-trait |
| max_upload_size | |
| id | 2020856 |
| size | 4,944 |
A Rust trait defining the plugin interface for PluMA (Plugin-based Microbiome Analysis).
This crate provides the PluMAPlugin trait that defines a standard interface for creating plugins compatible with the PluMA framework. PluMA is a lightweight, flexible, and highly scalable pipeline for analyzing microbiome data.
Add this to your Cargo.toml:
[dependencies]
pluma-plugin-trait = "1.1"
Then implement the trait for your plugin:
use pluma_plugin_trait::PluMAPlugin;
struct MyPlugin {
// your plugin state
}
impl PluMAPlugin for MyPlugin {
fn input(&mut self, filepath: String) -> Result<(), Box<dyn std::error::Error>> {
// Read input data from filepath
Ok(())
}
fn run(&mut self) -> Result<(), Box<dyn std::error::Error>> {
// Execute your algorithm
Ok(())
}
fn output(&mut self, filepath: String) -> Result<(), Box<dyn std::error::Error>> {
// Write results to filepath
Ok(())
}
}
pub trait PluMAPlugin {
fn input(&mut self, filepath: String) -> Result<(), Box<dyn std::error::Error>>;
fn run(&mut self) -> Result<(), Box<dyn std::error::Error>>;
fn output(&mut self, filepath: String) -> Result<(), Box<dyn std::error::Error>>;
}
input: Read and parse input data from the specified file pathrun: Execute the plugin's main algorithm or computationoutput: Write results to the specified file pathMIT License - see LICENSE.md for details.
Joseph R. Quinn