pluma-plugin-trait

Crates.iopluma-plugin-trait
lib.rspluma-plugin-trait
version1.1.0
created_at2026-01-03 21:56:22.296255+00
updated_at2026-01-03 21:56:22.296255+00
descriptionA trait defining the plugin interface for PluMA (Plugin-based Microbiome Analysis)
homepage
repositoryhttps://github.com/quinnjr/pluma-plugin-trait
max_upload_size
id2020856
size4,944
Joseph R. Quinn (quinnjr)

documentation

README

pluma-plugin-trait

A Rust trait defining the plugin interface for PluMA (Plugin-based Microbiome Analysis).

Overview

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.

Usage

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(())
    }
}

The PluMAPlugin Trait

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>>;
}

Methods

  • input: Read and parse input data from the specified file path
  • run: Execute the plugin's main algorithm or computation
  • output: Write results to the specified file path

License

MIT License - see LICENSE.md for details.

Author

Joseph R. Quinn

Commit count: 0

cargo fmt