plugins
Plugin system for tool-specific progress parsing.
This package provides a plugin system for parsing progress from tool-specific log files. Plugins can detect and parse output from common bioinformatics tools like BWA, samtools, STAR, etc.
Plugin Discovery
Plugins are discovered from three sources: 1. Built-in plugins shipped with snakesee 2. User plugins in ~/.snakesee/plugins/ or ~/.config/snakesee/plugins/ 3. Entry points registered by third-party packages
See Also
- :mod:
snakesee.plugins.loaderfor file-based plugin loading - :mod:
snakesee.plugins.discoveryfor entry point discovery - :mod:
snakesee.plugins.registryfor plugin lookup functions
Classes¶
PluginMetadata
dataclass
¶
Validated metadata for a tool progress plugin.
This dataclass provides structured access to plugin metadata with
validation. Use from_plugin() to create an instance from a plugin.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The tool name (e.g., 'bwa', 'samtools', 'star'). |
api_version |
int
|
The plugin API version this plugin supports. |
patterns |
tuple[str, ...]
|
Command patterns that indicate this tool is being used. |
description |
str
|
Optional description of what this plugin parses. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If validation fails during construction. |
Example
metadata = PluginMetadata.from_plugin(my_plugin) print(f"Plugin: {metadata.name} (API v{metadata.api_version})")
Source code in snakesee/plugins/base.py
Functions¶
__post_init__ ¶
Validate metadata fields.
Source code in snakesee/plugins/base.py
from_plugin
classmethod
¶
from_plugin(plugin: ToolProgressPlugin) -> PluginMetadata
Create metadata from a plugin instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugin
|
ToolProgressPlugin
|
The plugin to extract metadata from. |
required |
Returns:
| Type | Description |
|---|---|
PluginMetadata
|
Validated PluginMetadata instance. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If plugin metadata is invalid. |
AttributeError
|
If plugin is missing required attributes. |
Source code in snakesee/plugins/base.py
is_compatible ¶
Check if the plugin is compatible with the current API version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
current_api_version
|
int | None
|
The API version to check against. Defaults to PLUGIN_API_VERSION. |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
True if the plugin is compatible, False otherwise. |
Source code in snakesee/plugins/base.py
ToolProgress
dataclass
¶
Progress information extracted from a tool's log output.
Attributes:
| Name | Type | Description |
|---|---|---|
items_processed |
int
|
Number of items processed so far. |
items_total |
int | None
|
Total number of items to process (None if unknown). |
unit |
str
|
Unit of items (e.g., "reads", "alignments", "variants"). |
percent_complete |
float | None
|
Percentage complete (0-100), None if unknown. |
estimated_remaining_seconds |
float | None
|
Estimated seconds remaining, None if unknown. |
Source code in snakesee/plugins/base.py
ToolProgressPlugin ¶
Bases: ABC
Abstract base class for tool-specific progress parsers.
Subclasses implement parsing logic for specific bioinformatics tools (e.g., BWA, STAR, samtools) to extract progress information from logs.
Plugin Versioning
Plugins can declare which API version they support via the
plugin_api_version property. If not specified, version 1 is assumed.
Plugins requiring a newer API than the current version will be skipped.
Example implementation::
class BWAPlugin(ToolProgressPlugin):
@property
def tool_name(self) -> str:
return "bwa"
@property
def tool_patterns(self) -> list[str]:
return ["bwa mem", "bwa-mem2"]
def can_parse(self, rule_name: str, log_content: str) -> bool:
return "bwa" in rule_name.lower() or "[M::mem_" in log_content
def parse_progress(self, log_content: str) -> ToolProgress | None:
# Parse BWA-specific progress patterns
...
Source code in snakesee/plugins/base.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | |
Attributes¶
plugin_api_version
property
¶
The plugin API version this plugin was written for.
Override to declare compatibility with a specific API version. If not overridden, version 1 is assumed.
tool_name
abstractmethod
property
¶
Identifier for this tool (e.g., 'bwa', 'samtools', 'star').
Should be lowercase and match common tool naming conventions.
tool_patterns
property
¶
Common command patterns that indicate this tool is being used.
Used for initial filtering before detailed log parsing. Override in subclasses for tool-specific patterns.
Functions¶
can_parse
abstractmethod
¶
Determine if this plugin can parse the given log content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rule_name
|
str
|
Name of the Snakemake rule. |
required |
log_content
|
str
|
Content of the rule's log file. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if this plugin can extract progress from this log. |
Source code in snakesee/plugins/base.py
parse_progress
abstractmethod
¶
parse_progress(log_content: str) -> ToolProgress | None
Extract progress information from log content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
log_content
|
str
|
Content of the rule's log file. |
required |
Returns:
| Type | Description |
|---|---|
ToolProgress | None
|
ToolProgress if progress could be extracted, None otherwise. |
Source code in snakesee/plugins/base.py
parse_progress_from_file ¶
parse_progress_from_file(log_path: Path) -> ToolProgress | None
Extract progress from a log file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
log_path
|
Path
|
Path to the log file. |
required |
Returns:
| Type | Description |
|---|---|
ToolProgress | None
|
ToolProgress if progress could be extracted, None otherwise. |
Source code in snakesee/plugins/base.py
Functions¶
discover_entry_point_plugins ¶
discover_entry_point_plugins(force_reload: bool = False) -> list[ToolProgressPlugin]
Discover plugins registered via setuptools entry points.
Third-party packages can register plugins by adding an entry point in their pyproject.toml:
[project.entry-points."snakesee.plugins"]
my_tool = "my_package.plugins:MyToolPlugin"
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
force_reload
|
bool
|
If True, re-discover plugins even if cached. |
False
|
Returns:
| Type | Description |
|---|---|
list[ToolProgressPlugin]
|
List of discovered plugin instances. |
Source code in snakesee/plugins/discovery.py
find_plugin_for_log ¶
find_plugin_for_log(rule_name: str, log_content: str, plugins: list[ToolProgressPlugin] | None = None) -> ToolProgressPlugin | None
Find a plugin that can parse the given log content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rule_name
|
str
|
Name of the Snakemake rule. |
required |
log_content
|
str
|
Content of the rule's log file. |
required |
plugins
|
list[ToolProgressPlugin] | None
|
List of plugins to search. Defaults to all plugins. |
None
|
Returns:
| Type | Description |
|---|---|
ToolProgressPlugin | None
|
A plugin that can parse this log, or None if no plugin matches. |
Source code in snakesee/plugins/__init__.py
find_rule_log ¶
find_rule_log(rule_name: str, job_id: int | str | None, workflow_dir: Path, wildcards: dict[str, str] | None = None) -> Path | None
Attempt to find the log file for a running rule.
Snakemake stores rule logs in various locations depending on the workflow configuration. This function searches common locations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rule_name
|
str
|
Name of the rule. |
required |
job_id
|
int | str | None
|
Snakemake job ID (if known). |
required |
workflow_dir
|
Path
|
Workflow root directory. |
required |
wildcards
|
dict[str, str] | None
|
Dictionary of wildcard names to values for the job. |
None
|
Returns:
| Type | Description |
|---|---|
Path | None
|
Path to the log file if found, None otherwise. |
Source code in snakesee/plugins/__init__.py
get_all_plugins ¶
get_all_plugins(include_user: bool = True) -> list[ToolProgressPlugin]
Get all available plugins (built-in, user file-based, and entry points).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_user
|
bool
|
Whether to include user plugins (file-based and entry points). |
True
|
Returns:
| Type | Description |
|---|---|
list[ToolProgressPlugin]
|
Combined list of all plugins. |
Source code in snakesee/plugins/__init__.py
load_user_plugins ¶
load_user_plugins(plugin_dirs: list[Path] | None = None, force_reload: bool = False) -> list[ToolProgressPlugin]
Load custom user plugins from plugin directories.
User plugins are Python files in ~/.snakesee/plugins/ or ~/.config/snakesee/plugins/ that define classes inheriting from ToolProgressPlugin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugin_dirs
|
list[Path] | None
|
List of directories to search. Defaults to USER_PLUGIN_DIRS. |
None
|
force_reload
|
bool
|
If True, reload plugins even if already cached. |
False
|
Returns:
| Type | Description |
|---|---|
list[ToolProgressPlugin]
|
List of loaded user plugin instances. |
Example plugin file (~/.snakesee/plugins/my_tool.py)::
from snakesee.plugins.base import ToolProgress, ToolProgressPlugin
import re
class MyToolPlugin(ToolProgressPlugin):
@property
def tool_name(self) -> str:
return "mytool"
def can_parse(self, rule_name: str, log_content: str) -> bool:
return "mytool" in rule_name.lower()
def parse_progress(self, log_content: str) -> ToolProgress | None:
match = re.search(r"Processed (\d+) items", log_content)
if match:
return ToolProgress(items_processed=int(match.group(1)), unit="items")
return None
Source code in snakesee/plugins/loader.py
parse_tool_progress ¶
parse_tool_progress(rule_name: str, log_path: Path, plugins: list[ToolProgressPlugin] | None = None) -> ToolProgress | None
Parse progress from a rule's log file using available plugins.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rule_name
|
str
|
Name of the Snakemake rule. |
required |
log_path
|
Path
|
Path to the rule's log file. |
required |
plugins
|
list[ToolProgressPlugin] | None
|
List of plugins to use. Defaults to all plugins (built-in + user). |
None
|
Returns:
| Type | Description |
|---|---|
ToolProgress | None
|
ToolProgress if progress could be extracted, None otherwise. |
Source code in snakesee/plugins/__init__.py
Modules¶
base ¶
Base classes for tool-specific progress parsing plugins.
Classes¶
PluginMetadata
dataclass
¶
Validated metadata for a tool progress plugin.
This dataclass provides structured access to plugin metadata with
validation. Use from_plugin() to create an instance from a plugin.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The tool name (e.g., 'bwa', 'samtools', 'star'). |
api_version |
int
|
The plugin API version this plugin supports. |
patterns |
tuple[str, ...]
|
Command patterns that indicate this tool is being used. |
description |
str
|
Optional description of what this plugin parses. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If validation fails during construction. |
Example
metadata = PluginMetadata.from_plugin(my_plugin) print(f"Plugin: {metadata.name} (API v{metadata.api_version})")
Source code in snakesee/plugins/base.py
Functions¶
Validate metadata fields.
Source code in snakesee/plugins/base.py
classmethod
¶from_plugin(plugin: ToolProgressPlugin) -> PluginMetadata
Create metadata from a plugin instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugin
|
ToolProgressPlugin
|
The plugin to extract metadata from. |
required |
Returns:
| Type | Description |
|---|---|
PluginMetadata
|
Validated PluginMetadata instance. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If plugin metadata is invalid. |
AttributeError
|
If plugin is missing required attributes. |
Source code in snakesee/plugins/base.py
Check if the plugin is compatible with the current API version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
current_api_version
|
int | None
|
The API version to check against. Defaults to PLUGIN_API_VERSION. |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
True if the plugin is compatible, False otherwise. |
Source code in snakesee/plugins/base.py
ToolProgress
dataclass
¶
Progress information extracted from a tool's log output.
Attributes:
| Name | Type | Description |
|---|---|---|
items_processed |
int
|
Number of items processed so far. |
items_total |
int | None
|
Total number of items to process (None if unknown). |
unit |
str
|
Unit of items (e.g., "reads", "alignments", "variants"). |
percent_complete |
float | None
|
Percentage complete (0-100), None if unknown. |
estimated_remaining_seconds |
float | None
|
Estimated seconds remaining, None if unknown. |
Source code in snakesee/plugins/base.py
ToolProgressPlugin ¶
Bases: ABC
Abstract base class for tool-specific progress parsers.
Subclasses implement parsing logic for specific bioinformatics tools (e.g., BWA, STAR, samtools) to extract progress information from logs.
Plugin Versioning
Plugins can declare which API version they support via the
plugin_api_version property. If not specified, version 1 is assumed.
Plugins requiring a newer API than the current version will be skipped.
Example implementation::
class BWAPlugin(ToolProgressPlugin):
@property
def tool_name(self) -> str:
return "bwa"
@property
def tool_patterns(self) -> list[str]:
return ["bwa mem", "bwa-mem2"]
def can_parse(self, rule_name: str, log_content: str) -> bool:
return "bwa" in rule_name.lower() or "[M::mem_" in log_content
def parse_progress(self, log_content: str) -> ToolProgress | None:
# Parse BWA-specific progress patterns
...
Source code in snakesee/plugins/base.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | |
Attributes¶
property
¶The plugin API version this plugin was written for.
Override to declare compatibility with a specific API version. If not overridden, version 1 is assumed.
abstractmethod
property
¶Identifier for this tool (e.g., 'bwa', 'samtools', 'star').
Should be lowercase and match common tool naming conventions.
property
¶Common command patterns that indicate this tool is being used.
Used for initial filtering before detailed log parsing. Override in subclasses for tool-specific patterns.
Functions¶
abstractmethod
¶Determine if this plugin can parse the given log content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rule_name
|
str
|
Name of the Snakemake rule. |
required |
log_content
|
str
|
Content of the rule's log file. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if this plugin can extract progress from this log. |
Source code in snakesee/plugins/base.py
abstractmethod
¶parse_progress(log_content: str) -> ToolProgress | None
Extract progress information from log content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
log_content
|
str
|
Content of the rule's log file. |
required |
Returns:
| Type | Description |
|---|---|
ToolProgress | None
|
ToolProgress if progress could be extracted, None otherwise. |
Source code in snakesee/plugins/base.py
parse_progress_from_file(log_path: Path) -> ToolProgress | None
Extract progress from a log file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
log_path
|
Path
|
Path to the log file. |
required |
Returns:
| Type | Description |
|---|---|
ToolProgress | None
|
ToolProgress if progress could be extracted, None otherwise. |
Source code in snakesee/plugins/base.py
bwa ¶
Plugin for BWA aligner progress parsing.
Classes¶
BWAPlugin ¶
Bases: ToolProgressPlugin
Progress parser for BWA (Burrows-Wheeler Aligner).
Parses BWA mem/mem2 progress output which shows processed reads.
Example BWA output:: [M::bwa_idx_load_from_disk] read 0 ALT contigs [M::process] read 10000 sequences (1500000 bp)... [M::mem_pestat] skip orientation FF as there are not enough pairs [M::mem_process_seqs] Processed 10000 reads in 1.234 CPU sec [M::main] Real time: 2.345 sec; CPU: 1.234 sec
Source code in snakesee/plugins/bwa.py
Functions¶
Check if this looks like BWA output.
Source code in snakesee/plugins/bwa.py
parse_progress(log_content: str) -> ToolProgress | None
Extract progress from BWA log output.
Source code in snakesee/plugins/bwa.py
discovery ¶
Entry point-based plugin discovery.
This module handles discovering plugins registered via setuptools entry points. Third-party packages can register plugins in their pyproject.toml.
Classes¶
Functions¶
clear_discovery_cache ¶
Clear the cached entry point plugins, forcing a rediscovery on next access.
Source code in snakesee/plugins/discovery.py
discover_entry_point_plugins ¶
discover_entry_point_plugins(force_reload: bool = False) -> list[ToolProgressPlugin]
Discover plugins registered via setuptools entry points.
Third-party packages can register plugins by adding an entry point in their pyproject.toml:
[project.entry-points."snakesee.plugins"]
my_tool = "my_package.plugins:MyToolPlugin"
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
force_reload
|
bool
|
If True, re-discover plugins even if cached. |
False
|
Returns:
| Type | Description |
|---|---|
list[ToolProgressPlugin]
|
List of discovered plugin instances. |
Source code in snakesee/plugins/discovery.py
fastp ¶
Plugin for fastp QC tool progress parsing.
Classes¶
FastpPlugin ¶
Bases: ToolProgressPlugin
Progress parser for fastp (FASTQ preprocessor).
Parses fastp progress output which shows processed reads.
Example fastp output:: Read1 before filtering: total reads: 10000000 total bases: 1500000000 ... Filtering result: reads passed filter: 9800000 reads failed due to low quality: 100000
Source code in snakesee/plugins/fastp.py
Functions¶
Check if this looks like fastp output.
parse_progress(log_content: str) -> ToolProgress | None
Extract progress from fastp log output.
Source code in snakesee/plugins/fastp.py
fgbio ¶
Plugin for fgbio tool progress parsing.
Classes¶
FgbioPlugin ¶
Bases: ToolProgressPlugin
Progress parser for fgbio tools.
fgbio is a toolkit for working with genomic and high throughput sequencing data. It uses HTSJDK's ProgressLogger which outputs messages like:
[INFO] Processed 1,000,000 records. Elapsed time: 00:01:30s.
[progress] Read 5000000 records from BAM file.
[INFO] Grouped 1234567 records into 123456 read pairs.
This plugin detects fgbio by rule name or log content patterns.
Source code in snakesee/plugins/fgbio.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
Functions¶
Check if this looks like fgbio output.
Source code in snakesee/plugins/fgbio.py
parse_progress(log_content: str) -> ToolProgress | None
Extract progress from fgbio log output.
Source code in snakesee/plugins/fgbio.py
loader ¶
File-based plugin loading with security checks.
This module handles loading plugins from Python files in user directories. It includes security checks for symlinks and world-writable directories.
Classes¶
Functions¶
clear_plugin_cache ¶
load_user_plugins ¶
load_user_plugins(plugin_dirs: list[Path] | None = None, force_reload: bool = False) -> list[ToolProgressPlugin]
Load custom user plugins from plugin directories.
User plugins are Python files in ~/.snakesee/plugins/ or ~/.config/snakesee/plugins/ that define classes inheriting from ToolProgressPlugin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugin_dirs
|
list[Path] | None
|
List of directories to search. Defaults to USER_PLUGIN_DIRS. |
None
|
force_reload
|
bool
|
If True, reload plugins even if already cached. |
False
|
Returns:
| Type | Description |
|---|---|
list[ToolProgressPlugin]
|
List of loaded user plugin instances. |
Example plugin file (~/.snakesee/plugins/my_tool.py)::
from snakesee.plugins.base import ToolProgress, ToolProgressPlugin
import re
class MyToolPlugin(ToolProgressPlugin):
@property
def tool_name(self) -> str:
return "mytool"
def can_parse(self, rule_name: str, log_content: str) -> bool:
return "mytool" in rule_name.lower()
def parse_progress(self, log_content: str) -> ToolProgress | None:
match = re.search(r"Processed (\d+) items", log_content)
if match:
return ToolProgress(items_processed=int(match.group(1)), unit="items")
return None
Source code in snakesee/plugins/loader.py
validate_plugin ¶
validate_plugin(plugin: ToolProgressPlugin, source: str = 'unknown') -> PluginMetadata | None
Validate that a plugin instance is compatible and properly implemented.
Uses PluginMetadata for structured validation of plugin attributes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugin
|
ToolProgressPlugin
|
The plugin instance to validate. |
required |
source
|
str
|
Description of where the plugin came from (for logging). |
'unknown'
|
Returns:
| Type | Description |
|---|---|
PluginMetadata | None
|
PluginMetadata if the plugin is valid and compatible, None otherwise. |
Source code in snakesee/plugins/loader.py
registry ¶
Plugin registry and lookup functions.
This module provides functions for finding and using plugins to parse tool-specific progress from log files.
Classes¶
Functions¶
find_plugin_for_log ¶
find_plugin_for_log(rule_name: str, log_content: str, plugins: list[ToolProgressPlugin]) -> ToolProgressPlugin | None
Find a plugin that can parse the given log content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rule_name
|
str
|
Name of the Snakemake rule. |
required |
log_content
|
str
|
Content of the rule's log file. |
required |
plugins
|
list[ToolProgressPlugin]
|
List of plugins to search. |
required |
Returns:
| Type | Description |
|---|---|
ToolProgressPlugin | None
|
A plugin that can parse this log, or None if no plugin matches. |
Source code in snakesee/plugins/registry.py
get_all_plugins ¶
get_all_plugins(builtin_plugins: list[ToolProgressPlugin], include_user: bool = True) -> list[ToolProgressPlugin]
Get all available plugins (built-in, user file-based, and entry points).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
builtin_plugins
|
list[ToolProgressPlugin]
|
List of built-in plugin instances. |
required |
include_user
|
bool
|
Whether to include user plugins (file-based and entry points). |
True
|
Returns:
| Type | Description |
|---|---|
list[ToolProgressPlugin]
|
Combined list of all plugins. |
Source code in snakesee/plugins/registry.py
parse_tool_progress ¶
parse_tool_progress(rule_name: str, log_path: Path, plugins: list[ToolProgressPlugin]) -> ToolProgress | None
Parse progress from a rule's log file using available plugins.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rule_name
|
str
|
Name of the Snakemake rule. |
required |
log_path
|
Path
|
Path to the rule's log file. |
required |
plugins
|
list[ToolProgressPlugin]
|
List of plugins to use. |
required |
Returns:
| Type | Description |
|---|---|
ToolProgress | None
|
ToolProgress if progress could be extracted, None otherwise. |
Source code in snakesee/plugins/registry.py
samtools ¶
Plugin for samtools progress parsing.
Classes¶
SamtoolsIndexPlugin ¶
Bases: ToolProgressPlugin
Progress parser for samtools index.
samtools index doesn't provide progress, but we can detect completion.
Source code in snakesee/plugins/samtools.py
Functions¶
Check if this looks like samtools index.
parse_progress(log_content: str) -> ToolProgress | None
SamtoolsSortPlugin ¶
Bases: ToolProgressPlugin
Progress parser for samtools sort.
Parses samtools sort progress output which shows processed reads.
Example samtools sort output:: [bam_sort_core] merging from 4 files and 1 in-memory blocks... [bam_sort_core] read 1000000 records...
Source code in snakesee/plugins/samtools.py
Functions¶
Check if this looks like samtools sort output.
parse_progress(log_content: str) -> ToolProgress | None
Extract progress from samtools sort log output.
Source code in snakesee/plugins/samtools.py
star ¶
Plugin for STAR aligner progress parsing.
Classes¶
STARPlugin ¶
Bases: ToolProgressPlugin
Progress parser for STAR (Spliced Transcripts Alignment to a Reference).
Parses STAR progress output which shows alignment progress.
Example STAR output:: STAR version=2.7.10a ... Finished 10000000 paired reads Finished 20000000 paired reads ... Uniquely mapped reads % | 85.00%
Source code in snakesee/plugins/star.py
Functions¶
Check if this looks like STAR output.
parse_progress(log_content: str) -> ToolProgress | None
Extract progress from STAR log output.