gradio-msaplot


Namegradio-msaplot JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryMSAplot is customizable panels for plotting MSA, seqlogo, annotation, and consensus histograms.
upload_time2024-10-16 10:32:10
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseNone
keywords msa annotation bio biology chem chemistry consensus histogram gradio-custom-component gradio-template-plot med medicine multiple sequence alignment seqlogo visualize
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ---
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.
colorFrom: blue
colorTo: yellow
sdk: gradio
pinned: false
app_file: demo/space.py
---

# `gradio_msaplot`
<img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.1%20-%20orange"> <a href="https://github.com/Josephrp/GradioMSAPlot.git/issues" target="_blank"><img alt="Static Badge" src="https://img.shields.io/badge/Issues-white?logo=github&logoColor=black"></a> <a href="https://huggingface.co/spaces/seq-to-pheno/MSAPlot/discussions" target="_blank"><img alt="Static Badge" src="https://img.shields.io/badge/%F0%9F%A4%97%20Discuss-%23097EFF?style=flat&logoColor=black"></a>

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 component


if __name__ == "__main__":
    demo.launch()

```

## `MSAPlot`

### Initialization

<table>
<thead>
<tr>
<th align="left">name</th>
<th align="left" style="width: 25%;">type</th>
<th align="left">default</th>
<th align="left">description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><code>value</code></td>
<td align="left" style="width: 25%;">

```python
typing.Any | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>label</code></td>
<td align="left" style="width: 25%;">

```python
str | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>every</code></td>
<td align="left" style="width: 25%;">

```python
float | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>show_label</code></td>
<td align="left" style="width: 25%;">

```python
bool | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>container</code></td>
<td align="left" style="width: 25%;">

```python
bool
```

</td>
<td align="left"><code>True</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>scale</code></td>
<td align="left" style="width: 25%;">

```python
int | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>min_width</code></td>
<td align="left" style="width: 25%;">

```python
int
```

</td>
<td align="left"><code>160</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>visible</code></td>
<td align="left" style="width: 25%;">

```python
bool
```

</td>
<td align="left"><code>True</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>elem_id</code></td>
<td align="left" style="width: 25%;">

```python
str | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>elem_classes</code></td>
<td align="left" style="width: 25%;">

```python
list[str] | str | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>render</code></td>
<td align="left" style="width: 25%;">

```python
bool
```

</td>
<td align="left"><code>True</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>key</code></td>
<td align="left" style="width: 25%;">

```python
int | str | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>
</tbody></table>


### 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

<table>
<thead>
<tr>
<th align="left">name</th>
<th align="left" style="width: 25%;">type</th>
<th align="left">default</th>
<th align="left">description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><code>data</code></td>
<td align="left" style="width: 25%;">

```python
typing.Any
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>
</tbody></table>





            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gradio-msaplot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "MSA, annotation, bio, biology, chem, chemistry, consensus histogram, gradio-custom-component, gradio-template-Plot, med, medicine, multiple sequence alignment, seqlogo, visualize",
    "author": null,
    "author_email": "Joseph Pollack <tonic@tonic-ai.com>",
    "download_url": "https://files.pythonhosted.org/packages/96/f9/eb646d78c49169be8f409323d4502dfb6825fbfa98e515c2198c65238689/gradio_msaplot-0.0.1.tar.gz",
    "platform": null,
    "description": "---\ntags: [gradio-custom-component, Plot, med, medicine, bio, biology, chem, chemistry, MSA, multiple sequence alignment, seqlogo, annotation, consensus histogram, visualize]\ntitle: gradio_msaplot\nshort_description: MSAplot is customizable panels for plotting MSA.\ncolorFrom: blue\ncolorTo: yellow\nsdk: gradio\npinned: false\napp_file: demo/space.py\n---\n\n# `gradio_msaplot`\n<img alt=\"Static Badge\" src=\"https://img.shields.io/badge/version%20-%200.0.1%20-%20orange\"> <a href=\"https://github.com/Josephrp/GradioMSAPlot.git/issues\" target=\"_blank\"><img alt=\"Static Badge\" src=\"https://img.shields.io/badge/Issues-white?logo=github&logoColor=black\"></a> <a href=\"https://huggingface.co/spaces/seq-to-pheno/MSAPlot/discussions\" target=\"_blank\"><img alt=\"Static Badge\" src=\"https://img.shields.io/badge/%F0%9F%A4%97%20Discuss-%23097EFF?style=flat&logoColor=black\"></a>\n\nMSAplot is customizable panels for plotting MSA, seqlogo, annotation, and consensus histograms.\n\n## Installation\n\n```bash\npip install gradio_msaplot\n```\n\n## Usage\n\n```python\n\nimport gradio as gr\nfrom gradio_msaplot import MSAPlot, MSAPlotData\nimport matplotlib\nmatplotlib.use('Agg')\n\nexample = MSAPlot().example_value()\n\nwith gr.Blocks() as demo:\n    with gr.Row():\n        MSAPlot(label=\"Blank\"),  # blank component\n        MSAPlot(value=example, label=\"Populated\"),  # populated component\n\n\nif __name__ == \"__main__\":\n    demo.launch()\n\n```\n\n## `MSAPlot`\n\n### Initialization\n\n<table>\n<thead>\n<tr>\n<th align=\"left\">name</th>\n<th align=\"left\" style=\"width: 25%;\">type</th>\n<th align=\"left\">default</th>\n<th align=\"left\">description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"left\"><code>value</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\ntyping.Any | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>label</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nstr | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>every</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nfloat | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>show_label</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nbool | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>container</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nbool\n```\n\n</td>\n<td align=\"left\"><code>True</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>scale</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nint | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>min_width</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nint\n```\n\n</td>\n<td align=\"left\"><code>160</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>visible</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nbool\n```\n\n</td>\n<td align=\"left\"><code>True</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>elem_id</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nstr | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>elem_classes</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nlist[str] | str | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>render</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nbool\n```\n\n</td>\n<td align=\"left\"><code>True</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>key</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nint | str | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n</tbody></table>\n\n\n### Events\n\n| name | description |\n|:-----|:------------|\n| `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. |\n| `clear` | Triggered when the plot is cleared. |\n\n\n\n### User function\n\nThe impact on the users predict function varies depending on whether the component is used as an input or output for an event (or both).\n\n- When used as an Input, the component only impacts the input signature of the user function.\n- When used as an output, the component only impacts the return signature of the user function.\n\nThe code snippet below is accurate in cases where the component is used as both an input and an output.\n\n- **As output:** Is passed, the preprocessed input data sent to the user's function in the backend.\n- **As input:** Should return, the output data received by the component from the user's function in the backend.\n\n ```python\n def predict(\n     value: MSAPlotData | None\n ) -> MSAPlotData:\n     return value\n ```\n \n\n## `MSAPlotData`\n\n### Initialization\n\n<table>\n<thead>\n<tr>\n<th align=\"left\">name</th>\n<th align=\"left\" style=\"width: 25%;\">type</th>\n<th align=\"left\">default</th>\n<th align=\"left\">description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"left\"><code>data</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\ntyping.Any\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n</tbody></table>\n\n\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "MSAplot is customizable panels for plotting MSA, seqlogo, annotation, and consensus histograms.",
    "version": "0.0.1",
    "project_urls": {
        "repository": "https://github.com/Josephrp/GradioMSAPlot.git",
        "space": "https://huggingface.co/spaces/seq-to-pheno/MSAPlot"
    },
    "split_keywords": [
        "msa",
        " annotation",
        " bio",
        " biology",
        " chem",
        " chemistry",
        " consensus histogram",
        " gradio-custom-component",
        " gradio-template-plot",
        " med",
        " medicine",
        " multiple sequence alignment",
        " seqlogo",
        " visualize"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "39b1d1a3cb37262a1878361067aeb7fe1e3703d741cac6664314d65ccd417232",
                "md5": "8d610d768d44bd7517dd777cc602800f",
                "sha256": "1c7e53fd22751f55616098d2348a0914e51c7bd9c34f381d59a59b104e501ff3"
            },
            "downloads": -1,
            "filename": "gradio_msaplot-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8d610d768d44bd7517dd777cc602800f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 12491,
            "upload_time": "2024-10-16T10:32:08",
            "upload_time_iso_8601": "2024-10-16T10:32:08.591868Z",
            "url": "https://files.pythonhosted.org/packages/39/b1/d1a3cb37262a1878361067aeb7fe1e3703d741cac6664314d65ccd417232/gradio_msaplot-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "96f9eb646d78c49169be8f409323d4502dfb6825fbfa98e515c2198c65238689",
                "md5": "b12bf09fabdb12e769d937573d1057e3",
                "sha256": "86c5fcbb2da327fd80cb10a47b81e25e54ff512a91cd11f858db58d4f29d9b7d"
            },
            "downloads": -1,
            "filename": "gradio_msaplot-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b12bf09fabdb12e769d937573d1057e3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 123623,
            "upload_time": "2024-10-16T10:32:10",
            "upload_time_iso_8601": "2024-10-16T10:32:10.021842Z",
            "url": "https://files.pythonhosted.org/packages/96/f9/eb646d78c49169be8f409323d4502dfb6825fbfa98e515c2198c65238689/gradio_msaplot-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-16 10:32:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Josephrp",
    "github_project": "GradioMSAPlot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "gradio-msaplot"
}
        
Elapsed time: 4.29797s