https://github.com/josephrp/gradiomsaplot
Plot multiple sequence alignment (MSA) using Gradio
https://github.com/josephrp/gradiomsaplot
Last synced: about 2 months ago
JSON representation
Plot multiple sequence alignment (MSA) using Gradio
- Host: GitHub
- URL: https://github.com/josephrp/gradiomsaplot
- Owner: Josephrp
- Created: 2024-10-16T08:05:22.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-10-16T10:21:19.000Z (8 months ago)
- Last Synced: 2025-03-28T05:23:36.973Z (2 months ago)
- Language: Python
- Size: 119 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
tags: [gradio-custom-component, Plot, med, medicine, bio, biology, chem, chemistry, MSA, multiple sequence alignment, seqlogo, annotation, consensus histogram, visualize]
title: gradio_msaplot
short_description: MSAplot is customizable panels for plotting MSA, seqlogo, annotation, and consensus histograms.
colorFrom: blue
colorTo: yellow
sdk: gradio
pinned: false
app_file: space.py
---MSAplot is customizable panels for plotting MSA, seqlogo, annotation, and consensus histograms.
## Installation
```bash
pip install gradio_msaplot
```## Usage
```python
import gradio as gr
from gradio_msaplot import MSAPlot, MSAPlotData
import matplotlib
matplotlib.use('Agg')example = MSAPlot().example_value()
with gr.Blocks() as demo:
with gr.Row():
MSAPlot(label="Blank"), # blank component
MSAPlot(value=example, label="Populated"), # populated componentif __name__ == "__main__":
demo.launch()```
## `MSAPlot`
### Initialization
name
type
default
description
value
```python
typing.Any | None
```
None
None
label
```python
str | None
```
None
None
every
```python
float | None
```
None
None
show_label
```python
bool | None
```
None
None
container
```python
bool
```
True
None
scale
```python
int | None
```
None
None
min_width
```python
int
```
160
None
visible
```python
bool
```
True
None
elem_id
```python
str | None
```
None
None
elem_classes
```python
list[str] | str | None
```
None
None
render
```python
bool
```
True
None
key
```python
int | str | None
```
None
None### Events
| name | description |
|:-----|:------------|
| `change` | Triggered when the value of the MSAPlot changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input. |
| `clear` | Triggered when the plot is cleared. |### User function
The impact on the users predict function varies depending on whether the component is used as an input or output for an event (or both).
- When used as an Input, the component only impacts the input signature of the user function.
- When used as an output, the component only impacts the return signature of the user function.The code snippet below is accurate in cases where the component is used as both an input and an output.
- **As output:** Is passed, the preprocessed input data sent to the user's function in the backend.
- **As input:** Should return, the output data received by the component from the user's function in the backend.```python
def predict(
value: MSAPlotData | None
) -> MSAPlotData:
return value
```
## `MSAPlotData`
### Initialization
name
type
default
description
data
```python
typing.Any
```
None
None